Hi,
I updated to another kernel (2.6.18.2) and another vserver version (vs2.0.2.2-rc6), and I think
the hard cpu scheduling doesn't work as expected.
What I'm trying to do is to limit the CPU cycles for xid 8004 (deb4).
In vserver 8004 the following command is running:
cat /dev/zero | gzip | gzip | gzip > /dev/null
vtop shows:
top - 09:55:24 up 18:05, 11 users, load average: 1.12, 0.67, 0.33
Tasks: 167 total, 3 running, 164 sleeping, 0 stopped, 0 zombie
Cpu(s): 86.4%us, 13.3%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.3%hi, 0.0%si, 0.0%st
Mem: 904876k total, 875096k used, 29780k free, 131580k buffers
Swap: 1003960k total, 0k used, 1003960k free, 355168k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14417 root 25 0 1820 656 276 R 91.1 0.1 2:26.04 gzip
According to the shedule (see below), the CPU should be limited to 100*3/20 = 15 %
additional info:
host:/tmp# vserver --version
vserver 0.30.211 -- manages the state of vservers
This program is part of util-vserver 0.30.211
Copyright (C) 2003,2004,2005 Enrico Scholz
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
host:/tmp# bash ./testme.sh-0.16 -v
Linux-VServer Test [V0.16] Copyright (C) 2003-2006 H.Poetzl
chcontext is working.
chbind is working.
chcontext 0.30.211 -- allocates/enters a security context
This program is part of util-vserver 0.30.211
Copyright (C) 2004 Enrico Scholz
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
Linux 2.6.18.2-vs2.0.2.2-rc6.061120 #1 PREEMPT Mon Nov 20 15:33:17 CET 2006 i686
Ea 0.30.211 273/glibc (DSa) <compat,v11,fscompat,v13,net,oldproc,olduts>
VCI: 0002:0002 273 03000036 (TbLgnP)
(root@host)
(gcc version 4.1.2 20061115 (prerelease)
(Debian 4.1.1-20))
#1 PREEMPT Mon Nov 20 15:33:17 CET 2006
--- # chcontext true && chcontext --xid 45678 true # succeeded. # chcontext --xid 45678 egrep 'context|VxID' /proc/self/status # succeeded. # chcontext --secure --xid 45678 mknod /tmp/testme.sh-0.16.cB7844/node c 0 0 # succeeded. # chcontext --hostname zaphod.7841 uname -a | grep -q zaphod.7841 # succeeded. # chbind --ip 192.168.0.42 true # succeeded. # chbind --ip 192.168.0.1/255.255.255.0 --ip 10.0.0.1/24 true # succeeded. # chcontext --xid 45678 --flag fakeinit bash -c 'test $$ -eq 1' # succeeded. # chcontext --flag fakeinit bash -c 'test $$ -eq 1' # succeeded. host:/tmp# vserver-stat CTX PROC VSZ RSS userTIME sysTIME UPTIME NAME 0 151 1.3G 547.1M 1h31m06 9m29s29 16h20m45 root server 1 1 2.2M 1.1M 0m03s11 0m04s68 45m04s93 monitoring server 8003 8 118.8M 37.8M 1m32s14 0m13s57 16h18m07 deb3 8004 7 23M 7.4M 0m00s30 0m00s00 43m14s33 deb4 host:/tmp# cat /etc/vservers/deb4/flags sched_hard host:/tmp# cat /etc/vservers/deb4/schedule 3 20 500 10 500 0 host:/tmp# cat /proc/virtual/8004/status UseCnt: 30 Tasks: 11 Flags: 0000000202020110 BCaps: 00000000344c04ff CCaps: 0000000000000101 Ticks: 0 host:/tmp# cat /proc/virtual/8004/sched Token: 500 FillRate: 3 Interval: 20 TokensMin: 10 TokensMax: 500 PrioBias: 0 VaVaVoom: 0 cpu 0: 0 0 0 host:/tmp# uname -a Linux host 2.6.18.2-vs2.0.2.2-rc6.061120 #1 PREEMPT Mon Nov 20 15:33:17 CET 2006 i686 GNU/Linux host:/tmp# grep -i vserver /usr/src/linux-2.6.18.2/.config # Linux VServer CONFIG_VSERVER_LEGACY=y # CONFIG_VSERVER_LEGACY_VERSION is not set CONFIG_VSERVER_LEGACYNET=y CONFIG_VSERVER_PROC_SECURE=y CONFIG_VSERVER_HARDCPU=y # CONFIG_VSERVER_HARDCPU_IDLE is not set # CONFIG_VSERVER_DEBUG is not set CONFIG_VSERVER=y CONFIG_VSERVER_SECURITY=y ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** _______________________________________________ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserverReceived on Tue Nov 21 09:08:53 2006