Bug 1247688 - iops_max and iops can not work as expected
iops_max and iops can not work as expected
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.1
All Linux
medium Severity high
: rc
: ---
Assigned To: Stefan Hajnoczi
Virtualization Bugs
:
Depends On: 1150403
Blocks: 1146755 1247830
  Show dependency treegraph
 
Reported: 2015-07-28 11:36 EDT by Ademar Reis
Modified: 2015-07-29 09:55 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1150403
Environment:
Last Closed: 2015-07-29 09:55:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ademar Reis 2015-07-28 11:36:54 EDT
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.
Comment 2 Stefan Hajnoczi 2015-07-29 09:55:39 EDT
RHEL7 qemu-kvm has an older I/O throttling implementation which does not support the "bps_max" parameter.  This bug does not apply.

Note You need to log in before you can comment on or make changes to this bug.