sudo sysctl -w vm.swappiness=10

Category: VPS Management

sudo sysctl -w vm.swappiness=10

Set swappiness immediately without reboot

The -w flag writes a kernel parameter live: vm.swappiness=10 tells the kernel to prefer RAM and swap less aggressively, which helps latency-sensitive services. This change is temporary — it resets on reboot unless persisted in /etc/sysctl.conf. Check the current value with cat /proc/sys/vm/swappiness.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.