4 ms·
If you are running a fleet of thousands of hosts in an environment with auto-scaling capabilities, your swap will never do anything except under extraordinary b
by shermantanktop 2y ago
If you are running a fleet of thousands of hosts in an environment with auto-scaling capabilities, your swap will never do anything except under extraordinary burst load, e.g. DDOS.
In that situation, swap provides exactly the wrong thing - it attempts to keep up with memory demand by doing a more expensive and slower version of regular processing. That’s a key ingredient in the recipe for congestion collapse.
- skywhopper 2y agoDepends on the workload characteristics. If there’s a chance one request could balloon into a huge RAM consumer, you want to be able to survive that without running out of RAM. But if you are hitting swap regularly across your fleet, it’s time to tweak your scaling parameters. But if you never ever hit it, you may be overscaled.
- goodpoint 2y agoThank you!
- littlestymaar 2y agoSure swap isn't helping, but having random processes being OOM-killed isn't either …
- deleted 2y ago[deleted]
- JackSlateur 2y agoIt does, if it helps you highlight an issue somewhere : sizing, rate limiting or whatever
- goodpoint 2y agoIf you are relying on failures and crashes instead of proactively monitor your workload you are already taking the wrong approach, swap or no swap.
- shermantanktop 2y agoYeah, but shit happens. Oom killer and the load balancer ejecting the host is better than 0.03% of requests mysteriously failing for weeks.
- toast0 2y agoDepends on how much swap you have. If you have a little (0.5-1 GB), you'll catch the extraordinary bursts that are handleable, without getting to the trashes to hard to finally die. And you have a handy dandy thing to monitor to show when you're actually under memory pressure.