sysctl.si › Parameters › vm.dirty_background_ratio

vm.dirty_background_ratio

Percent of dirty memory at which background flushing begins.

Default
10
Typical value
3–5 on databases

When to change it

Start flushing earlier to avoid large bursts of disk writes. Keep it below vm.dirty_ratio.

Check the current value

sysctl vm.dirty_background_ratio

Change it until the next reboot

sudo sysctl -w vm.dirty_background_ratio=3

Make it permanent

echo "vm.dirty_background_ratio = 3" | sudo tee /etc/sysctl.d/99-custom.conf
sudo sysctl --system

Related parameters

vm.swappiness · vm.dirty_ratio · vm.overcommit_memory · vm.max_map_count · vm.min_free_kbytes · vm.nr_hugepages

Generate a full sysctl config for your server

Values are starting points. Test on a staging machine and measure before and after.