Bug 806238 - Unmatched the cpu usage from virt-top to task manager in the guest.
Unmatched the cpu usage from virt-top to task manager in the guest.
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-top (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
Depends On: 806235
  Show dependency treegraph
Reported: 2012-03-23 05:45 EDT by dyuan
Modified: 2012-08-14 04:04 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 806235
Last Closed: 2012-08-14 04:04:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description dyuan 2012-03-23 05:45:24 EDT
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):

How reproducible:

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 05:52:16 EDT
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-25 23:22:01 EDT
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'>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
    <type arch='x86_64' machine='rhel6.3.0'>hvm</type>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <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'/>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    <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'/>
    <serial type='pty'>
      <source path='/dev/pts/4'/>
      <target port='0'/>
      <alias name='serial0'/>
    <console type='pty' tty='/dev/pts/4'>
      <source path='/dev/pts/4'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    <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'/>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
  <seclabel type='dynamic' model='selinux' relabel='yes'>
Comment 3 Richard W.M. Jones 2012-08-10 09:10:46 EDT
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 04:04:08 EDT
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.