[vserver] Re: cgroup to allocate CPU resource

From: Nirmal Guhan <vavatutu_at_gmail.com>
Date: Thu 17 Jun 2010 - 01:32:12 BST
Message-ID: <AANLkTimzl4t5haWAmcXgRdNwG-GXNkGwJiYP2j3sj5RM@mail.gmail.com>

Setting cpu.shares helps a bit but it still uses all the CPU when it is idle
(which I believe is ok and due to CFS). But wondering why the below values
don't fetch the expected behavior ?

--Nirmal

On Tue, Jun 15, 2010 at 2:37 PM, Nirmal Guhan <vavatutu@gmail.com> wrote:

> Hi,
>
> Am trying to put a (hard)limit on the CPU util of two of my VPS.
> I set
> 1) VPS 1 :
> cpu.rt_period_us to 1000000
> cpu.rt_runtime_us to 500000
> cpuset.cpus to 1
> 2) VPS 2:
> cpu.rt_period_us to 1000000
> cpu.rt_runtime_us to 100000
> cpuset.cpus to 1
> Basically I want VPS1 to use not more than 50% of CPU and VPS2 not more
> than 10%. This doesn't seem to work. I can see these values are set
> correctly when I cat /dev/cgroup/<VPS> but when I do vtop I always see ~50%
> from each of the VPS (Am just executing a C program that goes on an infinite
> loop in both the VPS for testing).
>
> Could someone sched some light? Am referring to
> http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/html/Resource_Management_Guide/cpu.htmlfor the documentation.
>
> Thanks,
> Nirmal
>
Received on Thu Jun 17 01:33:00 2010

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 17 Jun 2010 - 01:33:05 BST by hypermail 2.1.8