Book Image

OpenVZ Essentials

By : Mark Furman
Book Image

OpenVZ Essentials

By: Mark Furman

Overview of this book

Table of Contents (13 chapters)

Managing and configuring the CPU


In this section, we are going to cover CPU management, including how to manage CPU share and configuring the number of CPUs inside more than one container.

CPU share

You can use the OpenVZ CPU resource utilities to allot to any container a guarantee of the amount of CPU time it receives.

vzcpucheck

We use the vzcpucheck command to check the current hardware node CPU utilization using the following command:

vzcpucheck

In the previous example, we can see that when we run vzcpucheck, Current CPU utilization is 2501 (this is the total number of CPU units consumed by the running container and processes on the server) and Power of the node is 159625 (which is the total CPU processing power).

In this example, we used the vzcpucheck command to show our changes to the current CPU utilization for the container 101.

Setting up a container to use a set amount of CPU units

To set the container to use a set amount of CPU time, we use the following vzctl command:

vzctl set 101...