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 1131788 - blkdeviotune should can be used in session mode
Summary: blkdeviotune should can be used in session mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: All
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-20 05:21 UTC by Luyao Huang
Modified: 2015-03-05 07:42 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.2.8-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:42:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Luyao Huang 2014-08-20 05:21:29 UTC
Description of problem:
blkdeviotune should can be used in session mode

Version-Release number of selected component (if applicable):
libvirt-1.2.7-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
$ virsh uri
qemu:///session


$ virsh blkdeviotune sdsd hda 1
error: Unable to change block I/O throttle
error: unsupported configuration: Block I/O tuning is not available in session mode


Actual results:
blkdeviotune can't be used in session mode in RHEL7

Expected results:
blkdeviotune can be used in session mode

Additional info:

Comment 2 Martin Kletzander 2014-08-20 05:29:47 UTC
Fixed upstream with v1.2.7-157-g7d9def2:

commit 7d9def2ec1afaf50ec680f2aadfe359cb1ba5b80
Author: Martin Kletzander <mkletzan>
Date:   Fri Aug 15 14:35:53 2014 +0200

    qemu: allow device block I/O tuning in session mode

Comment 4 zhengqin 2014-09-15 05:15:08 UTC
Although there is an bug https://bugzilla.redhat.com/show_bug.cgi?id=927369 to block to verify this issue, from the bug 927369, there is a workround by creating directory "$HOME/.cache/libvirt"


Verify this issue with this workaround and build libvirt-1.2.8-2.el7.x86_64:

[test@rhel7-a1 ~]$  virsh blkdeviotune rhel6 hda 2

[test@rhel7-a1 ~]$  virsh blkdeviotune rhel6 hda 
total_bytes_sec: 2
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

[test@rhel7-a1 ~]$  virsh blkdeviotune rhel6 hda 3

[test@rhel7-a1 ~]$  virsh blkdeviotune rhel6 hda 
total_bytes_sec: 3
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

Comment 5 Pei Zhang 2014-10-17 03:44:42 UTC
Verify vision:
kernel-3.10.0-188.el7.x86_64
qemu-kvm-rhev-2.1.2-3.el7.x86_64
libvirt-1.2.8-5.el7.x86_64

steps:

1.
add a user and switch to user mode.
[test@184 images]$ virsh uri
qemu:///session

2.
using blkdeviotune query a block device I/O tuning parameters
[test@184 images]$ virsh blkdeviotune rhel7 vda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

3.
using blkdeviotune set a block device I/O tuning parameters
[test@184 images]$ virsh blkdeviotune rhel7 vda 5

[test@184 images]$ virsh blkdeviotune rhel7 vda
total_bytes_sec: 5
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

4.
set --total-bytes-sec
[test@184 images]$ virsh blkdeviotune r7new hda --total-bytes-sec 100

[test@184 images]$ virsh blkdeviotune r7new hda 
total_bytes_sec: 100
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 100

set --read-bytes-sec
[test@184 images]$ virsh blkdeviotune r7new hda --read-bytes-sec 200

[test@184 images]$ virsh blkdeviotune r7new hda 
total_bytes_sec: 0
read_bytes_sec : 200
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

set --write-bytes-sec
[test@184 images]$ virsh blkdeviotune r7new hda --write-bytes-sec 300

[test@184 images]$ virsh blkdeviotune r7new hda 
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 300
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

set --total-iops-sec
[test@184 images]$ virsh blkdeviotune r7new hda --total-iops-sec 400

[test@184 images]$ virsh blkdeviotune r7new hda 
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 300
total_iops_sec : 400
read_iops_sec  : 0
write_iops_sec : 0

set --read-iops-sec
[test@184 images]$ virsh blkdeviotune r7new hda --read-iops-sec 500

[test@184 images]$ virsh blkdeviotune r7new hda 
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 300
total_iops_sec : 0
read_iops_sec  : 500
write_iops_sec : 0

set --write-iops-sec
[test@184 images]$ virsh blkdeviotune r7new hda --write-iops-sec 600

[test@184 images]$ virsh blkdeviotune r7new hda 
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 300
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 600

5.
using blkdeviotune set a block device I/O tuning parameters with options

--config
[test@184 images]$ virsh blkdeviotune rhel7 vda 3 --config

[test@184 images]$ virsh blkdeviotune rhel7 vda
total_bytes_sec: 5
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

[test@184 images]$ virsh destroy rhel7 ; virsh start rhel7
Domain rhel7 destroyed

Domain rhel7 started

[test@184 images]$ virsh blkdeviotune rhel7 vda
total_bytes_sec: 3               ------- reboot guest , this parameter was set.
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0


--live
[test@184 images]$ virsh blkdeviotune r7new hda --write-iops-sec 500 --live

[test@184 images]$ virsh blkdeviotune r7new hda
total_bytes_sec: 100
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 500
 
--current (domain is running)
[test@184 images]$ virsh blkdeviotune r7new hda --read-bytes-sec 900 --current

[test@184 images]$ virsh blkdeviotune r7new hda
total_bytes_sec: 0
read_bytes_sec : 900   ----900 was set
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 500

--current (domain is shut off)
[test@184 images]$ virsh blkdeviotune r7new hda --write-bytes-sec 400 --current

[test@184 images]$ virsh start r7new
Domain r7new started

[test@184 images]$ virsh blkdeviotune r7new hda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 400    ----400 was set
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 100


6.
check setting only one value  resets the other two in that category to unlimited.
[test@184 images]$ virsh blkdeviotune rhel7 vda  --read-bytes-sec 10 --write-bytes-sec 20

[test@184 images]$ virsh blkdeviotune rhel7 vda
total_bytes_sec: 0     ----- total was reset to 0
read_bytes_sec : 10    -----read was set
write_bytes_sec: 20    -----write was set
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

7.
check Bytes and iops values are independent
[test@184 images]$ virsh blkdeviotune rhel7 vda  --read-bytes-sec 10 --write-iops-sec 10
[test@184 images]$ virsh blkdeviotune rhel7 vda
total_bytes_sec: 0
read_bytes_sec : 10
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 10

8.
negative testing

--check total_bytes_sec cannot appear with read_bytes_sec or write_bytes_sec.

[test@184 images]$ virsh blkdeviotune rhel7 vda --config --live --read-bytes-sec 10 --total-bytes-sec 1
error: Unable to change block I/O throttle
error: invalid argument: total and read/write of bytes_sec cannot be set at the same time

--check check total_iops_sec cannot appear with read_iops_sec or write_iops_sec.

[test@184 images]$ virsh blkdeviotune rhel7 vda --live --read-bytes-sec 10 --write-bytes-sec 30 --total-iops-sec 1 --read-iops-sec 10
error: Unable to change block I/O throttle
error: invalid argument: total and read/write of iops_sec cannot be set at the same time

Comment 7 errata-xmlrpc 2015-03-05 07:42:44 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/RHSA-2015-0323.html


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