Skip to contentSkip to conversation

how qemu do io throttling?

Qemu-devel yue 2 participants 2 messages Jun 28, 2014

lore
Share & tools
lore

yue

author
#0 lore raw

hi ,all
i now know there are 2 ways to implement io throttling,
one is cgroup, but it is only targeted at block device.
another is qemu itself.
i want to know the theory how qemu itself do io throttling? and in that case if it depends on the type of back storage(nfs,file,rbd, other posix fs)? it better tell me where is the code .

thanks

#1 lore raw
Quoted 4 lines · yue

hi ,all
i now know there are 2 ways to implement io throttling, one is cgroup, but it is only targeted at block device. another is qemu itself.

cgroups are done at the host (Linux only) kernel level. So anything that doesn't go through the host block layer (filesystems, block devices, etc.) doesn't get accounted for.

Quoted 3 lines

i want to know the theory how qemu itself do io throttling? and in that case if it depends on the type of back storage(nfs,file,rbd, other posix fs)? it better tell me where is the code .

I don't know where exactly the code is, but it's in Qemu's own block layer. Which means it works with any block backend that Qemu supports. Both kernel space and user space. File backed, block backed, network backed, etc. That is one of the main reasons it was written in the first place.

Quoted 3 lines

thanks