Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenVZ Essentials

You're reading from   OpenVZ Essentials Create and administer virtualized containers on your server using the robust OpenVZ

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781782167327
Length 110 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Mark Furman Mark Furman
Author Profile Icon Mark Furman
Mark Furman
Arrow right icon
View More author details
Toc

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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime