[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] CPU assignment and sched-credit



Dario Faggioli <raistlin.df@xxxxxxxxx> writes:

> On mer, 2014-06-11 at 08:35 +0200, lee wrote:
>
>> With very little load, it seems to make sense to just let all VMs have
>> all CPUs.  There's probably a point at which it would be better to do
>> some fine tuning, based on the actual loads, and before that point is
>> reached, what could be better than letting all CPUs to all VMs?
>> 
> This part, I'm not sure I understand.

Imagine you have two VMs, one for a web server and another one to
compile software.

Currently, nobody is looking at your web pages, and you're compiling
something in the other VM.

You could let both VMs have half as many vCPUs as there are pCPUs.  That
slows your compilation down to half the possible speed because half the
CPUs remain asleep.  If someone connects to the web server, they will be
served immediately while you're compiling.

You can do it differently and let each VM have as many vCPUs as there
are pCPUs.  Your compilation will take only half the time, and someone
connecting to the web server will still be served without noticeable
delays.  That's the perfect setup.

After a while, your website becomes popular and now 50 users look at
your web pages.  When they do that while you're compiling, there are
delays and your setup isn't perfect anymore.

You have reached the point at which some fine tuning can help.  So you
look at how the web server is being used and find out that there are
sometimes peak loads with 200 users, that during the day there are
usually no more than 10--20 users and that a night there are 0--3.

Based on this actual load, you give the VM with the web server four
times as much time as the compiling VM.  It's still much better than
taking vCPUs away from the compiling VM and giving them to the web
server VM.  You can still compile at almost full speed, and the web
server isn't delayed.

After some more time, your web site becomes even more popular and now
you got 1000 users.  With so many users, it might be better to take a
vCPU away from the compiling VM --- and you can increase the time for
the compiling VM to from 1/4 to 1/2.  Performance for both VMs might be
better than it was before with this load.


-- 
Knowledge is volatile and fluid.  Software is power.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.