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 1115898 - [RFE] Add events for cputune and iotune change
Summary: [RFE] Add events for cputune and iotune change
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1199002 (view as bug list)
Depends On: 1114492
Blocks: 1115887
TreeView+ depends on / blocked
 
Reported: 2014-07-03 09:57 UTC by Martin Sivák
Modified: 2015-03-09 13:29 UTC (History)
16 users (show)

Fixed In Version: libvirt-1.2.8-4.el7
Doc Type: Enhancement
Doc Text:
Feature: Emit events for tunable values of running domain. So far only cputune and blkdeviotune are implemented. Reason: Some controlling applications wants to know about changes of tunable values. By introducing this feature they don't have to parse the domain status XML in a loop to view those updates. Result: There is a new API that can be used to register an user callback. The callback will be triggered every time when there is an update of tunable values for specified running domain. Also "virsh event" has been updated to support this new event.
Clone Of: 1114492
Environment:
Last Closed: 2015-03-05 07:40: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 Martin Sivák 2014-07-03 09:57:13 UTC
+++ This bug was initially created as a clone of Bug #1114492 +++

Description of problem:

When multiple processes cooperate while managing a KVM/libvirt based virtual setup, they have to poll for changes in CPU and IO QoS settings.

Please add events so the processes (host manager and qos manager) can get the changed information in more efficient way.


This might apply to other values as well, but CPU and IO are the subsystems we care about the most at this time.

--- Additional comment from Cole Robinson on 2014-07-02 10:04:48 EDT ---

Moving to the upstream tracker.

Martin, if this is important to ovirt, I'd recommend filing a RHEL bug as well so resources are actually allocated as needed.

Comment 4 Luyao Huang 2014-11-07 03:34:54 UTC
Test with libvirt-1.2.8-6.el7:

1. open 1st terminal and run:
# virsh event --list
lifecycle
reboot
rtc-change
watchdog
io-error
graphics
io-error-reason
control-error
block-job
disk-change
tray-change
pm-wakeup
pm-suspend
balloon-change
pm-suspend-disk
device-removed
block-job-2
tunable


# valgrind --leak-check=full virsh event --loop --event tunable
==23842== Memcheck, a memory error detector
==23842== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==23842== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==23842== Command: virsh event --loop --event tunable
==23842== 


2,open 2nd terminal and run:

# virsh schedinfo r6
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

# virsh schedinfo r6 --set vcpu_period=111111
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 111111
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

# virsh schedinfo r6 --set cpu_shares=0
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 111111
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

# virsh schedinfo r6 --set vcpu_quota=-1
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 111111
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

# virsh schedinfo r6 --set vcpu_quota=-2
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 111111
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

# virsh schedinfo r6 --set vcpu_quota=18446744073709551
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 111111
vcpu_quota     : 18446744073709551
emulator_period: 100000
emulator_quota : -1

# virsh schedinfo r6 --set vcpu_quota=-1
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 111111
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

# virsh schedinfo r6 --set emulator_period=12345
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 111111
vcpu_quota     : -1
emulator_period: 12345
emulator_quota : -1

# virsh schedinfo r6 --set emulator_quota=12345
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 111111
vcpu_quota     : -1
emulator_period: 12345
emulator_quota : 12345

#virsh vcpupin r6 1 3



3. on the first terminal:

==23842== Memcheck, a memory error detector
==23842== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==23842== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==23842== Command: virsh event --loop --event tunable
==23842== 


event 'tunable' for domain r6:
	cputune.vcpu_period: 111111
event 'tunable' for domain r6:
	cputune.cpu_shares: 2
event 'tunable' for domain r6:
	cputune.vcpu_quota: -1
event 'tunable' for domain r6:
	cputune.vcpu_quota: -2
event 'tunable' for domain r6:
	cputune.vcpu_quota: 18446744073709551
event 'tunable' for domain r6:
	cputune.vcpu_quota: -1
event 'tunable' for domain r6:
	cputune.emulator_period: 12345
event 'tunable' for domain r6:
	cputune.emulator_quota: 12345
event 'tunable' for domain r6:
	cputune.vcpupin1: 3

Comment 5 Luyao Huang 2014-11-07 03:45:12 UTC
S2:
For blkdeviotune

1.open 1st terminal and run:
# valgrind --leak-check=full virsh event --loop --event tunable
==23842== Memcheck, a memory error detector
==23842== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==23842== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==23842== Command: virsh event --loop --event tunable
==23842== 

2.open 2nd terminal and run:
# virsh blkdeviotune r6 hda --total-bytes-sec  123

# virsh blkdeviotune r6 hda --read-bytes-sec 234

# virsh blkdeviotune r6 hda --write-bytes-sec 1234

# virsh blkdeviotune r6 hda --total-iops-sec 123

# virsh blkdeviotune r6 hda --read-iops-sec 123456

# virsh blkdeviotune r6 hda --write-iops-sec 123


3.on the first terminal:

event 'tunable' for domain r6:
	blkdeviotune.disk: hda
	blkdeviotune.total_bytes_sec: 123
event 'tunable' for domain r6:
	blkdeviotune.disk: hda
	blkdeviotune.read_bytes_sec: 234
event 'tunable' for domain r6:
	blkdeviotune.disk: hda
	blkdeviotune.write_bytes_sec: 1234
event 'tunable' for domain r6:
	blkdeviotune.disk: hda
	blkdeviotune.total_iops_sec: 123
event 'tunable' for domain r6:
	blkdeviotune.disk: hda
	blkdeviotune.read_iops_sec: 123456
event 'tunable' for domain r6:
	blkdeviotune.disk: hda
	blkdeviotune.write_iops_sec: 123

Comment 6 Luyao Huang 2014-12-11 09:20:39 UTC
Verify this bug with the steps in comment 4 and comment 5.

Comment 8 errata-xmlrpc 2015-03-05 07:40: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

Comment 9 Peter Krempa 2015-03-09 13:29:50 UTC
*** Bug 1199002 has been marked as a duplicate of this bug. ***


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