# What are the CPU Units used for in ProxMox?

I have seen this "CPU Units" thing in Proxmox - however I am not sure what they do - what are they used for.

All of our VPS' are set to 1000

We have some windows systems that could use an injection of cpu - so not sure if raising this to say 100000 would work or not...

Also - we use a ton of the container based vps on the system as well - is there a difference between the two

-

May be this is right explanation. http://forum.proxmox.com/threads/889-CPU-questions?p=14601#post14601

You first need to find out how many CPU units you have in your system by running:

Code:

vzcpucheck

In my case I get:

Code:

vzcpucheck Current CPU utilization: 14000 Power of the node: 906755

Now if I give 1000 units to a VM on this node, it means that this OpenVZ VM is getting 1000 divided by 906755 and multiplied by 100 = 0.1% of the CPU time.

So if I want to give 5 percent of guaranteed time to my VPS, I would enter CPU Units = 45337

-

Both OpenVZ (the containers based system) as well as KVM will work CPU Units the same way within Proxmox

In short - CPU Units are used in the kernel fair scheduler. The larger the value - the more CPU time a container or KVM instance is given.

You noted "would raising this to say 1000000 work?" NO

The maximum number a container may have is 50,000 and the minimum is 8. Proxmox defaults to 1000 - thus the reason you have the default of 1000 in place .

This is how it should work @ present however CPU Units are not obeyed in OpenVZ - so all available CPU is used in each container...

Might want to verify directly with OpenVZ however.

-
I think you're off on the zeros. OP stated 100,000 not 1,000,000 and if the post by ErikA is correct the maximum is 500,000 not 50,000. So OP should be able to raise to 100,000. –  HTTP500 Feb 29 '12 at 13:25