LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 06-07-2011, 04:11 AM   #1
spokz
LQ Newbie
 
Registered: May 2008
Location: Poland
Distribution: Debian
Posts: 13

Rep: Reputation: 0
cgroups


Hi.

I managed to create /cgroup/jail group, then I added (not through 'echo' command because permission denied error shows - maybe this is the problem?) chosen PID to tasks file and then '102' to cpu.shares (as 102 is 10% of cpu).

This process still uses more than 10% of cpu.
Anybody knows how to have it works fine?
 
Old 06-07-2011, 10:50 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,767

Rep: Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765
cgroups

My understanding, not verified, but...

I think that is a little deceptive.
You see, you are not LIMITING it to 10%, you are GUARENTEEING it 10%!
The system can give it MORE as long as there is more to give, but will always try to ensure that it has AT LEAST 10% available to it.
 
Old 06-07-2011, 02:49 PM   #3
spokz
LQ Newbie
 
Registered: May 2008
Location: Poland
Distribution: Debian
Posts: 13

Original Poster
Rep: Reputation: 0
Well, I still think 102 in cpu.shares limit cpu power to 10% of physical cpu. But probably if other procesess don't use whole cpu power, even limited process can use more than 10%. Only when physical cpu usage reach 100%, cgroup limits included procesess.

I'm going to test this in virtual environment tomorrow and post the result.
 
Old 06-08-2011, 05:48 AM   #4
spokz
LQ Newbie
 
Registered: May 2008
Location: Poland
Distribution: Debian
Posts: 13

Original Poster
Rep: Reputation: 0
My assumptions were right I guess. When physical CPU is 100% used, chosen procesess in cgroup are limited and can use only as much cpu power as I give them in cpu.shares.
But on the other hand I can say cgroups don't work too precisely (from what I saw in 'top').
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CGROUPs and fair group scheduling AxeMan68 Linux - General 1 04-24-2010 06:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 05:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration