RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1353801 - The default io throttling group name is null, which makes all throttled disks with a default group name in the same group
Summary: The default io throttling group name is null, which makes all throttled disks...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Stefan Hajnoczi
QA Contact: Gu Nini
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-08 03:33 UTC by Gu Nini
Modified: 2016-11-07 21:22 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-rhev-2.6.0-14.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 21:22:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2673 0 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2016-11-08 01:06:13 UTC

Description Gu Nini 2016-07-08 03:33:35 UTC
Description of problem:
On current qemu-kvm-rhev version, the default io throttling group name is null, which makes all disks under io throttling but without a group name in the same group, which might be not intended.


And in docs/throttle.txt of the qemu-kvm code, there is following introduction:

Applying I/O limits to groups of disks
--------------------------------------
......
If this parameter is not specified, then the device name (i.e. 'virtio0', 'ide0-hd0') will be used as the group name.
......
 

Version-Release number of selected component (if applicable):
kernel: 3.10.0-458.el7.x86_64
qemu-kvm-rhev: qemu-kvm-rhev-2.6.0-11.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Boot a guest with 2 disks under different io throttling parameters, but without group names:

/usr/libexec/qemu-kvm -name rhel7.3 -enable-kvm -m 4G -smp 4 -uuid ae361e8d-288b-4e70-8783-bda0d450ce39 -nodefconfig --nodefaults -rtc base=utc,clock=vm -boot order=cd,menu=on -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=03 -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=/home/kvm_autotest_root/images/RHEL-Server-7.3-64-virtio-scsi.qcow2 -device scsi-hd,id=image1,drive=drive_image1,bootindex=0 -device nec-usb-xhci,id=xhci -vnc 0.0.0.0:15 -monitor stdio -netdev tap,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:5a:30:2e:62,bus=pci.0,addr=0x7 -vga std -device usb-tablet,id=tablet0 -object rng-random,id=rng0,filename=/dev/random -device virtio-rng-pci,rng=rng0,id=rng0 -drive id=drive_image2,if=none,cache=none,snapshot=off,aio=native,format=raw,file=/home/image1,bps=10240,bps_max=102400,iops=100,throttling.bps-total-max-length=2 -device virtio-blk-pci,id=image2,drive=drive_image2,bus=pci.0,addr=10 -drive id=drive_image3,if=none,cache=none,snapshot=off,aio=native,format=raw,file=/home/image2,bps=2048,bps_max=204800,iops=200,throttling.bps-total-max-length=4 -device virtio-blk-pci,id=image3,drive=drive_image3,bus=pci.0,addr=09 -chardev socket,id=qmpmonitor1,path=/tmp/monitor11,server,nowait -mon chardev=qmpmonitor1,mode=control

2. Check blocks info in hmp and qmp:
# (qemu) info block
drive_image1 (#block199): /home/kvm_autotest_root/images/RHEL-Server-7.3-64-virtio-scsi.qcow2 (qcow2)
    Cache mode:       writeback, direct

drive_image2 (#block397): /home/image1 (raw)
    Cache mode:       writethrough, direct
    I/O throttling:   bps=2048 bps_rd=0 bps_wr=0 bps_max=204800 bps_rd_max=0 bps_wr_max=0 iops=200 iops_rd=0 iops_wr=0 iops_max=20 iops_rd_max=0 iops_wr_max=0 iops_size=0 group=

drive_image3 (#block545): /home/image2 (raw)
    Cache mode:       writethrough, direct
    I/O throttling:   bps=2048 bps_rd=0 bps_wr=0 bps_max=204800 bps_rd_max=0 bps_wr_max=0 iops=200 iops_rd=0 iops_wr=0 iops_max=20 iops_rd_max=0 iops_wr_max=0 iops_size=0 group=

# nc -U /tmp/monitor11
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 6, "major": 2}, "package": " (qemu-kvm-rhev-2.6.0-11.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"query-block"}
{"return": [{"io-status": "ok", "device": "drive_image1", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"virtual-size": 21474836480, "filename": "/home/kvm_autotest_root/images/RHEL-Server-7.3-64-virtio-scsi.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 5543170048, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false, "refcount-bits": 16, "corrupt": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "node-name": "#block199", "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "write_threshold": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "cache": {"no-flush": false, "direct": true, "writeback": true}, "file": "/home/kvm_autotest_root/images/RHEL-Server-7.3-64-virtio-scsi.qcow2", "encryption_key_missing": false}, "type": "unknown"}, {"io-status": "ok", "device": "drive_image2", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "iops_max_length": 1, "bps_max_length": 4, "image": {"virtual-size": 21474836480, "filename": "/home/image1", "format": "raw", "actual-size": 0, "dirty-flag": false}, "iops_wr": 0, "group": "", "ro": false, "node-name": "#block397", "backing_file_depth": 0, "drv": "raw", "bps_max": 204800, "iops": 200, "bps_wr": 0, "write_threshold": 0, "encrypted": false, "bps": 2048, "bps_rd": 0, "cache": {"no-flush": false, "direct": true, "writeback": true}, "iops_max": 20, "file": "/home/image1", "encryption_key_missing": false}, "type": "unknown"}, {"io-status": "ok", "device": "drive_image3", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "iops_max_length": 1, "bps_max_length": 4, "image": {"virtual-size": 21474836480, "filename": "/home/image2", "format": "raw", "actual-size": 0, "dirty-flag": false}, "iops_wr": 0, "group": "", "ro": false, "node-name": "#block545", "backing_file_depth": 0, "drv": "raw", "bps_max": 204800, "iops": 200, "bps_wr": 0, "write_threshold": 0, "encrypted": false, "bps": 2048, "bps_rd": 0, "cache": {"no-flush": false, "direct": true, "writeback": true}, "iops_max": 20, "file": "/home/image2", "encryption_key_missing": false}, "type": "unknown"}]}


Actual results:
In step2, the group names of both disks are null, and both disks use the same io throttling parameters, i.e. drive_image2 use the ones of drive_image3; so both disks are treated in the same null group.

Expected results:
drive_image2 and drive_image3 should be in different groups

Additional info:

Comment 2 Gu Nini 2016-07-08 06:50:43 UTC
It's found if set io throttling with following qmp cmd, the disk would be auto assigned a group name as its id, i.e. it's 'stick' in following example.
 
{"execute":"block_set_io_throttle","arguments":{"device":"stick","bps":0,"bps_rd":0,"bps_wr":100,"iops":100,"iops_rd":0,"iops_wr":0,"bps_wr_max":1000,"bps_wr_max_length":20}}


However, BOTH booting up the guest with io throttling parameters but without group name AND hotadding a disk in qmp cmd with io throttling parameters while without group name has the bug issue.

Comment 3 Miroslav Rezanina 2016-07-19 08:50:41 UTC
Fix included in qemu-kvm-rhev-2.6.0-14.el7

Comment 5 Gu Nini 2016-07-22 09:12:55 UTC
Verify the bug on following sw versions:

Host Kernel: 3.10.0-470.el7.x86_64
Qemu-kvm-rhev: qemu-kvm-rhev-2.6.0-14.el7.x86_64



Now the default io throttling group name is the device name:

(qemu) info block
drive_image1 (#block131): /usr/share/avocado/data/avocado-vt/images/win2016-64-virtio-scsi.qcow2 (qcow2)
    Cache mode:       writeback, direct

drive_image2 (#block318): /home/disk1 (raw)
    Cache mode:       writeback, direct
    I/O throttling:   bps=2048 bps_rd=0 bps_wr=0 bps_max=204800 bps_rd_max=0 bps_wr_max=0 iops=200 iops_rd=0 iops_wr=0 iops_max=20 iops_rd_max=0 iops_wr_max=0 iops_size=0 group=drive_image2

drive_image3 (#block577): /home/disk2 (qcow2)
    Cache mode:       writeback, direct
    I/O throttling:   bps=1024 bps_rd=0 bps_wr=0 bps_max=102 bps_rd_max=0 bps_wr_max=0 iops=0 iops_rd=0 iops_wr=0 iops_max=0 iops_rd_max=0 iops_wr_max=0 iops_size=0 group=drive_image3


# nc -U /var/tmp/avocado_2
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 6, "major": 2}, "package": " (qemu-kvm-rhev-2.6.0-14.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"block_set_io_throttle","arguments":{"device":"drive_image2","bps":0,"bps_rd":0,"bps_wr":102400,"iops":0,"iops_rd":0,"iops_wr":0,"bps_wr_max":1024000,"bps_wr_max_length":2}}
{"return": {}}
{"execute":"query-block"}
{"return": [{"io-status": "ok", "device": "drive_image1", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"virtual-size": 32212254720, "filename": "/usr/share/avocado/data/avocado-vt/images/win2016-64-virtio-scsi.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 11073429504, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false, "refcount-bits": 16, "corrupt": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "node-name": "#block131", "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "write_threshold": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "cache": {"no-flush": false, "direct": true, "writeback": true}, "file": "/usr/share/avocado/data/avocado-vt/images/win2016-64-virtio-scsi.qcow2", "encryption_key_missing": false}, "type": "unknown"}, {"io-status": "ok", "device": "drive_image2", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"virtual-size": 1073741824, "filename": "/home/disk1", "format": "raw", "actual-size": 4096, "dirty-flag": false}, "iops_wr": 0, "group": "drive_image2", "ro": false, "node-name": "#block318", "bps_wr_max_length": 2, "backing_file_depth": 0, "bps_wr_max": 1024000, "drv": "raw", "iops": 0, "bps_wr": 102400, "write_threshold": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "cache": {"no-flush": false, "direct": true, "writeback": true}, "file": "/home/disk1", "encryption_key_missing": false}, "type": "unknown"}, {"io-status": "ok", "device": "drive_image3", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "bps_max_length": 1, "image": {"virtual-size": 2147483648, "filename": "/home/disk2", "cluster-size": 65536, "format": "qcow2", "actual-size": 462848, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false, "refcount-bits": 16, "corrupt": false}}, "dirty-flag": false}, "iops_wr": 0, "group": "drive_image3", "ro": false, "node-name": "#block577", "backing_file_depth": 0, "drv": "qcow2", "bps_max": 102, "iops": 0, "bps_wr": 0, "write_threshold": 0, "encrypted": false, "bps": 1024, "bps_rd": 0, "cache": {"no-flush": false, "direct": true, "writeback": true}, "file": "/home/disk2", "encryption_key_missing": false}, "type": "unknown"}]}

Comment 7 errata-xmlrpc 2016-11-07 21:22:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2673.html


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