Skip to contentSkip to conversation

Linux I/O scheduling - ionice & co

DISCUSSION [email protected] 2 participants 2 messages Apr 28, 2006

lore
Share & tools
lore
#0 lore raw

Hello experts!

Whenever I do large file operations on my VMware GSX Server (copying/backup operations on the HOST), all the VMs become dead slow, regardless what elevator i select at boot time.

what can I do that dedicated processes get higher preference regarding I/O ?

from this list i found, that in recent kernels we have cfq/ionice for this. is this rated "stable" and does it already work well?

maybe there are alternative approaches for this?

let me give another example:

if i start an I/O hog like "dd if=/dev/zero of=test.dat" the whole interactivity of a linux system is being influenced very negatively. i have found that working on a system running an I/O hog often becomes a real pain. if i start an CPU hog or syscall hog like "while true;do true;done" or "while /bin/true;do /bin/true;done" this never has such bad effects than starting an I/O hog.

is it possible to adress this by some more "fine-tuning" or is this just because of the "nature" of I/O scheduling ?

i would be happy if somebody could give a comment or share his experience about this.

TIA
roland k.
systems engineer

ps:
no comment about the behaviour of a windows system which is under high I/O load..... ;)

_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

#1 lore raw
Quoted 2 lines · On Saturday 29 April 2006 06:45, [email protected] wrote:

from this list i found, that in recent kernels we have cfq/ionice for this. is this rated "stable" and does it already work well?

cfq has builtin ionice support which is automatically linked to nice level unless you explicitly set ionice separately.

Quoted 6 lines

if i start an I/O hog like "dd if=/dev/zero of=test.dat" the whole interactivity of a linux system is being influenced very negatively. i have found that working on a system running an I/O hog often becomes a real pain. if i start an CPU hog or syscall hog like "while true;do true;done" or "while /bin/true;do /bin/true;done" this never has such bad effects than starting an I/O hog.

This is the problem. The ionice support is for reads only. Due to the complex path writes take to get to the io scheduler there is no ionice support for writes yes so they are all treated equally. Some work is being done in that area but nothing is concrete yet. Watch this space.

Quoted 2 lines

is it possible to adress this by some more "fine-tuning" or is this just because of the "nature" of I/O scheduling ?

You may be able to effectively throttle the writes by decreasing the amount of ram they can use up before writeout occurs but this is a complex process where throttling the writes may adversely affect the reads depending on what the task committing the writes is doing. The tunables are in /proc/sys/vm

dirty_background_ratio
is the percentage of ram that would be filled with write data before it starts committing writes to disk.

dirty_ratio
is the maximum percentage of ram filled and then all writes are throttled beyond that (the applications can't commit any more writes till the percentage drops enough again)

dirty_writeback_centisecs
how often it will check to see if data has been in ram too long and needs to be committed

dirty_expire_centisecs
how old the data can be maximum before being written

All of these have interdependencies and there are sanity checks in the kernel that ignore extreme values and rounds them back to other values.

Generally speaking, lowering these values tends to improve interactivity, but it is not an impressive improvement, and it happens at the expense of write throughput :)

Signature · 1 line
-ck