5 ms·
Resource exhaustion can be super frustrating, and always feels like a third world slum situation when it happens. Like, why would operating systems allow thems
by tcdent 2y ago
Resource exhaustion can be super frustrating, and always feels like a third world slum situation when it happens.
Like, why would operating systems allow themselves to run out of headroom entirely in this day and age?
- TeMPOraL 2y ago> a third world slum situation when it happens > why would operating systems allow themselves to run out of headroom entirely in this day and age? Following the analogy, perhaps for the same reason the richest cities in the richest, most developed Western nations, are rapidly beginning to look very much like third-world slums? Over-optimization is the name of the game. All systems need some amount of slack in them to stay flexible, robust (and livable). Unfortunately, cutting into the slack is always profitable on the margin, so without top-down intervention, the slack will be cut into until it's gone entirely. "Look, these machines are utilized only to 75% of capacity; adding this new system will only increase it by 5%"; "look, we can save XX$/month by cutting on compute, the machines will still be maxing out at 90%, so we'll still have a buffer". "Oh, this new telemetry service will bump that only by 1%". "Look, there's so much free space here in between these blocks of flats; adding another block won't hurt." And so on. Until your machines are running at 99% capacity and you risk global outage every time someone sneezes near the server room. Until your city starts to look like London, and if you're from Central Europe like me, you may start to realize that being a few months or years behind on the most recent gadgets is small price to pay in exchange for cities that are affordable and clean.
- skywhopper 2y agoThey usually don’t? If they did, they would have just crashed. If they are still running, then they allowed themselves headroom. The real question is who gets to use that headroom and how? What happens when the administrative processes use “too many” resources? There are tons of tools built into modern OSes to manage prioritization of processes, etc. Whether it’s worth the tradeoff for you to deal with the operational overhead of harnessing those features is up to you.
- throwaway290 2y agoBecause it makes computer slower and people pay for compute. I think consumer systems do it. macos shows the "quit some app, you're out of ram" but the system itself works. but if you are asking that OS knows this is containers process and this is control plane process and treat them differently, I think no one does that. Imagine how frustrating would it be if your os does it wrongly and you end up paying 10x because the os nerfed your main process because it thought something more important was running
- TeMPOraL 2y ago> Imagine how frustrating would it be if your os does it wrongly and you end up paying 10x because the os nerfed your main process because it thought something more important was running Imagine how frustrating it is when the Linux on your desktop suddenly decides to start randomly killing processes, or worse, attempts to swap some memory out, causing a feedback loop of delays that completely freezes the system until you power-cycle the machine. That's one of the two things Windows always did better (the other thing is disabling write buffering for removable storage, on the account of that storage being, well, removable). Resource limits are not something you want to discover when you've exceeded them; they need to be managed and alerted about in advance. "Makes computer slower" and alerting the "people who pay for compute" is preferable to crashing - especially in distributed systems, where failures cascade (particularly when the whole system has been penny-pinched / overoptimized to the same degree as any single computer within it).
- throwaway290 2y ago> That's one of the two things Windows always did better Someone replied about cgroups on Linux and how it is bog standard stuff (that ClosedAI just didn't know how to use apparently?)
- deleted 2y ago[deleted]
- yuliyp 2y ago> OS knows this is containers process and this is control plane process and treat them differently, I think no one does that cgroups on Linux does exactly this, and are a standard part of ensuring that containers don't exceed their allocated resources.