yukra-ThinkPad-Edge-E330 ~ # sysctl -a | grep dirty
vm.dirty_background_bytes = 0
vm.dirty_background_ratio = 10
vm.dirty_bytes = 0
vm.dirty_expire_centisecs = 3000
vm.dirty_ratio = 20
vm.dirty_writeback_centisecs = 500
vm.dirtytime_expire_seconds = 43200
yukra-ThinkPad-Edge-E330 ~ # echo 4194304 > /proc/sys/vm/dirty_bytes
yukra-ThinkPad-Edge-E330 ~ # sysctl -a | grep dirty
vm.dirty_background_bytes = 0
vm.dirty_background_ratio = 10
vm.dirty_bytes = 4194304
vm.dirty_expire_centisecs = 3000
vm.dirty_ratio = 0
vm.dirty_writeback_centisecs = 500
vm.dirtytime_expire_seconds = 43200
yukra-ThinkPad-Edge-E330 ~ # echo 20 > /proc/sys/vm/dirty_ratio
yukra-ThinkPad-Edge-E330 ~ # sysctl -a | grep dirty
vm.dirty_background_bytes = 0
vm.dirty_background_ratio = 10
vm.dirty_bytes = 0
vm.dirty_expire_centisecs = 3000
vm.dirty_ratio = 20
vm.dirty_writeback_centisecs = 500
vm.dirtytime_expire_seconds = 43200
yukra-ThinkPad-Edge-E330 ~ #
У вас в примере vm.dirty_background_bytes и vm.dirty_bytes постоянно меняют значение - эти значения выставляются 1 раз и не меняются ядром автоматически.
To influence the management of page cache on the Linux server, tuning the parameters vm.dirty_ratio and vm.dirty_background_ratio is important. A good starting point is usually to set vm.dirty_ratio:10 and vm.dirty_background_ratio:5.
dirty_ratio
Defines a percentage value. Writeout of dirty data begins (via pdflush) when dirty data comprises this percentage of total system memory. The default value is 20.
Red Hat recommends a slightly lower value of 15 for database workloads.
dirty_background_ratio
Defines a percentage value. Writeout of dirty data begins in the background (via pdflush) when dirty data comprises this percentage of total memory. The default value is 10. For database workloads, Red Hat recommends a lower value of 3.
Если так, то как лучше вычислять скорость запись на диск?
В большинстве случаев важна скорость случайной записи - верно?
Как вы вычисляете vm.dirty_background_bytes и vm.dirty_bytes (на установленном Linux - без переустановки)?
sysctl -a | grep vm.dirty