Site icon New Generation Enterprise Linux

Stop your server from getting lazy with memory reclamation

Performance Tuning & Kernel Parameters (Sysctl)

Stop your server from getting lazy with memory reclamation

đź§© The Challenge

Ever watched your server start thrashing disk while it still shows plenty of free RAM? I’ve spent way too many nights watching IO wait climb because the kernel was being way too conservative about clearing out its page cache.

đź’ˇ The Fix

You need to tune the vfs_cache_pressure parameter to nudge the kernel into letting go of dentries and inodes more aggressively. It turns a sluggish, swapping machine into something that actually uses its memory for useful work.

sysctl -w vm.vfs_cache_pressure=150

⚙️ Why It Works

Bumping this value above the default of 100 tells the kernel that those filesystem metadata objects aren’t as precious as the cache entries they’re crowding out. Adjust this in /etc/sysctl.conf if you want it to stick through a reboot.

🚀 Pro-Tip: Start by bumping it to 150, but don’t go crazy; setting it too high can actually cause performance hits because the system spends too much time constantly reloading metadata from the disk.

Linux Tips & Tricks | © ngelinux.com | 9/11/2026

0 0 votes
Article Rating
Exit mobile version