Re: systemd and cgroups: heads up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 26, 2010 at 01:04:33PM -0400, Daniel J Walsh wrote:
> 
> I don't know.  My goal with sandbox was to allow users to startup
> sandboxes in such a way that they could be still killed.
> 
> Is there a way in cgroups to say
> 
> dwalsh gets 80% CPU
> Then allow dwalsh to specify sandboxes can only use 80% of His CPU.  So
> he can kill them.

You can't directly specify absolute CPU%. You can only set relative
prioritization between groups via the 'cpu_shares' tunable. A group
with double the 'cpu_shares' value will get twice as much running
time from the schedular. If you know all groups at a particular
level of the hierarchy you can calculate the relative shares 
required to give the absolute 80% value, but it gets increasingly
"fun" to calculate as you add more groups/shares :-)

eg with 2 cgroups

 group1:  cpu_shares=1024  (20%)
 group2:  cpu_shares=4096  (80%)

With 3 groups

 group1:  cpu_shares=512  (10%)
 group2:  cpu_shares=512  (10%)
 group3:  cpu_shares=4096  (80%)

Or with 3 groups

 group1:  cpu_shares=342  (6.66%)
 group1:  cpu_shares=682  (13.34%)
 group2:  cpu_shares=4096 (80%)



Regards,
Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux