HI, I''m new here and very new to Xen so please be kind. I have inherited a CentOS dedicated server with xen, basically running 1 vps and I am trying to optimise it as it seems to me that the 1 VPS is not using anywhere near what is available. When I look at TOP command on the host machine the load average is very good 0.31, 0.25, 0.16 but when I login to the VPS and look at TOP the load average is : 8.49, 7.61, 8.21. This is the xen list of vps''s Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 405 2 r----- 778902.7 saturn 1 7599 2 r----- 20162599.6 As you can see there is only two vps''s the Domain-0 (which as I gather is meant to be there and uses very little resources) and our main VPS.. I want Saturn to basically utilise as much resource as it can. here is xm top in case that makes a difference. xentop - 14:44:31 Xen 3.1.2-194.17.1.el5 2 domains: 2 running, 0 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown Mem: 8386888k total, 8386172k used, 716k free CPUs: 2 @ 2333MHz 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 778921 1.2 414752 4.9 no limit n/a 2 4 1229451696 1245919559 0 0 0 0 0 saturn -----r 20163400 99.5 7782260 92.8 7782400 92.8 2 1 3462118258 900859990 3 406372 1428634114 2900835964 0 Thanks for your help in advance. Ben
On Mon, Feb 27, 2012 at 6:53 AM, <mywildimagination@gmail.com> wrote:> HI, I''m new here and very new to Xen so please be kind. > > I have inherited a CentOS dedicated server with xen, basically running 1 > vps and I am trying to optimise it as it seems to me that the 1 VPS is not > using anywhere near what is available. > > When I look at TOP command on the host machine the load average is very > good 0.31, 0.25, 0.16 but when I login to the VPS and look at TOP the load > average is : 8.49, 7.61, 8.21. > > This is the xen list of vps''s > > Name ID Mem(MiB) VCPUs State Time(s) > Domain-0 0 405 2 r----- 778902.7 > saturn 1 7599 2 r----- > 20162599.6 > > As you can see there is only two vps''s the Domain-0 (which as I gather is > meant to be there and uses very little resources) and our main VPS.. > > I want Saturn to basically utilise as much resource as it can. > > here is xm top in case that makes a difference. > > xentop - 14:44:31 Xen 3.1.2-194.17.1.el5 > 2 domains: 2 running, 0 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown > Mem: 8386888k total, 8386172k used, 716k free CPUs: 2 @ 2333MHz > 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 778921 1.2 414752 4.9 no limit n/a 2 > 4 1229451696 1245919559 0 0 0 0 0 > saturn -----r 20163400 99.5 7782260 92.8 7782400 92.8 > 2 > 1 3462118258 900859990 3 406372 1428634114 2900835964 0 > > Thanks for your help in advance. > > Ben > > >Ben, your DomU (saturn) will only use what it needs. Dom0 is your "host OS" in a sense. It''s the one you log into to run xm commands. If you want to see the DomU use more you''ll need to give it more things to do. If it''s only using 8% then it probably only needs 8%. Grant McWilliams http://grantmcwilliams.com/ Some people, when confronted with a problem, think "I know, I''ll use Windows." Now they have two problems. _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
> -----Original Message----- > From: xen-users-bounces@lists.xen.org [mailto:xen-users-bounces@lists.xen.org] On > Behalf Of mywildimagination@gmail.com > Sent: Monday, February 27, 2012 9:53 AM > > Name ID Mem(MiB) VCPUs State Time(s) > Domain-0 0 405 2 r----- 778902.7 > saturn 1 7599 2 r-----Looks like the hardware has 2 CPU''s available and 8GB RAM? Is that right? If there are more CPUs available you can increase VCPUs for "saturn", likewise for memory. Otherwise, you''ve given your domU all the resources available. The dom0 is lightly loaded, but that''s normal. You can see from xentop that the system is busy. If the hardware isn''t enough for the workload, you could build a new dom0 on a bigger host, and migrate the domU over. -Jeff
On 27/02/2012 04:31 PM, Grant McWilliams wrote:> On Mon, Feb 27, 2012 at 6:53 AM, <mywildimagination@gmail.com > <mailto:mywildimagination@gmail.com>> wrote: > > HI, I''m new here and very new to Xen so please be kind. > > I have inherited a CentOS dedicated server with xen, basically > running 1 vps and I am trying to optimise it as it seems to me that > the 1 VPS is not using anywhere near what is available. > > When I look at TOP command on the host machine the load average is > very good 0.31, 0.25, 0.16 but when I login to the VPS and look at > TOP the load average is : 8.49, 7.61, 8.21. > > This is the xen list of vps''s > > Name ID Mem(MiB) VCPUs State > Time(s) > Domain-0 0 405 2 r----- > 778902.7 > saturn 1 7599 2 r----- > 20162599.6 > > As you can see there is only two vps''s the Domain-0 (which as I > gather is meant to be there and uses very little resources) and our > main VPS.. > > I want Saturn to basically utilise as much resource as it can. > > here is xm top in case that makes a difference. > > xentop - 14:44:31 Xen 3.1.2-194.17.1.el5 > 2 domains: 2 running, 0 blocked, 0 paused, 0 crashed, 0 dying, 0 > shutdown > Mem: 8386888k total, 8386172k used, 716k free CPUs: 2 @ 2333MHz > 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 778921 1.2 414752 4.9 no limit n/a > 2 > 4 1229451696 1245919559 0 0 0 0 0 > saturn -----r 20163400 99.5 7782260 92.8 7782400 > 92.8 2 > 1 3462118258 900859990 3 406372 1428634114 2900835964 0 > > Thanks for your help in advance. > > Ben > > > > Ben, your DomU (saturn) will only use what it needs. Dom0 is your "host > OS" in a sense. It''s the one you log into to run xm commands. If you > want to see the DomU use more you''ll need to give it more things to do. > If it''s only using 8% then it probably only needs 8%.Thanks Grant, I obviously don''t want to see it do more if it cant, I want to know if it is doing too much or if I can give it more resources to allow it to do more if it needs too, if you look at the CPU usage in the xm top list you will see that saturn is using 99.5% of it''s available CPU but this is not reflected anywhere near that in the CPU usage of the host OS. Am I missing something? This is also reflected in the load averages, I am a linux newbie also but I believe anything above 1 (when yo take the load number and divide it by the number of CPUs and Cores) means it is overloaded. What I am trying to understand is if my VPS is about to come to a halt any time with an overload or should I be only concerned about the host machines load? Thanks Ben
On 27/02/2012 05:33 PM, Jeff Sturm wrote:>> -----Original Message----- >> From: xen-users-bounces@lists.xen.org [mailto:xen-users-bounces@lists.xen.org] On >> Behalf Of mywildimagination@gmail.com >> Sent: Monday, February 27, 2012 9:53 AM >> >> Name ID Mem(MiB) VCPUs State Time(s) >> Domain-0 0 405 2 r----- 778902.7 >> saturn 1 7599 2 r----- > > Looks like the hardware has 2 CPU''s available and 8GB RAM? Is that right? > > If there are more CPUs available you can increase VCPUs for "saturn", likewise for memory. Otherwise, you''ve given your domU all the resources available. The dom0 is lightly loaded, but that''s normal. You can see from xentop that the system is busy. > > If the hardware isn''t enough for the workload, you could build a new dom0 on a bigger host, and migrate the domU over. > > -Jeff > >Thanks Jeff, Yes it just has two CPU cores. What I am confused about is the really low CPU load shown on the host OS when I view the top command, seems like the server as a whole is not loaded much at all. Thanks Ben
On Feb 27, 2012 11:39 PM, "Jeff Sturm" <jeff.sturm@eprize.com> wrote:> > > -----Original Message----- > > From: xen-users-bounces@lists.xen.org [mailto:xen-users-bounces@lists.xen.org] On> > Behalf Of mywildimagination@gmail.com > > Sent: Monday, February 27, 2012 9:53 AM > > > > Name ID Mem(MiB) VCPUs StateTime(s)> > Domain-0 0 405 2 r-----778902.7> > saturn 1 7599 2 r----- > > Looks like the hardware has 2 CPU''s available and 8GB RAM? Is that right? > > If there are more CPUs available you can increase VCPUs for "saturn",likewise for memory. Otherwise, you''ve given your domU all the resources available. The dom0 is lightly loaded, but that''s normal. You can see from xentop that the system is busy.> > If the hardware isn''t enough for the workload, you could build a new dom0on a bigger host, and migrate the domU over.> > -Jeff >Well, yes your guest VM a.k.a domU (please don''t use the term VPS) is overloaded... but that still depends on whether it''s I/O-bound or CPU-bound... The loads of domU''s have no relation to the load of dom0; they are separate VMs. dom0 is not running the VMs. It''s the hypervisor that''s running the VMs (dom0 + all domU''s) and the load if each VM is local to that particular VM. In your case, dom0 is lightly-loaded (as it should be), while the single domU is heavily loaded. Check first what''s causing such heavy load: not enough RAM making the system swap-thrashing? Overzealous polling by spinning? Buggy kernel? Rgds, _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Okay, I replied to the wrong email; I meant to reply to "mywildimagination"''s email that said that the host doesn''t seem to be working hard. Rgds, On Feb 27, 2012 11:55 PM, "Pandu Poluan" <pandu@poluan.info> wrote:> > On Feb 27, 2012 11:39 PM, "Jeff Sturm" <jeff.sturm@eprize.com> wrote: > > > > > -----Original Message----- > > > From: xen-users-bounces@lists.xen.org [mailto: > xen-users-bounces@lists.xen.org] On > > > Behalf Of mywildimagination@gmail.com > > > Sent: Monday, February 27, 2012 9:53 AM > > > > > > Name ID Mem(MiB) VCPUs State > Time(s) > > > Domain-0 0 405 2 r----- > 778902.7 > > > saturn 1 7599 2 r----- > > > > Looks like the hardware has 2 CPU''s available and 8GB RAM? Is that > right? > > > > If there are more CPUs available you can increase VCPUs for "saturn", > likewise for memory. Otherwise, you''ve given your domU all the resources > available. The dom0 is lightly loaded, but that''s normal. You can see > from xentop that the system is busy. > > > > If the hardware isn''t enough for the workload, you could build a new > dom0 on a bigger host, and migrate the domU over. > > > > -Jeff > > > > Well, yes your guest VM a.k.a domU (please don''t use the term VPS) is > overloaded... but that still depends on whether it''s I/O-bound or > CPU-bound... > > The loads of domU''s have no relation to the load of dom0; they are > separate VMs. dom0 is not running the VMs. It''s the hypervisor that''s > running the VMs (dom0 + all domU''s) and the load if each VM is local to > that particular VM. > > In your case, dom0 is lightly-loaded (as it should be), while the single > domU is heavily loaded. Check first what''s causing such heavy load: not > enough RAM making the system swap-thrashing? Overzealous polling by > spinning? Buggy kernel? > > Rgds, >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On 27/02/2012 05:55 PM, Pandu Poluan wrote:> Well, yes your guest VM a.k.a domU (please don''t use the term VPS) is > overloaded... but that still depends on whether it''s I/O-bound or > CPU-bound... > > The loads of domU''s have no relation to the load of dom0; they are > separate VMs. dom0 is not running the VMs. It''s the hypervisor that''s > running the VMs (dom0 + all domU''s) and the load if each VM is local to > that particular VM. > > In your case, dom0 is lightly-loaded (as it should be), while the single > domU is heavily loaded. Check first what''s causing such heavy load: not > enough RAM making the system swap-thrashing? Overzealous polling by > spinning? Buggy kernel? > > Rgds, >Just to be clear, are you saying the CPU usage of the host OS does not reflect the overall CPU usage of the guest VMs it hosts? Thanks Ben
> -----Original Message----- > From: mywildimagination@gmail.com [mailto:mywildimagination@gmail.com] > Sent: Monday, February 27, 2012 12:10 PM > > Just to be clear, are you saying the CPU usage of the host OS does not reflect the > overall CPU usage of the guest VMs it hosts?That''s correct. Ideally the dom0 wouldn''t show a high load average, ever. If it does, then it is likely taking resources away from the other guests. The dom0 instance is there to manage the hypervisor and provide driver backend services to the guests for disk, network, etc. None of those things should require much CPU activity. -Jeff
On 27/02/2012 07:07 PM, Jeff Sturm wrote:>> -----Original Message----- >> From: mywildimagination@gmail.com [mailto:mywildimagination@gmail.com] >> Sent: Monday, February 27, 2012 12:10 PM >> >> Just to be clear, are you saying the CPU usage of the host OS does not reflect the >> overall CPU usage of the guest VMs it hosts? > > That''s correct. > > Ideally the dom0 wouldn''t show a high load average, ever. If it does, then it is likely taking resources away from the other guests. The dom0 instance is there to manage the hypervisor and provide driver backend services to the guests for disk, network, etc. None of those things should require much CPU activity. > > -Jeff >I''m not talking about dom0 (Or maybe I am), I am logging into the host OS, is this the same as logging into the dom0 VM? So if I look at TOP in the host SSH login am I just looking at the resources used by dom0? Thanks Ben
> -----Original Message----- > From: mywildimagination@gmail.com [mailto:mywildimagination@gmail.com] > Sent: Monday, February 27, 2012 1:17 PM > > I''m not talking about dom0 (Or maybe I am), I am logging into the host OS, is this the > same as logging into the dom0 VM?Yes.> So if I look at TOP in the host SSH login am I just looking at the resources used by > dom0?Correct. What you have is a Xen hypervisor running on the bare hardware, with two guests: A dom0 instance (which must always be running), and a domU (unprivileged guest OS that you can start/stop as needed). The difference between the two guests is that the dom0 is privileged--Xen allows it to directly access most hardware, in particular the PCI bus. The hypervisor itself does not provide a means for direct interactive commands, so instead you log into dom0 to issue hypervisor commands. The figure in this page may help to explain: http://libvirt.org/architecture.html -Jeff
On 27/02/2012 07:27 PM, Jeff Sturm wrote:>> -----Original Message----- >> From: mywildimagination@gmail.com [mailto:mywildimagination@gmail.com] >> Sent: Monday, February 27, 2012 1:17 PM >> >> I''m not talking about dom0 (Or maybe I am), I am logging into the host OS, is this the >> same as logging into the dom0 VM? > > Yes. > >> So if I look at TOP in the host SSH login am I just looking at the resources used by >> dom0? > > Correct. > > What you have is a Xen hypervisor running on the bare hardware, with two guests: A dom0 instance (which must always be running), and a domU (unprivileged guest OS that you can start/stop as needed). The difference between the two guests is that the dom0 is privileged--Xen allows it to directly access most hardware, in particular the PCI bus. The hypervisor itself does not provide a means for direct interactive commands, so instead you log into dom0 to issue hypervisor commands. > > The figure in this page may help to explain: http://libvirt.org/architecture.html > > -Jeff >Thanks Jeff, that''s cleared up a lot. So I can safely say that the single VM running on this server is allocated as much resource as can be made available to it and if it needs more I need to upgrade the server? thanks Ben