This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-bugs] [Bug 882] Cpu Usage Discrepancies on Xen


------- Comment #1 from pradeep.vincent@xxxxxxxxx  2007-03-02 15:34 -------
Easy recreation method - 

1. Allocate a virt and assign some decent weight (50% of the CPU or something
like that).
2. Login to the virt, create deep enough directory structure using your
favorite mechanism so that "ls -R /" takes a minimum of 50 secs to complete.
3. Reboot the physical box - Now we have a Xen3 node with atleast 1 virt. If
you have other virts on the physical host (apart from the test virt), leave
them idle so that we can get predictable/recreatable results.

 4. Open 2 xterms, one for dom-0 and the other for the virt. Do a "su" or
equivalent on the dom-0 xterm since "Xm" requires root access.
5. On dom-0 xterm, type "while true; do; /usr/sbin/xm list | grep <test virt
slot>; sleep 10; done;" - Don't run it yet.
6. On test virt xterm, type "while true; do; grep cpu0 /proc/stat; sleep 10;
done;" - Don't run it yet.
7. Make sure the above commands work fine on both the xterms (try it and then
8. Open a 2nd xterm to the virt, change directory to root (cd /) and type "ls
-R". Don't run the command yet.

9. Now, you have 3 xterms - 2 of them to monitor the cpu usage and 3rd one to
start the workload.
10. At the same time, run the "while .." commands on xterms 1 and 2 (to monitor
the cpu usage). After 10 secs, 2nd line will be printed out around the same
11. After the 2nd line is printed on BOTH the cpu usage monitoring xterms, go
to the 3rd xterm and run "ls -R /" - Workload is running now. 
12. Wait for the "ls -R /" to finish. After that wait for 1 more line to be
printed on BOTH the cpu monitoring xterms.
 13. The entire "ls -R /" 's CPU usage has been captured by both "xm" and
/proc/stat. Any errors due to difference in startup and end times of cpu
monitoring commands won't make a big impact to the end result.
 14. Process the data from both the windows - I find differences between CPU
usage as reported by /proc/stat inside the virt and cpu usage as reported by
the hypervisor

Configure bugmail: 
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Xen-bugs mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-bugs] [Bug 882] Cpu Usage Discrepancies on Xen, bugzilla-daemon <=