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=3|edit]]]</span> <span class="mw-headline"> Draft - Distributing cpu shares with cgroups </span> == From what i gathered in sched-design-CFS.txt [http://people.redhat.com/mingo/cfs-scheduler/sched-design-CFS.txt [1]] This is simply done by adjusting the cpu.shares. Just do: echo '512' > /dev/cgroup/<guest name>/cpu.shares The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple : <pre> vserver guest 1 => 512 vserver guest 2 => 512 vserver guest 3 => 2048 vserver guest 4 => 512</pre> so you have a total of 3584 cpu shares (2048+512+512+512) , then you get : <pre> vserver guest 1 => 512 / 3584 = 14% cpu vserver guest 2 => 512 / 3584 = 14% cpu vserver guest 3 => 2048 / 3584 = 57% cpu vserver guest 4 => 512 / 3584 = 14% cpu</pre> <br /> <br /> Note that this is fair scheduling and this will not enfore HARD limit (as far as i know). <span id="Making_share_permanent_with_util_vserver"></span> <span id="edit-making-share-permanent-with-util-vserver"></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