"Set vm.swappiness=0 on every server"
Bad advice that gets parroted everywhere. swappiness=0 doesn't disable swap — since kernel 3.5+ it means "only swap to avoid OOM," which can trigger the OOM killer to nuke your MySQL instead of paging out cold memory.
On a 2GB box I run vm.swappiness=10 + a 2GB swapfile. Cold pages drift out, RAM stays free for buffers, OOM killer stays asleep.
Want truly off? swapoff -a. But on a $5 box you don't.
Try it tonight.
Root Access Daily
@RootAccessDaily
"Set vm.swappiness=0 on every server"
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.