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 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 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? 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@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Igor Chubin > Sent: 11 April 2007 09:25 > To: Xen-users@lists.xensource.com > 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 cachedThis 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@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mats, thank you for your answer. Now I know that domain 0 CPU activity consists of hypervisor activity and domain 0 kernel with its processes. You suppose that this 20% (or 14% to be more correct) hypervisor spends processing interrupts. But my machine is idle. It does nothing: it has no network activity and presumable no disk activity. I wanted to inspect interrupts activity using sar, but without success. Unfortunately sar doesn''t report interrupts activity under Xen :( (May be I can use /proc/interrupts and get information from this file? Will it be correct?) So my machine is idle but I have 20% of CPU activity for domain 0. The question is: How can I get exactly know for what is this 20% spending? What tools (or interfaces e.g. /proc files) can I use for this? ...> > 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. >I know this. But may be somebody have done this already and knows where this low-level information lies. Ok, I will Google for this. -- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: Igor Chubin [mailto:igor@chub.in] > Sent: 11 April 2007 10:33 > To: Petersson, Mats > Cc: Xen-users@lists.xensource.com > Subject: Re: [Xen-users] CPU activity: top and xm top > > > Mats, > > thank you for your answer. > > > Now I know that domain 0 CPU activity consists of > hypervisor activity and domain 0 kernel with its processes. > > You suppose that this 20% (or 14% to be more correct) > hypervisor spends processing interrupts. > > But my machine is idle. > It does nothing: it has no network activity and presumable no disk > activity. > > I wanted to inspect interrupts activity using sar, > but without success. Unfortunately sar doesn''t report interrupts > activity under Xen :( > (May be I can use /proc/interrupts and get information from this > file? Will it be correct?)It should be correct as to what Dom0 is doing, it won''t show interrupts that go to Xen but are "hidden" from Dom0 (but I doubt that is many).> > So my machine is idle but I have 20% of CPU activity for domain 0. > The question is: How can I get exactly know for what is this > 20% spending? > What tools (or interfaces e.g. /proc files) can I use for this?Xenoprofile is probably your best bet. -- Mats> > > ... > > > 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. > > > > I know this. > But may be somebody have done this already > and knows where this low-level information lies. > > Ok, I will Google for this. > > > -- > WBR, i.m.chubin > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
...> > I wanted to inspect interrupts activity using sar, > > but without success. Unfortunately sar doesn''t report interrupts > > activity under Xen :( > > (May be I can use /proc/interrupts and get information from this > > file? Will it be correct?) > > It should be correct as to what Dom0 is doing, it won''t show interrupts > that go to Xen but are "hidden" from Dom0 (but I doubt that is many).Will interrupts processed by hypervisor itself (without help of the Linux kernel) be visible in this file?> > > > So my machine is idle but I have 20% of CPU activity for domain 0. > > The question is: How can I get exactly know for what is this > > 20% spending? > > What tools (or interfaces e.g. /proc files) can I use for this? > > Xenoprofile is probably your best bet. >Thank you for the idea. -- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: Igor Chubin [mailto:igor@chub.in] > Sent: 11 April 2007 10:50 > To: Petersson, Mats > Cc: Igor Chubin; Xen-users@lists.xensource.com > Subject: Re: [Xen-users] CPU activity: top and xm top > > ... > > > I wanted to inspect interrupts activity using sar, > > > but without success. Unfortunately sar doesn''t report interrupts > > > activity under Xen :( > > > (May be I can use /proc/interrupts and get information from this > > > file? Will it be correct?) > > > > It should be correct as to what Dom0 is doing, it won''t > show interrupts > > that go to Xen but are "hidden" from Dom0 (but I doubt that > is many). > > Will interrupts processed by hypervisor itself > (without help of the Linux kernel) > be visible in this file?No, that''s exactly what I said: Xen will process a few of the interrupts without handing them to Dom0. I have a hard time thinking those should amount to 20% tho''. However, bear in mind that when you start xend, it sets your network card to promiscuous mode, which means that it''s going to accept ALL incoming traffic present on the network segment you''re on, even if it''s not addressed to your machine. If you''re on the same network as a few busy computers, you''ll receive quite a bit of network traffice that isn''t for you (but still received by your machine, because it''s on the same network). You should see that in /proc/interrupts for your network card tho''. -- Mats> > > > > > > > So my machine is idle but I have 20% of CPU activity for domain 0. > > > The question is: How can I get exactly know for what is this > > > 20% spending? > > > What tools (or interfaces e.g. /proc files) can I use for this? > > > > Xenoprofile is probably your best bet. > > > > Thank you for the idea. > > -- > WBR, i.m.chubin > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
...> > Will interrupts processed by hypervisor itself > > (without help of the Linux kernel) > > be visible in this file? > > No, that''s exactly what I said: Xen will process a few of the interrupts > without handing them to Dom0. >Thank you, I understand.> I have a hard time thinking those should amount to 20% tho''. >But as far as I know top show not only user process load, but system processes also. If kernel (not hypervisor) uses CPU processing interrupts (or for any other task) it should be visible in top, shouldn''t it?> However, bear in mind that when you start xend, it sets your network > card to promiscuous mode, which means that it''s going to accept ALL > incoming traffic present on the network segment you''re on, even if it''s > not addressed to your machine. If you''re on the same network as a few > busy computers, you''ll receive quite a bit of network traffice that > isn''t for you (but still received by your machine, because it''s on the > same network). You should see that in /proc/interrupts for your network > card tho''. >I must note. 1) I use switched environment with low broadcast level in VLAN in which the Xen machine in situated. 2) I have another Xen machine with similar configuration installed in the same VLAN. xm top says that CPU load for that machine is near 0. 3) For the sake of experiment I can switch the first machine off the network. I''m afraid that CPU load remains the same. -- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users