[vserver] cgroup to allocate CPU resource

From: Nirmal Guhan <vavatutu_at_gmail.com>
Date: Tue 15 Jun 2010 - 22:37:58 BST
Message-ID: <AANLkTil6rhhtE-_5WMZDp5d3sxSYEDlP8HiuM5Zjk4QC@mail.gmail.com>

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 Tue Jun 15 22:38:48 2010

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 15 Jun 2010 - 22:38:52 BST by hypermail 2.1.8