🏗️ DevOps & Infrastructure

Ubuntu's Dirty Swap Secret: One Tweak to Unleash Your RAM

Your Ubuntu box has 32GB RAM, yet it lags switching tabs. Blame swappiness — Linux's stubborn love affair with disk swap. One sysctl command changes everything.

Ubuntu terminal outputting sysctl vm.swappiness=10 with low swap usage stats

⚡ Key Takeaways

  • Lower swappiness to 10 to prioritize RAM over swap, slashing lag on Ubuntu workstations. 𝕏
  • Default 60 is a relic from low-RAM eras; tune for modern SSDs and dev workloads. 𝕏
  • Temporary: `sudo sysctl vm.swappiness=10`; permanent via `/etc/sysctl.conf`. 𝕏
Published by

theAIcatchup

Community-driven. Code-first.

Worth sharing?

Get the best Open Source stories of the week in your inbox — no noise, no spam.

Originally reported by Dev.to

Stay in the loop

The week's most important stories from theAIcatchup, delivered once a week.