George Lenzer
2007-Aug-28 14:47 UTC
[Xen-users] Real CPUs (Dual Core) vs. VCPU count in HVM DomU
I have a server with two dual core Xeon CPUs. So the real CPU count is two, but with the dual cores it''s four and that''s what ''top'' and ''cat /proc/cpuinfo'' reflect. So when configuring a Xen HVM domain, should I set the VCPU count to 2 (equal to the number of physical processors in Dom0) or, should I set it to 4 (equal to the number of cores in Dom0)? I am currently running with VCPUs set to 2 and things seem to be working much better (faster) than when it was set to 4. However, it''s kind of weird to read /proc/cpuinfo and see two CPUs listed as dual core, but only have two CPUs... The DomU HVM domain will be used for a high traffic groupware server (Zimbra) which means high network and disk I/O. So I suspect CPU performance should be up to snuff to keep up in HVM. Any ideas? -- George Lenzer Computer and Networking Specialist Cleveland Public Library Automation Department Office: (216)623-2981 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-Aug-31 03:23 UTC
Re: [Xen-users] Real CPUs (Dual Core) vs. VCPU count in HVM DomU
> I have a server with two dual core Xeon CPUs. So the real CPU count is > two, but with the dual cores it''s four and that''s what ''top'' and ''cat > /proc/cpuinfo'' reflect. So when configuring a Xen HVM domain, should I > set the VCPU count to 2 (equal to the number of physical processors in > Dom0) or, should I set it to 4 (equal to the number of cores in Dom0)?Well, you''ll need a VCPU for each *core* you want to be able to run on. So if you want a domain to be able to use the bandwidth of all the CPUs then you''d need to give it 4 VCPUs. Potentially you''d also want to give it a CPU percentage of 400%, but this may not matter so much if you''re not capping CPU usage and there aren''t other domains contending with it.> I am currently running with VCPUs set to 2 and things seem to be working > much better (faster) than when it was set to 4.That might be because your domains are contending over resources (e.g. because the domU is sometimes running on the core dom0 usually likes to run on). I''m not sure how well HVM scales with number of VCPUs, though. It''s worth experimenting a bit and seeing what works well for your workload.> However, it''s kind of > weird to read /proc/cpuinfo and see two CPUs listed as dual core, but > only have two CPUs...That reading must be from a PV domain, right?> The DomU HVM domain will be used for a high > traffic groupware server (Zimbra) which means high network and disk > I/O. So I suspect CPU performance should be up to snuff to keep up in > HVM. Any ideas?A recommended approach is usually to dedicate a core to dom0, then use the other cores for domUs. If you''re only running one domU then if you were to pin dom0 to one core, and pin your domU to the other 3 then that ought to give decent performance. Depending on workload you may also be able to give the domU 4 VCPUs and have it share one with dom0. I suspect if you''re doing lots of IO then dedicating a core to dom0 will be a performance win. You probably don''t need to give dom0 more than one core, but you could experiment! Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier Guerra Giraldez
2007-Aug-31 12:43 UTC
Re: [Xen-users] Real CPUs (Dual Core) vs. VCPU count in HVM DomU
On Thursday 30 August 2007, Mark Williamson wrote:> Well, you''ll need a VCPU for each *core* you want to be able to run on. Soi thought it was one VCPU for each *hardware thread* -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-Aug-31 14:40 UTC
Re: [Xen-users] Real CPUs (Dual Core) vs. VCPU count in HVM DomU
> On Thursday 30 August 2007, Mark Williamson wrote: > > Well, you''ll need a VCPU for each *core* you want to be able to run on. > > So > > i thought it was one VCPU for each *hardware thread*I was talking about cores in the specific case because that was what the original poster referred too. But you''re right; in general, one VCPU per logical processor (core, hyperthread, whatever). Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users