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 806238 - Unmatched the cpu usage from virt-top to task manager in the guest.
Summary: Unmatched the cpu usage from virt-top to task manager in the guest.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-top
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 806235
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-23 09:45 UTC by dyuan
Modified: 2012-08-14 08:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 806235
Environment:
Last Closed: 2012-08-14 08:04:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description dyuan 2012-03-23 09:45:24 UTC
virt-top should present the current state of guest.

+++ This bug was initially created as a clone of Bug #806235 +++

Description of problem:
In the guest, the cpu usage is 100% from task manager, but it's around 29% from virt-manager.
It's better to return "no respons" when the guest cpu usage reached 100% but not stay at 29%, or it will be confused for users.

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-10.el6.x86_64
virt-top-1.0.4-3.12.el6.x86_64
python-virtinst-0.600.0-7.el6.noarch
libvirt-0.9.10-6.el6

How reproducible:
always

Steps to Reproduce:
1. boot up a guest, xp-i386
2. open the IE browser, or issue other programme to occupy 100% cpu
3. track the cpu usage from task manager
  
Actual results:
unmatched cpu usage from the tools to the guest task manager.

Expected results:
Presents the current state of guest.

Additional info:

Comment 1 Richard W.M. Jones 2012-03-23 09:52:16 UTC
100% CPU in the guest could correspond to [25%] CPU in the host.
It depends on the number of physical CPUs in the host and the
number of virtual CPUs in the guest.

Please give some more details of the host, such as number of
physical CPUs.  Also please give the guest libvirt XML.

Comment 2 dyuan 2012-03-26 03:22:01 UTC
I have 4 cpus in the host, and 1 vcpu in guest.

As you said, I'll try to increase the vcpu num to 4 for the test.

# virsh dumpxml xp
<domain type='kvm' id='17'>
  <name>xp</name>
  <uuid>18585065-c348-1c4f-46b9-fdfee279543b</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='rhel6.3.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/winXP-32-virtio.qcow2'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:3a:5f:6c'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/4'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/4'>
      <source path='/dev/pts/4'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' port='5900' autoport='yes'/>
    <sound model='ich6'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </video>
    <video>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='selinux' relabel='yes'>
    <label>system_u:system_r:svirt_t:s0:c605,c770</label>
    <imagelabel>system_u:object_r:svirt_image_t:s0:c605,c770</imagelabel>
  </seclabel>
</domain>

Comment 3 Richard W.M. Jones 2012-08-10 13:10:46 UTC
Not clear what you're expecting to see.

If this is a real bug, clone it for Fedora and provide a
clear test case.

Also, it might be a problem in libvirt (which collects the
stats) rather than virt-top (which just displays them).

Comment 4 dyuan 2012-08-14 08:04:08 UTC
Close it as NOTABUG according to comment 1, and it's the expected result for virt-top.


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