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 1165580 - blkiotune value should be consistent with value in cgroup
Summary: blkiotune value should be consistent with value in cgroup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-19 09:28 UTC by Pei Zhang
Modified: 2015-11-19 05:56 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.17-7.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:56:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Pei Zhang 2014-11-19 09:28:47 UTC
Description of problem:
a maximum value can be set by blkiotune , but can not be checked in cgroup.

Version-Release number of selected component (if applicable):
kernel-3.10.0-203.el7.x86_64
qemu-kvm-rhev-2.1.2-8.el7.x86_64
libvirt-1.2.8-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
# virsh list 
 Id    Name                           State
----------------------------------------------------
 29    r7                             running

1> for device_read/write_iops_sec , set value=4294967295 , set successfully. but can not be checked in cgroup.

1.1> set the value and check using blkiotune command

# virsh blkiotune r7 --device-read-iops-sec /dev/sda,4294967295 --device-write-iops-sec /dev/sda,4294967295

[root@184 ~]# virsh blkiotune r7
weight         : 500
device_weight  : 
device_read_iops_sec: /dev/sda,4294967295
device_write_iops_sec: /dev/sda,4294967295
device_read_bytes_sec: 
device_write_bytes_sec: 

1.2> check the value in the cgroup , it has nothing
# cat /sys/fs/cgroup/blkio/machine.slice/machine-qemu\\x2dr7.scope/blkio.throttle.read_iops_device 

# cat /sys/fs/cgroup/blkio/machine.slice/machine-qemu\\x2dr7.scope/blkio.throttle.write_iops_device 

2> for device_read/write_bytes_sec , set value= 18446744073709551615, set successfully. but can not be checked in cgroup.

2.1> set the value and check using blkiotune command

# virsh blkiotune r7 --device-read-bytes-sec /dev/sda,18446744073709551615 --device-write-bytes-sec /dev/sda,18446744073709551615 

# virsh blkiotune r7
weight         : 500
device_weight  : 
device_read_iops_sec: /dev/sda,4294967295
device_write_iops_sec: /dev/sda,4294967295
device_read_bytes_sec: /dev/sda,18446744073709551615
device_write_bytes_sec: /dev/sda,18446744073709551615

2.2> check the value in cgroup , it has nothing
# cat /sys/fs/cgroup/blkio/machine.slice/machine-qemu\\x2dr7.scope/blkio.throttle.read_bps_device 
# cat /sys/fs/cgroup/blkio/machine.slice/machine-qemu\\x2dr7.scope/blkio.throttle.write_bps_device 
 
3>check domain XML , it has the value .
# virsh dumpxml r7 | grep blkiotune -A 8
  <blkiotune>
    <device>
      <path>/dev/sda</path>
      <read_iops_sec>4294967295</read_iops_sec>
      <write_iops_sec>4294967295</write_iops_sec>
      <read_bytes_sec>18446744073709551615</read_bytes_sec>
      <write_bytes_sec>18446744073709551615</write_bytes_sec>
    </device>
  </blkiotune>


Actual results:
As above , the value can be set by blkiotune and set successfully in the domain XML , but it has nothing in cgroup.

Expected results:
the value set by blkiotune can be checked in cgroup.

Additional info:

Comment 1 Martin Kletzander 2015-08-03 14:57:05 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2015-August/msg00065.html

Comment 4 Pei Zhang 2015-09-11 09:25:22 UTC
Verified version:
libvirt-1.2.17-8.el7.x86_64
qemu-kvm-rhev-2.3.0-22.el7.x86_64

verified steps:

1.define and start a guest, check blkiotune value.
# virsh blkiotune r72
weight         : 1000
device_weight  : 
device_read_iops_sec: 
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec: 

1.1. set a iops value that kernel accepts, but does not set them.

set the value 
# virsh blkiotune r72 --device-read-iops-sec /dev/sdb,4294967295

get the value via blkiotune 
# virsh blkiotune r72
weight         : 1000
device_weight  : 
device_read_iops_sec: 
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec: 

check in cgroup, Nothing ouput 
# cat /sys/fs/cgroup/blkio/machine.slice/machine-qemu\\x2dr72.scope/blkio.throttle.read_iops_device 

check domian xml, Nothing output.
# virsh dumpxml r72 | grep blkiotune -A 3


1.2 set a normal value that kernel accpets and will set them in cgroup.

# virsh blkiotune r72 --device-read-iops-sec /dev/sdb,4294967294

check in cgroup
# cat /sys/fs/cgroup/blkio/machine.slice/machine-qemu\\x2dr72.scope/blkio.throttle.read_iops_device 
8:16 4294967294

check via blkiotune 

# virsh blkiotune r72
weight         : 1000
device_weight  : 
device_read_iops_sec: /dev/sdb,4294967294
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec: 

check in domian xml :
# virsh dumpxml r72 | grep blkiotune -A 3
  <blkiotune>
    <device>
      <path>/dev/sdb</path>
      <read_iops_sec>4294967294</read_iops_sec>
--
  </blkiotune>

2. set a bps value that kernel accepts, but does not set them.

# virsh blkiotune r72 --device-write-bytes-sec /dev/sdb,18446744073709551615

get the value via blkiotune 

# virsh blkiotune r72
weight         : 1000
device_weight  : 
device_read_iops_sec: 
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec: 

check in cgroup, Nothing ouput 
# cat /sys/fs/cgroup/blkio/machine.slice/machine-qemu\\x2dr72.scope/blkio.throttle.write_bps_device 

check domian xml, Nothing output.
# virsh dumpxml r72 | grep blkiotune -A 3


2.1 set a normal value that kernel accpets and will set them in cgroup.

# virsh blkiotune r72 --device-write-bytes-sec /dev/sdb,18446744073709551614

check in cgroup 

# cat /sys/fs/cgroup/blkio/machine.slice/machine-qemu\\x2dr72.scope/blkio.throttle.write_bps_device 
8:16 18446744073709551614

check via blkiotune 

# virsh blkiotune r72
weight         : 1000
device_weight  : 
device_read_iops_sec: 
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec: /dev/sdb,18446744073709551614

check in domain xml 
# virsh dumpxml r72 | grep blkiotune -A 5
  <blkiotune>
    <device>
      <path>/dev/sdb</path>
      <write_bytes_sec>18446744073709551614</write_bytes_sec>
    </device>
  </blkiotune>

Also tested with lxc using same steps as above.

Now the values set via blkiotune are in sync with cgroup. 

Move to verified.

Comment 6 errata-xmlrpc 2015-11-19 05:56:25 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-2015-2202.html


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