Interview Prep/Linux/Logs, Limits & High-Traffic Tuning

What are the risks of setting `vm.swappiness=0` or `vm.overcommit_memory=2` blindly?

IntermediateProductionLogs, Limits & High-Traffic Tuning
Answer

swappiness=0 on modern kernels does not disable swap, but strongly avoids it until memory is nearly exhausted, which can make OOM kills arrive suddenly instead of degrading gracefully. overcommit_memory=2 with a low overcommit_ratio makes malloc/fork fail early, and many runtimes (JVM, Redis BGSAVE fork, Chrome) reserve large virtual ranges they never touch, so they fail to start even with plenty of free RAM. Tune these per workload with testing.

All Linux questions Roadmap: Linux

More on Logs, Limits & High-Traffic Tuning