Tuning write cache - dirty_ratio etc


I have trobule setting permanently write cache paremeters, such as:


I can change them by editing “files” in /proc/sys/vm, (and it of course works) but permanent changes are impossible.
editing /etc/sysctl.conf has no effect - something “overwrites” my settings.

I managed to setup it on boot using delayed custom script, but they fallback to defaults as soon as I hibernate my machine.

Any ideas?

I’ve just found following solution, I will test it later and report back.
But please post your ideas too, as I’m afraid this won’t work :slight_smile:

To increase these values, create a file /etc/sysctl.d/dirty_ratio.conf with these contents:

vm.dirty_ratio = 40
vm.dirty_background_ratio = 15

Then with the command sysctl -p /etc/sysctl.d/dirty_ratio.conf you make these settings become in effect immediately.

I found the solution:

not executable

maybe someone will find it useful for maximizing I/O performance.

Topic closed

Did you solve it ?