CPU(cpuunits, cpus, cpulimit )

cpus

 

HN:

vzctl set 2001 --cpus 2 --save

 

VPS:

cat /proc/cpuinfo

processor       : 0
vendor_id       : GenuineIntel
...........................
processor       : 1
vendor_id       : GenuineIntel

 


 

cpulimit & cpus

 

vzctl set 101 --cpulimit 200 --save

 

CPUS="1"
CPULIMIT="200"

=> HN: 1cpu 100%
=> VPS: 1cpu 100%

CPUS="2"
CPULIMIT="100"

=> HN: 1cpu 100%
=> VPS: 1cpu 100%

 

CPUS="2"
CPULIMIT="200"

=> HN: 2cpu 100%
=> VPS: 2cpu 100%

 

CPUS="2"
CPULIMIT="150"

=> HN: 1cpu 100%, 1cpu 50%
=> VPS: 2cpu 100%


 

cpuunits

 

vzctl set 101 --cpuunits 1000 --save
vzctl set 102 --cpuunits 2000 --save
vzctl set 103 --cpuunits 3000 --save

101:102:103=1:2:3