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.
More on Logs, Limits & High-Traffic Tuning
How does log management work on a modern Linux server?BeginnerWhy centralize logs instead of reading them on each server?BeginnerWrite a logrotate config for an application log.BeginnerWhat is the difference between `copytruncate` and `create` + postrotate signal?IntermediateLogs rotated but disk usage did not drop. Why?IntermediateHow often does logrotate run, and why does `maxsize` sometimes not trigger in time?Intermediate