[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] CPU activity: top and xm top


  • To: "Igor Chubin" <igor@xxxxxxx>, Xen-users@xxxxxxxxxxxxxxxxxxx
  • From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
  • Date: Wed, 11 Apr 2007 11:15:49 +0200
  • Delivery-date: Wed, 11 Apr 2007 02:15:00 -0700
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Thread-index: Acd8Ett86n2XLLzUS6qPtL+51UVMIgABnY0w
  • Thread-topic: [Xen-users] CPU activity: top and xm top

 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Igor Chubin
> Sent: 11 April 2007 09:25
> To: Xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] CPU activity: top and xm top
> 
> 
> Hello all,
> 
> 
> I feel that my question is silly, 
> but have no explanation of this fact.
> 
> I run xm top and see that my CPU is utilized for 20%.
> 
> 
>     $ xm top
>     xentop - 11:02:34 Xen 3.0.3-1
>     1 domains: 1 running, 0 blocked, 0 paused, 0 crashed, 0 dying, 0
>     shutdown
>     Mem: 2096380k total, 222848k used, 1873532k free CPUs: 2 @ 2133MHz
>     NAME STATE CPU(sec) CPU(%) MEM(k) MEM(%) MAXMEM(k) 
> MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS VBD_OO VBD_RD VBD_WR SSID
>     Domain-0 -----r 123 22.0   196608 9.4    no limit  n/a    
>    2     24   395      1081     0    0      0      0      0
> 

I'm fairly sure this is counting the processing inside Xen as well as in
Dom0, and two CPU's can achieve a total of 200%, so you're using 10% of
the total capacity of the systme.
> 
> After that I run top and see that the CPU load is ~3%
> 
> 
>     top - 11:06:12 up 12 min, 2 users, load average: 0.07, 0.03, 0.01
>     Tasks: 184 total, 1 running, 183 sleeping, 0 stopped, 0 zombie
>     Cpu(s): 0.4%us, 1.4%sy, 0.0%ni, 97.7%id, 0.5%wa, 0.0%hi, 
> 0.0%si, 0.1%st
>     Mem: 196756k total, 105660k used, 91096k free, 5136k buffers
>     Swap: 3903672k total, 0k used, 3903672k free, 36084k cached

This is ONLY what Dom0 does - no Xen hypervisor work. Here, the total
system load is 100%, so you're using about 6% in "xm top" standards. The
other 14% I suspect goes into Xen Hypervisor (are you by any chance
running a lot of interrupts - e.g. some disk/network activity for
example?)

> 
> 
> I have run "top" and "xm top" simultaneously also.
> The same.
> 
> I have only domain 0 running. No U-domains at all.
> 
>     $ sudo xm list
>     Name     ID Mem(MiB) VCPUs State  Time(s)
>     Domain-0 0  192      2     r----- 184.0
> 
> How does xm top calculate cpu activity?
> Is there any way to access low level information that xm top uses in
> its calculations?

Yes there is, but I don't know how (it's been discussed before on Xen
Users and/or Xen Devel, so google should be able to find it). 

Xm top is just a python script, and you can get the information that the
python-code is fetching from the hypervisor. 

--
Mats
> 
> 
> 
> 
> 
> Question #2.
> 
> How can I gather information about system activity in the Xen 
> domain 0?
> In regular systems, not in Xen, I have used to use sar for this.
> But under Xen sar can't show many interesting parameters,
> e.g. interrupts activity.
> 
> 
> 
> Thank you!
> 
> -- 
> WBR, i.m.chubin
> 
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
> 
> 
> 



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.