[Lxc-users] capping CPU usage
    Trent W. Buck 
    trentbuck at gmail.com
       
    Wed Dec  1 06:48:55 UTC 2010
    
    
  
I had a bash process in a container go haywire and consume 100% of a
core yesterday.  It made me think:
    Is there a way to cap the AMOUNT of CPU a container can use?
I realize I can assign a container to a specific subset of cores
(cpuset), and change how free CPU is divvied up between containers
(cpu.shares), but I can't see any way to say something like
    This container can use AT MOST 80% of any given core.
    This container can use AT MOST 4 cores (concurrently).
I'm using a scaling governor, so my CPUs will use less power and
generate less heat when they're idling.  I don't want a haywire
container to be able to consume 100% of free compute time, because
that'll push all cores back to their highest clock (and thus increase my
power and cooling bill).
    
    
More information about the lxc-users
mailing list