[Vserver] Vserver CPU limit question

From: Albert Mak (almak) <almak_at_cisco.com>
Date: Sat 17 Mar 2007 - 01:54:26 GMT
Message-ID: <04DE7A2901EDA049A1F3BC06AF3C78590383E8B1@xmb-sjc-226.amer.cisco.com>

Hi,

I have Linux (2.6.14.3 Kernel) with Vserver 2.0.1 and testing the CPU
limit capabilities. I have 2 vserver contexts both running CPU intensive
app capable of using up 100% CPU, I am setting up on vserver to limit 1
context to 10% CPU and the 2nd to 80% CPU, both using flags sched_prio.
I am seeing CPU usage split 50/50 between the 2 contexts. I repeated the
same test using sched_hard with the same result (kernel VSERVER_HARDCPU
config set to y). I am expecting to see at least the CPU usage close to
the Vserver limits.

Have I got the wrong settings or some other issues. Your help is really
appreciated.

-Albert

top - 18:37:04 up 26 min, 1 user, load average: 2.04, 1.40, 0.62
Tasks: 127 total, 3 running, 124 sleeping, 0 stopped, 0 zombie
Cpu(s): 98.7% us, 1.3% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi,
0.0% si
Mem: 513084k total, 115660k used, 397424k free, 10200k buffers
Swap: 0k total, 0k used, 0k free, 39332k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 6616 root 20 0 1332 228 184 R 49.8 0.0 2:23.12
exceed_cpu_limi
 6513 root 20 0 1336 232 184 R 48.1 0.0 2:43.79
exceed_cpu_limi

-bash-2.05b# vps
  PID CONTEXT TTY TIME CMD
 3672 0 MAIN pts/0 00:00:00 bash
 6513 2 APP1 pts/0 00:03:01 exceed_cpu_limi
 6616 3 APP2 pts/0 00:02:40 exceed_cpu_limi
 7655 1 ALL_PROC pts/0 00:00:00 vps
 7656 1 ALL_PROC pts/0 00:00:00 ps

-bash-2.05b# pwd
/etc/vservers/APP1
-bash-2.05b# cat flags
sched_prio
-bash-2.05b# cat schedule
80
100
200
50
140
dummy

-bash-2.05b# pwd
/etc/vservers/APP2
-bash-2.05b# cat flags
sched_prio
-bash-2.05b# cat schedule
10
100
200
50
140
dummy

-bash-2.05b# cat /proc/virtual/2/sched
Token: 140
FillRate: 1
Interval: 100
TokensMin: 50
TokensMax: 140
PrioBias: 0
VaVaVoom: -5
cpu 0: 229674 71 0

-bash-2.05b# cat /proc/virtual/3/sched
Token: 140
FillRate: 10
Interval: 100
TokensMin: 50
TokensMax: 140
PrioBias: 0
VaVaVoom: -5
cpu 0: 217275 54 0
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Sat Mar 17 02:33:15 2007

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 17 Mar 2007 - 02:33:22 GMT by hypermail 2.1.8