Re: How cpu entitlement is calculated/enforce for cpu subgroup?

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

 



在 2014年09月15日 08:51, John Wei 写道:
> I understand that CPU entitlement is based on cpu.share. If all the groups
> are defined at first level, that is simple.
> Once subgroups are defined, cgroups behave differently.
> If you define cgroups hierarchy, then CPU entitlement is enforced base on
> the cpu.share of "each" group and subgroup.
> For example:
> * group A has 1024 cpu.share
>    Group A has two subgroup: A1, A2. Each has 1024 cpu.share
> * group B has 1024 cpu.share
> If you run process(es) in group, A, A1, A2, and, B. Each group and subgroups
> get 25% of all the CPU.
> 
> Below is an example on defining cgroup hierarchy
> Cpu = /cgroups/hierarchy
> Cpuacct = /cgroup/hierarch
> Memory = /cgroup/hierarch
> 
> If you do not define cgroup hierarchy, then cgroup treat A/A1/A2 as one
> group and will get 50% CPU, and B will get 50% as well.
> I can understand the reason why it is implemented this way. But, I don't
> understand how cgroup divide that 50%  between A, A1, and A2.
> During my testing, I found A1 and A2 received 10%, while the processes in
> group A received about 30% CPU. All together, processes in A/A1/A2 received
> about 50% CPU.
> 

hi sir,

I'm a nobody.
when there are 2 groups in level 1st (A and B), then A=50% and
B=50%(because A=1024 , B=1024 they are same. so they will have the same
priority get cpu time).
and in the subgroup should following above-mentioned rules.(in same level).

And in this scenario ,when B group no processes,then A group will be 100%.

ok ,this is my point.

welcome any body to correct me.

> What is the formulate for this scenario? Is there a document for this.
> 
> John
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe cgroups" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux