[Users] Question about cpulimit vs. cpuunits

Gastón Keller gastonkeller at gmail.com
Mon Nov 16 16:16:30 EST 2009


[snip]
> Yes, I'm familiar with that stuff... but the question still remains, is there any strategy/configuration to make cpuunits behave similarly to cpulimits?

Hello, Scott. It's my understanding that it's not possible to achieve
a similar behaviour. _cpuunits_ only serves to indicate how to
distribute the cpu time between the competing containers. _cpulimits_
is a hard limit that will remain there no matter how much cpu time is
available.

For example, let's say that we define _cpulimits_ for a ct at 30%. If
that ct needs more cpu time than 30%, it doesn't matter if no other ct
is using the cpu. There's a limit there and it will be enforced. That
is to say, the ct will use 30% of the cpu time and the rest (70%) will
remain free (idle cpu).

If there were two cts, A and B, we could assign 30 _cpuunits_ to A and
70 _cpuunits_ to B. The result of that would be that when all the cpu
time is needed between the two cts, ct A is given 30% of the cpu time
and ct B is given 70% of the cpu time. However, as soon as ct B
doesn't need that much cpu time, ct A will be able to increase its
utilization beyond the 30% mark (using as much cpu time as it needs,
provided ct B is not needing it). In other words, _cpuunits_ can work
as _cpulimits_ only in those situations when the cpu time needed is
equal or greater than the available cpu time.

Cheers,

-- 
Gastón Keller, M.Sc.
Ph.D. Candidate
Department of Computer Science
The University of Western Ontario
London ON, N6A 5B7 Canada
(519) 661-2111 ext. 86833
http://digs.csd.uwo.ca/diki/Gaston_Keller
http://www.linkedin.com/in/gastonkeller



More information about the Users mailing list