I would like to change the value of dirty_writeback_centisecs. After seeing the Tunables in Powertop, there seems to be a problem with the value which is 6000 which is considered to be bad by Powertop. It echoes the value to 1500. However, the change is not persistent.
I tried..
Setting vm.dirty_writeback_centisecs=1500 in the /etc/sysctl.confand also sys.vm.dirty_writeback_centisecs=1500 neither did work. Also, in /etc/sysctl.d/99-sysctl.conf which too didn't work.
The value is still 6000 on restart.
03 Answers
To make these settings permanent, on Debian you have to add these lines into /etc/sysctl.conf:
vm.dirty_writeback_centisecs = 1500 vm.dirty_expire_centisecs = 1500But if you have installed and enabled the tlp service for better power-management, then the above configurations are ignored, and you have to uncomment the following lines in /etc/defaults/tlp:
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=15 I guess, after changing the parameters in /etc/sysctl.conf with root privilege and saving and closing the file, sudo sysctl -p command will effect the change. Regards
Try putting
echo 1500 > /proc/sys/vm/dirty_expire_centisecs
echo 1500 > /proc/sys/vm/dirty_writeback_centisecsin /etc/rc.local
and then do
sudo systemctl enable rc-local.serviceto make it run at boot.
As an example, because of way too much RAM and good power-supply redundant security and reliability in a VPS somewhere, my /etc/rc.local currently has this in it:
#!/bin/bash
echo 1 > /proc/sys/vm/swappiness
echo 24 > /proc/sys/vm/vfs_cache_pressure
echo 99 > /proc/sys/vm/dirty_ratio
echo 50 > /proc/sys/vm/dirty_background_ratio
echo 12000 > /proc/sys/vm/dirty_expire_centisecs
echo 12000 > /proc/sys/vm/dirty_writeback_centisecs
(/bin/sleep 60 && /sbin/dhclient -cf /etc/dhcp/dhclient6.conf -6 &)
exit 0but I only recommend that to gain disk-IO if you have enough RAM and CPU.