Clonning from -rhev package, as I/O throttling appears to be enabled in the vanilla qemu-kvm package as well in RHEL7.
+++ This bug was initially created as a clone of Bug #1150403 +++
Description of problem:
When boot guest with "iops_max=10000,iops=100", throttling can not be triggered once "I/O pool" is empty.
Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.1.0-5.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1.boot guest with following cli:
# /usr/libexec/qemu-kvm -M pc -m 2G -smp 2 -spice port=5931,disable-ticketing -monitor stdio -qmp tcp::8888,server,nowait \
-drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=img,snapshot=on,bps_max=1024000000 \
-device virtio-blk-pci,drive=img,id=sys-img \
-netdev tap,id=tap0,script=/etc/qemu-ifup \
-device virtio-net-pci,netdev=tap0,id=net0,mac=24:be:05:11:15:11 \
-drive file=/home/data.qcow2,if=none,id=disk0,iops_max=10000,iops=100,cache=none \
-device virtio-blk-pci,drive=disk0,id=sys-disk0
2.do testing inside guest using fio.
# fio --filename=/dev/vdb --direct=1 --rw=randwrite --bs=64k --size=1000M --name=test --iodepth=1 --ioengine=libaio --runtime=60s
3.repeat step 2 after step 2 finished.
Actual results:
###After step 2, got results as followings:
...
write: io=994.77MB, bw=16976KB/s, iops=265, runt= 60005msec
...
Here: 265*60 > 10000.
###After step 3, got following results:
...
write: io=567040KB, bw=9450.4KB/s, iops=147, runt= 60002msec
...
Expected results:
After step 3, should got the value of iops <= 100. Not "iops=147".
Additional info:
--- Additional comment from Gu Nini on 2015-03-12 04:56:02 BRT ---
The bug also occurred under power KVM, the detailed software versions are as follows:
Host kernel: 3.10.0-229.el7.ppc64
Qemu KVM:
qemu-kvm-common-rhev-2.2.0-5.el7.ppc64
qemu-kvm-tools-rhev-2.2.0-5.el7.ppc64
qemu-img-rhev-2.2.0-5.el7.ppc64
qemu-kvm-rhev-2.2.0-5.el7.ppc64
qemu-kvm-rhev-debuginfo-2.2.0-5.el7.ppc64
That's the combined options iops and iops_max, bps and bps_max, iops_rd and iops_rd_max, iops_wr and iops_wr_max, bps_rd and bps_rd_max, bps_wr and bps_wr_max, could not work as expected as that in the bug.
Also change the 'Hardware' field to 'All' since it exists on both x86_64 and ppc64.