-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Issue for "zones can run out of resources" #7468
Comments
I think RFD 413 might be relevant for this chunk of work? |
Definitely - FYI @gjcolombo . https://rfd.shared.oxide.computer/rfd/0413#_zone_memory_controls seems to discuss the zone controls more, https://rfd.shared.oxide.computer/rfd/0413#possible_budgets seems like an interesting starting point for setting some upper bounds. I do think we probably want to get monitoring integrated more tightly before setting hard limits here. Also: https://rfd.shared.oxide.computer/rfd/0312 is related for the disk usage side of things. |
100% agreed here, especially since I'm sure many of the numbers in 413 section 7 are badly out of date (e.g. Crucible is much more efficient these days). We really need to get a clearer picture of what costs what before we start applying any limits (since the penalty for violating a usage limit might ultimately be termination of the violating process!). |
Something that came up while I was talking to @bcantrill about affinity and related work is that, presently, when an instance-start saga fails because we can't find a sled with sufficient resources (or, when @smklein's affinity work is done, because we can't find a sled with sufficient resources that's permitted by the instance's affinity rules), we put the instance in the At present, we would want the "insufficient resources" state to be handled broadly similar to |
There are several issues related to "who is using CPU / RAM / Disk space" on a sled, and ensuring these are accounted properly. This issue attempts to summarize these issues at a high-level, and track them in one place.
If we do not account for these resources, it's possible for anything consuming these resources in an unbounded fashion to exhaust other consumers of said resource on the sled, which could result in unexpected failures or performance degredation.
Definitions
Resources
Resources are finite resources that exist on Sleds, and are necessary for zones to operates. They are used by zones, but may be used by other non-zone entities as well.
These include:
Resource Consumers
Consumers are entities on Sleds that utilize resources, and draw from the "shared pool" of them.
These include:
Why Use This Categorization
If you pick a consumer (e.g. "Switch Zone") and a resource (e.g., "RAM"), and there exists no upper-bound on usage, then it is possible for that consumer to negatively impact other occupants on that sled by preventing them from using resources that they expect to exist.
To definitely resolve this issue, we must define "buckets" from which consumers can access resources. One such example: For disks, the Debug dataset has a reservation and a quota. Although we must account for space usage within this dataset, it is not possible for usage within this dataset to cause problems in other datasets. Similarly, usage of space by other datasets cannot starve the debug dataset of space.
Tools to limit resource usage
illumos gives us tools for providing upper-bounds on the usage of resources by consumers
capped-cpu
andcapped-memory
properties of zonecfgResource Limits by Consumer
regions
, where it does apply quotas and reservations internally.vcpus
for the instance, but impose no bound on the Propolis Zone.memory
which is allocated within Nexus, and used by Propolis to cooperatively use a portion of an instance-provisioned "memory reservoir". Reservoir capacity is cooperatively shared by the propolis zones (the sled agent is trusting zones to only consume as much reservoir as they were provided - a "greedy" propolis could starve other instances, although this seems unlikely).Issues
(Note that the "consumer" here does not necessarily imply blame - if a neighboring service has consumed excessive resources, a consumer may fail prematurely)
saga
+saga_node_event
tables are never garbage collected, but they should be #6635The text was updated successfully, but these errors were encountered: