Red Hat Bugzilla – Bug 1115898
[RFE] Add events for cputune and iotune change
Last modified: 2015-03-09 09:29:50 EDT
+++ 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.
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
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
Verify this bug with the steps in comment 4 and comment 5.
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
*** Bug 1199002 has been marked as a duplicate of this bug. ***