Editing
Util-vserver:Cgroups
(section)
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== <span class="editsection">[<nowiki/>[[index.php?title=util-vserver:Cgroups&action=edit§ion=14|edit]]]</span> <span class="mw-headline"> Dishing out different processors sets to different guest servers </span> ==== The "cpuset" for each guest is the subset of CPUs which it is permitted to use. I found out the number of CPUs available on my system by doing this: <pre>$ cat /dev/cgroup/cpuset.cpus</pre> This gave me the result 0-1, meaning that the overall set for my cgroups consists of CPUs 0 and 1 (for a quad core system one would expect the result 0-3, or for quad core with HT, 0-7). I stopped my guests, then for each guest specified a cpuset containing only CPU 0 for each of them: <pre>$ echo "0" > /etc/vservers/onetime/cgroup/cpuset.cpus $ echo "0" > /etc/vservers/twotime/cgroup/cpuset.cpus $ echo "0" > /etc/vservers/threetime/cgroup/cpuset.cpus $ echo "0" > /etc/vservers/fourtime/cgroup/cpuset.cpus $ echo "0" > /etc/vservers/fivetime/cgroup/cpuset.cpus</pre> On restarting the guest, I could see (using vtop) that these guest were only using the CPU 0 (the column "Last used cpu (SMP)" needs to be on in vtop in order to see this). This set up isn't particularly useful, but did allow me to check that the cpu.shares I specified for my guest were working as expected. <span id="Doing_this_to_servers_live"></span> <span id="edit-doing-this-to-servers-live"></span>
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information