Proxmox OpenVZ CPU units

Proxmox OpenVZ CPU units

Tags :

Category : How-to

Get Social!

openvz-logo-150px_new_3OpenVZ containers have a mechanism in place to prioritise CPU resource assignment. You can make sure that your most critical guests have the CPU resource they require.

In Proxmox you can set the CPU units attribute through the web GUI by clicking on the container to change, selecting the Options tab and double clicking CPU units.

This setting dictates the minimum amount of CPU time, or CPU units, the guest will have. Before you change the setting you will need to find out how many CPU units your system has available. Run vzcpucheck to find out how many CPU units you have available.

Power of the node: 1360020 indicates the maximum CPU units your system has available for use. You can now distribute these CPU units to your guests however, this setting should be used as a minimum amount of CPU time your guest will have. The guest will only use the allocated resource if it needs it, otherwise will be available for other guests.

For example, if you wanted to give a container 20% of the total CPU time, you would would enter 272004.

1360020 * 20% = 272004
(Total units) * (desired %)

This value can be entered into the Proxmox web GUI under Options on the container screen.

proxmox cpu units

If you prefer the command line, on the host you can use the vzctl set command:

vzctl set 101 --cpuunits 272004 --save


4 Comments

April MacDonald

11-Dec-2014 at 11:46 pm

Does this apply to KVM virtual machines too? Or does these have a different unit system?

    james.coyle

    12-Dec-2014 at 8:28 am

    No – KVM works differently.

Christophe

14-Feb-2016 at 8:44 am

Hello,

Thank you for your very clear description.

However I have a problem I can not solve, when I execute the command # vzcpucheck

I have the result: cat / proc / fairsched: No such file or directory

what should I do ?

Thanks in advance.

dfgas

26-Sep-2016 at 6:00 pm

on proxmox 4.2 how do you find the units now since vzcpucheck is not there?

Leave a Reply to Christophe Cancel reply

Visit our advertisers

Quick Poll

How often do you change the password for the computer(s) you use?

Visit our advertisers