Keep dirty pages in RAM for at least 30s

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
latency
Tyler Nijmeh 4 years ago
parent 53c4c49827
commit 4e1646a3c1

@ -95,7 +95,7 @@ Start writing back dirty pages (pages that have been modified but not yet writte
### vm.dirty_ratio: 20 --> 30
This tunable is the same as the former, but it is the ceiling for **synchronous** dirty writeback, meaning all I/O will stall until all dirty pages are written out to the disk. We usually won't need to worry about hitting this value, as the background writeback can catch up before we reach 20% memory dirtied. But as a precaution (i.e. heavy file transfers), increase this value to a 30% ceiling to prevent visible system stalls. We are sacrificing available memory in exchange for a reduced change of a brief system stall.
### vm.dirty_expire_centisecs: 300 (3s) --> 1000 (10s)
### vm.dirty_expire_centisecs: 300 (3s) --> 3000 (30s)
This is the longest that dirty pages can remain in the system before they are forcefully written out to the disk. By increasing this value, we can allow the dirty background writeback to take its time asynchronously, and avoid unnecessary writebacks that can clog the flusher thread.
### vm.dirty_writeback_centisecs: 500 (5s) --> 3000 (30s)

@ -140,7 +140,7 @@ write /proc/sys/kernel/sched_schedstats 0
# VM
write /proc/sys/vm/dirty_background_ratio 10
write /proc/sys/vm/dirty_ratio 30
write /proc/sys/vm/dirty_expire_centisecs 1000
write /proc/sys/vm/dirty_expire_centisecs 3000
write /proc/sys/vm/dirty_writeback_centisecs 3000
write /proc/sys/vm/page-cluster 0
write /proc/sys/vm/reap_mem_on_sigkill 1

Loading…
Cancel
Save