Hello, i have just migrated machine to xen server where only 2 cpus are available. I have copied config from machine where domU was located before. That machine had 4 CPUS (QUADCORE), current machine has 2 CPUS (1 XEON 2cores). I have forgot to change vcpus from 4 to 2 in config, but .. what really surprised me ... machine started . How it is possible? It was really slow alltought and not possible for working (Windows server 2003). Thanks for reply! David _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stefan de Konink
2008-May-17 20:32 UTC
Re: [Xen-users] vcpus higher than real cpus possible?
On Sat, 17 May 2008, [ISO-8859-2] David Hláèik wrote:> Hello, i have just migrated machine to xen server where only 2 cpus are > available. I have copied config from machine where domU was located before. > That machine had 4 CPUS (QUADCORE), current machine has 2 CPUS (1 XEON > 2cores). > > I have forgot to change vcpus from 4 to 2 in config, but .. what really > surprised me ... machine started . How it is possible? It was really slow > alltought and not possible for working (Windows server 2003).Since Xen is always doing this :) Think for one processor having 2 DomU''s running. Technically you have then 3 vcpu''s on the same moment. It is just about scheduling tasks for a vcpu. Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
But best approach is to use VCPUs same as real CPUs to achieve best performace right? Thanks, D. On Sat, May 17, 2008 at 10:32 PM, Stefan de Konink <skinkie@xs4all.nl> wrote:> On Sat, 17 May 2008, [ISO-8859-2] David Hláèik wrote: > > > Hello, i have just migrated machine to xen server where only 2 cpus are > > available. I have copied config from machine where domU was located > before. > > That machine had 4 CPUS (QUADCORE), current machine has 2 CPUS (1 XEON > > 2cores). > > > > I have forgot to change vcpus from 4 to 2 in config, but .. what really > > surprised me ... machine started . How it is possible? It was really slow > > alltought and not possible for working (Windows server 2003). > > Since Xen is always doing this :) Think for one processor having 2 DomU''s > running. Technically you have then 3 vcpu''s on the same moment. It is just > about scheduling tasks for a vcpu. > > > Stefan > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Same vcpus or less than real cpus for performance. Having more vcpus assigned to a domu than real cpus is not a supported scenario, although it does seem to work. The scheduling of such a configuration is a nightmare though, and your guest system will be interrupting itself when it believes concurrent processing is taking place, which could (will?) lead to instability. You would likely see more cpu time spent on state switching than actual work in such a setup. _____ From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of David Hlácik Sent: May 17, 2008 3:51 PM To: Stefan de Konink Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] vcpus higher than real cpus possible? But best approach is to use VCPUs same as real CPUs to achieve best performace right? Thanks, D. On Sat, May 17, 2008 at 10:32 PM, Stefan de Konink <skinkie@xs4all.nl> wrote: On Sat, 17 May 2008, [ISO-8859-2] David Hláèik wrote:> Hello, i have just migrated machine to xen server where only 2 cpus are > available. I have copied config from machine where domU was locatedbefore.> That machine had 4 CPUS (QUADCORE), current machine has 2 CPUS (1 XEON > 2cores). > > I have forgot to change vcpus from 4 to 2 in config, but .. what really > surprised me ... machine started . How it is possible? It was really slow > alltought and not possible for working (Windows server 2003).Since Xen is always doing this :) Think for one processor having 2 DomU''s running. Technically you have then 3 vcpu''s on the same moment. It is just about scheduling tasks for a vcpu. Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2008-May-19 14:32 UTC
Re: [Xen-users] vcpus higher than real cpus possible?
> Having more vcpus assigned to a domu than real cpus is not a supported > scenario, although it does seem to work. The scheduling of such a > configuration is a nightmare though, and your guest system will be > interrupting itself when it believes concurrent processing is taking place, > which could (will?) lead to instability. You would likely see more cpu > time spent on state switching than actual work in such a setup.It shouldn''t give you instability but it is not efficient so I wouldn''t recommend it unless you need it for some reason. Think of VCPUs in a VM as like rather like threads in a process. The system can cope with having more of them than there are logical CPUs, it just won''t be able to run them all at once. One difference is that although there are efficient ways of having more threads in a process than there are logical CPUs, it''s very rarely going to be efficient to have more VCPUs than logical CPUs. It misleads the guest OS into thinking it''s on a bigger system than it is, resulting in it wasting time trying to use the extra CPUs. As [STD]ein said, the VCPUs will compete with each other for time on the real machine - wasting time. For a PV domU you can hot-unplug CPUs from a running domain in order to optimise it for the physical system it''s running on. I don''t know if this has been done for an HVM guest, I''d assume you have to set the number correctly at boot time. Cheers, Mark> _____ > > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of David Hlácik > Sent: May 17, 2008 3:51 PM > To: Stefan de Konink > Cc: xen-users@lists.xensource.com > Subject: Re: [Xen-users] vcpus higher than real cpus possible? > > But best approach is to use VCPUs same as real CPUs to achieve best > performace right? > Thanks, > > D. > On Sat, May 17, 2008 at 10:32 PM, Stefan de Konink <skinkie@xs4all.nl> > wrote: > > On Sat, 17 May 2008, [ISO-8859-2] David Hláèik wrote: > > Hello, i have just migrated machine to xen server where only 2 cpus are > > available. I have copied config from machine where domU was located > > before. > > > That machine had 4 CPUS (QUADCORE), current machine has 2 CPUS (1 XEON > > 2cores). > > > > I have forgot to change vcpus from 4 to 2 in config, but .. what really > > surprised me ... machine started . How it is possible? It was really slow > > alltought and not possible for working (Windows server 2003). > > Since Xen is always doing this :) Think for one processor having 2 DomU''s > running. Technically you have then 3 vcpu''s on the same moment. It is just > about scheduling tasks for a vcpu. > > > Stefan-- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users