According to all the sources I read (openvz wiki, various mailinglists, forums, ..) the values of the cpuunits settings are relative to each other. So when all are equal and the system is busy, all receive the same cpu share.
But something still puzzles me with that: why is there a tool "vzcpucheck" which shows "the power of the node/ host":
Current CPU utilization: 18000
Power of the node: 880001
Why is there (do I need) an absolute number when all settings are only relative?
Shouldn't those two settings result in exactly the same?
ve1: 1
ve2: 1
ve3: 1
= 3
ve1: 293334
ve1: 293334
ve1: 293334
= 880001 (power of the node)
What's the difference?
source for quote here
Thus, if you want to set up a system whereby containers truly get a guaranteed amount of CPU you need to ensure you don't oversubscribe and carefully count your CPUUNITs against your power of the node carefully. The power of the node allows you to calculate how much a single CPUUNIT is worth (if you dont oversubscribe). e.g a 3hgz computer with 30 CPUUNITs would mean that 1 unit is worth 0.1 ghz (these are not real numbers). Thus you can use this as a guide for if one vm needs 1 ghz and another needs a dedicated 1.5ghz, use 10 and 15 accordingly. Just make sure you dont allocate more than 30 cpu units total, otherwise 10 no longer represents a guarantee of 1 Ghz.
Power of the node is really to solve this problem: Two CPUs that are both 3GHz may not perform the same amount of calculations per second due to advances in technology/different architectures. So different nodes may be able to handle more or less containers even though they have the same cpu frequency. This is why Amazon advertises compute capability in terms of ECU's instead of GHz.
You may find it easier to just use cpulimit, which is percentage of the CPU that the container cannot exceed. If you have two cores, a value up to 200% is acceptable. However the previous setup is more 'dedicated cpu with burst', whereas this, its easier to just set up 'dedicated cpu' (but you still have to ensure you dont oversubscribe your percentages)
As CPU units must be read as "guaranteed CPU units". That clarifies the real meaning.
Each VE can potentially have all power of the node minus all CPU power guaranteed for all others VEs.