WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] CPU/VCPU sharing

I replied to your other e-mail, but I just thought of more stuff to say ;-)

> In my config file I have specified cpus = "1-7" and vpus=1 in the hope that
> the 1 vcpu would be an almighty powerful one, but this isn't the case.
> There is no errors booting it up, and [\047cpus\047, \0470-7\047]
> appears in the xend logfile.

VCPUs are what the guest sees as CPUs: the guest schedules apps on them.  To 
Xen, they're like "threads" and the guest is like a "process".  Xen can (if 
it feels like it) schedule VCPUs concurrently on real cores (PCPUs) so that 
the guest gets more computing power, just like Linux will schedule multiple 
threads from one app across multiple CPUs.  But just like an app needs to be 
multithreaded to benefit from SMP, a guest needs to have multiple VCPUs - 
otherwise the guest is "single threaded" and can only run on one core at a 
time.

The most a guest with one VCPU can ever get is 100% of one PCPU.  The most a 
guest with two VCPUs can ever get is 200% of one PCPU, but it would recieve 
this in the form of both VCPUs running for 100% of the time on separate PCPUs 
(if they were available).

You can of course limit a guest.  So, for instance, you could give it 100% of 
a PCPU's worth of processor bandwidth, but 4 VCPUs.  Xen would try to give it 
that amount of CPU time, aggregated across the VCPUs (but not necessarily 
distributed evenly between them).

Hope that helps you see how this fits together.

Cheers,
Mark


> Here is a copy of the config file.
>
> name = "test1"
> builder = "hvm"
> memory = "20000"
> disk = [ 'file:/virtual/test1,hda,w', ]
> vif = [ 'type=ioemu, mac=00:16:3e:18:34:76, bridge=xenbr0', ]
> uuid = "d8a2a092-399a-ecb9-24fb-7caf66f883b2"
> device_model = "/usr/lib64/xen/bin/qemu-dm"
> kernel = "/usr/lib/xen/boot/hvmloader"
> vnc=0
> # vncunused=1
> apic=1
> acpi=1
> pae=1
> cpus="0-7"
> vcpus=1
> usb=0
> serial = "pty" # enable serial console
> on_reboot   = 'restart'
> on_crash    = 'restart'
>
> Any help / advice / comments and greatly appreciated.
>
> Regards, Matt Hanna



-- 
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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>