Re: [Vserver] how to make default system running on the top of one vserver?
On Mon, Mar 19, 2007 at 12:45:38AM -0400, Wenbin Zhang wrote: Hello Guys, I have one question here, how to make default system running on the top of one vserver? That is: - vserver --- host linux hardware --- 1) I setup one server on the default host system. (Both the host system and the verser are linux). hopefully, otherwise it won't work, it's not a VM or VMM, Linux-VServer is OS-Level virtualization :) 2) After the machine power on and boot, the whole thing will be taken over by the vserver, say, the GUI display, the input are controlled by vserver automatically. so you have to put the relevant stuff into the context and provide that context with the necessary capabilities (depends on the actual hw interfaces) After boot, the user were not expected to use the host linux again. 3) But the display/input control still can be switched to the host linux in case of need. After using, the control will be able to switch back to vserver. that _really_ depends on the hw and the software used for e.g. interface and input ... you can put services into a context quite early in the system startup, you could even put the entire host init process into a context from initramfs Any good idea to achieve this? you might want to have a look at the MoreUbuntu solution for multi seat linux ... best, Herbert Thanks, Wenbin ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
[Vserver] Just for info
Hello I had a problem with vs2.2.0-rc16 on linux-2.6.20.2 (cf paste.linux-vserver.org/1275) It seems to work fine now with vs2.2.0-rc18 and kernel-2.6.20.3. srvweb:/usr/local# ./testme.sh Linux-VServer Test [V0.16] Copyright (C) 2003-2006 H.Poetzl chcontext is working. chbind is working. Linux 2.6.20.3-vs2.2.0-rc18 #1 SMP PREEMPT Sun Mar 18 10:58:12 CET 2007 i686 Ea 0.30.212 273/glibc (DSa) compat,v11,fscompat,v13,net,v21,oldproc,olduts VCI: 0002:0200 273 03000711 (TbP) --- [000]# succeeded. [001]# succeeded. [011]# succeeded. [031]# succeeded. [101]# succeeded. [102]# succeeded. [201]# succeeded. [202]# succeeded. srvweb:/usr/local# cat /proc/version Linux version 2.6.20.3-vs2.2.0-rc18 ([EMAIL PROTECTED]) (version gcc 3.3.5 (Debian 1:3.3.5-13)) #1 SMP PREEMPT Sun Mar 18 10:58:12 CET 2007 srvweb:/usr/local# zgrep -i vserver /proc/config.gz # Linux VServer # CONFIG_VSERVER_LEGACY is not set # CONFIG_VSERVER_LEGACYNET is not set # CONFIG_VSERVER_REMAP_SADDR is not set CONFIG_VSERVER_COWBL=y # CONFIG_VSERVER_VTIME is not set CONFIG_VSERVER_PROC_SECURE=y # CONFIG_VSERVER_HARDCPU is not set CONFIG_VSERVER_PRIVACY=y CONFIG_VSERVER_WARN=y # CONFIG_VSERVER_DEBUG is not set CONFIG_VSERVER=y CONFIG_VSERVER_NGNET=y srvweb:/usr/local# vserver-stat CTX PROCVSZRSS userTIME sysTIMEUPTIME NAME 0 85 596.7M 192.2M 23m08s77 7m17s52 20h46m31 root server 20 15 397.4M 121.6M 0m43s95 0m06s76 20h44m31 vweb1 21 15 521.4M 88.4M 0m04s61 0m01s86 20h44m17 vweb2 22 16 105.6M 38.3M 0m30s60 0m18s23 20h44m08 vweb3 Patrick ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] Re: Oops with rejecting routes in vservers instance
Herbert Poetzl escribiĆ³: will try to recreate it here ... Oops. Kernel 2.16.38-vs2.0.3-rc1 and same problem... okay, was actually easy to recreate, thanks to your information and testing ... turned out to be an issue present in recent versions too ... Is there any fix for this in the 'stable' 2.6.16 kernel? yep, we updated the 2.6.16 kernel to 2.6.16.43 and the patch to 2.0.3-rc2, you can find it here: http://vserver.13thfloor.at/Experimental/patch-2.6.16.43-vs2.0.3-rc2.diff thanks for spotting, Herbert Thanks for the fix! Now it works well. I've readed the IRC logs and seem that there's more fixes than this in the -rc2. I know how difficult is to maintain and /old/ version with an /old/ kernel so again thanks for this wonderful work with the 2.6.16 kernel and the 2.0.3. begin:vcard fn;quoted-printable:Asier Barangu=C3=A1n n;quoted-printable:Barangu=C3=A1n;Asier org;quoted-printable:ELPA Gesti=C3=B3n adr;quoted-printable;dom:;;Henao 4 - 3=C2=BAA;Bilbao;Bizkaia;48009 email;internet:[EMAIL PROTECTED] title:A/P tel;work:944.23.01.66 tel;fax:944.23.01.78 x-mozilla-html:FALSE url:http://www.elpagestion.com version:2.1 end:vcard ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] OCS Inventory
On 3/17/07, harry [EMAIL PROTECTED] wrote: in the same sense... disable all firewalls, open up your telnet port and allow passwordless rootlogin on all your machines or pull the plug those are the only possibilities, right? Are you asking me? D. blaze your trail -- redhat ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] Just for info
On Mon, Mar 19, 2007 at 09:26:39AM +0100, [EMAIL PROTECTED] wrote: Hello I had a problem with vs2.2.0-rc16 on linux-2.6.20.2 (cf paste.linux-vserver.org/1275) It seems to work fine now with vs2.2.0-rc18 and kernel-2.6.20.3. emphasis on seems .. IMHO this is a mainline issue with a disappearing tty-driver (either because the tty is reused while still active or something similar) it is currently tracked here: http://vserver.13thfloor.at/Stuff/BUGHUNT/bertl-0002 and I added your trace to the dir, because I think we are observing the very same issue ... best, Herbert srvweb:/usr/local# ./testme.sh Linux-VServer Test [V0.16] Copyright (C) 2003-2006 H.Poetzl chcontext is working. chbind is working. Linux 2.6.20.3-vs2.2.0-rc18 #1 SMP PREEMPT Sun Mar 18 10:58:12 CET 2007 i686 Ea 0.30.212 273/glibc (DSa) compat,v11,fscompat,v13,net,v21,oldproc,olduts VCI: 0002:0200 273 03000711 (TbP) --- [000]# succeeded. [001]# succeeded. [011]# succeeded. [031]# succeeded. [101]# succeeded. [102]# succeeded. [201]# succeeded. [202]# succeeded. srvweb:/usr/local# cat /proc/version Linux version 2.6.20.3-vs2.2.0-rc18 ([EMAIL PROTECTED]) (version gcc 3.3.5 (Debian 1:3.3.5-13)) #1 SMP PREEMPT Sun Mar 18 10:58:12 CET 2007 srvweb:/usr/local# zgrep -i vserver /proc/config.gz # Linux VServer # CONFIG_VSERVER_LEGACY is not set # CONFIG_VSERVER_LEGACYNET is not set # CONFIG_VSERVER_REMAP_SADDR is not set CONFIG_VSERVER_COWBL=y # CONFIG_VSERVER_VTIME is not set CONFIG_VSERVER_PROC_SECURE=y # CONFIG_VSERVER_HARDCPU is not set CONFIG_VSERVER_PRIVACY=y CONFIG_VSERVER_WARN=y # CONFIG_VSERVER_DEBUG is not set CONFIG_VSERVER=y CONFIG_VSERVER_NGNET=y srvweb:/usr/local# vserver-stat CTX PROCVSZRSS userTIME sysTIMEUPTIME NAME 0 85 596.7M 192.2M 23m08s77 7m17s52 20h46m31 root server 20 15 397.4M 121.6M 0m43s95 0m06s76 20h44m31 vweb1 21 15 521.4M 88.4M 0m04s61 0m01s86 20h44m17 vweb2 22 16 105.6M 38.3M 0m30s60 0m18s23 20h44m08 vweb3 Patrick ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
RE: [Vserver] Vserver CPU limit question
Hi Herbert, I repeated the same expriment with sched_hard. The result is the same, vserver is not able to enforce the CPU limit. I am under the impression that sched_prio will also make use of the priority scheme to limit CPU utilization per Vserver context Thanks for your help. -Albert -bash-2.05b# cat /proc/virtual/2/status UseCnt: 9 Tasks: 3 Flags: 000202020110 BCaps: 354c24ff CCaps: 0101 Ticks: 0 -bash-2.05b# cat /proc/virtual/3/status UseCnt: 9 Tasks: 3 Flags: 000202020110 BCaps: 354c24ff CCaps: 0101 Ticks: 0 top - 14:02:25 up 2:34, 3 users, load average: 1.91, 0.88, 0.34 Tasks: 132 total, 3 running, 129 sleeping, 0 stopped, 0 zombie Cpu(s): 100.0% us, 0.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si Mem:513084k total, 118572k used, 394512k free,16704k buffers Swap:0k total,0k used,0k free,46648k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 32600 root 25 0 1336 232 184 R 49.8 0.0 1:38.31 exceed_cpu_limi 32697 root 25 0 1336 232 184 R 49.8 0.0 1:14.18 exceed_cpu_limi -bash-2.05b# cat /proc/virtual/2/sched Token: 140 FillRate: 80 Interval:100 TokensMin:50 TokensMax: 140 PrioBias: 0 VaVaVoom: 0 cpu 0: 127657 47 0 -bash-2.05b# cat /proc/virtual/3/sched Token: 140 FillRate: 10 Interval:100 TokensMin:50 TokensMax: 140 PrioBias: 0 VaVaVoom: 0 cpu 0: 113825 45 0 -Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Sun 3/18/2007 7:45 AM To: Albert Mak (almak) Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] Vserver CPU limit question On Sat, Mar 17, 2007 at 10:17:47PM -0700, Albert Mak (almak) wrote: Hi Herbert Here is the output of /proc/virtual/2/status as requested Both context 2 and 3 have the same setting. -bash-2.05b# cat /proc/virtual/2/status UseCnt: 7 Tasks: 2 Flags: 000202020210 ~~ http://linux-vserver.org/Capabilities_and_Flags 0100 sched_hard 0200 sched_prio so you haven't enabled sched_hard here, which explains why you do not see hard scheduling behaviour :) HTC, Herbert BCaps: 354c24ff CCaps: 0101 Ticks: 0 Thanks. -Albert -Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Saturday, March 17, 2007 11:36 AM To: Albert Mak (almak) Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] Vserver CPU limit question On Fri, Mar 16, 2007 at 06:54:26PM -0700, Albert Mak (almak) wrote: 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 %MEMTIME+ 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/000:00:00 bash 6513 2 APP1 pts/000:03:01 exceed_cpu_limi 6616 3 APP2 pts/000:02:40 exceed_cpu_limi 7655 1 ALL_PROC pts/000:00:00 vps 7656 1 ALL_PROC pts/000:00:00 ps -bash-2.05b# pwd /etc/vservers/APP1 -bash-2.05b# cat flags sched_prio you want to add sched_hard here if you want hard scheduling, the prio scheduler will only adjust priorities according to the token buckets ... I'd also suggest to use a more recent kernel (and probably Linux-VServer patch) than this one as the scheduler was enhanced quite a lot in 2.2.x -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
Re: [Vserver] Vserver CPU limit question
On Mon, Mar 19, 2007 at 01:52:42PM -0700, Albert Mak (almak) wrote: Hi Herbert, I repeated the same expriment with sched_hard. The result is the same, vserver is not able to enforce the CPU limit. I am under the impression that sched_prio will also make use of the priority scheme to limit CPU utilization per Vserver context sounds really strange, as it is working fine here ... (with linux-2.6.19.7-vs2.2.0-rc19) here is a short example how you can test it, eliminating all possible reasons for doing something wrong - get and compile the vcmd tool [1] and the cpuhog [2] - do the following incantations: vcmd -i 100 -BC ctx_create .flagword=^34^33^32^8 -- cpuhog - check the results with 'vtop' which should show something like this: PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 29 root 25 0 1312 252 200 H 24.5 0.5 0:33.81 cpuhog 30 root 16 0 1808 900 728 R 1.5 1.6 0:14.84 top by default, the CPU limit will be roughly 25% without doing any adjustments to the token buckets ... also note that a working token bucket looks like this: FillRate: 1,1 Interval: 4,8 TokensMin:6 TokensMax: 50 PrioBias: 0 cpu 0: 5296 11 17101 5288 0 R- 6 6 50 1/4 1/8 0 0 ~~ hold ticks I will check that with your ancient kernel and patch version shortly ... HTH, Herbert [1] http://vserver.13thfloor.at/Experimental/TOOLS/vcmd-0.08.tar.bz2 [2] http://vserver.13thfloor.at/Experimental/TOOLS/cpuhog.c Thanks for your help. -Albert -bash-2.05b# cat /proc/virtual/2/status UseCnt: 9 Tasks: 3 Flags: 000202020110 BCaps: 354c24ff CCaps: 0101 Ticks: 0 -bash-2.05b# cat /proc/virtual/3/status UseCnt: 9 Tasks: 3 Flags: 000202020110 BCaps: 354c24ff CCaps: 0101 Ticks: 0 top - 14:02:25 up 2:34, 3 users, load average: 1.91, 0.88, 0.34 Tasks: 132 total, 3 running, 129 sleeping, 0 stopped, 0 zombie Cpu(s): 100.0% us, 0.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si Mem:513084k total, 118572k used, 394512k free,16704k buffers Swap:0k total,0k used,0k free,46648k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 32600 root 25 0 1336 232 184 R 49.8 0.0 1:38.31 exceed_cpu_limi 32697 root 25 0 1336 232 184 R 49.8 0.0 1:14.18 exceed_cpu_limi -bash-2.05b# cat /proc/virtual/2/sched Token: 140 FillRate: 80 Interval:100 TokensMin:50 TokensMax: 140 PrioBias: 0 VaVaVoom: 0 cpu 0: 127657 47 0 -bash-2.05b# cat /proc/virtual/3/sched Token: 140 FillRate: 10 Interval:100 TokensMin:50 TokensMax: 140 PrioBias: 0 VaVaVoom: 0 cpu 0: 113825 45 0 -Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Sun 3/18/2007 7:45 AM To: Albert Mak (almak) Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] Vserver CPU limit question On Sat, Mar 17, 2007 at 10:17:47PM -0700, Albert Mak (almak) wrote: Hi Herbert Here is the output of /proc/virtual/2/status as requested Both context 2 and 3 have the same setting. -bash-2.05b# cat /proc/virtual/2/status UseCnt: 7 Tasks: 2 Flags: 000202020210 ~~ http://linux-vserver.org/Capabilities_and_Flags 0100 sched_hard 0200 sched_prio so you haven't enabled sched_hard here, which explains why you do not see hard scheduling behaviour :) HTC, Herbert BCaps: 354c24ff CCaps: 0101 Ticks: 0 Thanks. -Albert -Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Saturday, March 17, 2007 11:36 AM To: Albert Mak (almak) Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] Vserver CPU limit question On Fri, Mar 16, 2007 at 06:54:26PM -0700, Albert Mak (almak) wrote: 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,
Re: [Vserver] Vserver CPU limit question
On Mon, Mar 19, 2007 at 11:40:01PM +0100, Herbert Poetzl wrote: On Mon, Mar 19, 2007 at 01:52:42PM -0700, Albert Mak (almak) wrote: Hi Herbert, I repeated the same expriment with sched_hard. The result is the same, vserver is not able to enforce the CPU limit. I am under the impression that sched_prio will also make use of the priority scheme to limit CPU utilization per Vserver context sounds really strange, as it is working fine here ... (with linux-2.6.19.7-vs2.2.0-rc19) here is a short example how you can test it, eliminating all possible reasons for doing something wrong - get and compile the vcmd tool [1] and the cpuhog [2] - do the following incantations: vcmd -i 100 -BC ctx_create .flagword=^34^33^32^8 -- cpuhog - check the results with 'vtop' which should show something like this: PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 29 root 25 0 1312 252 200 H 24.5 0.5 0:33.81 cpuhog 30 root 16 0 1808 900 728 R 1.5 1.6 0:14.84 top by default, the CPU limit will be roughly 25% without doing any adjustments to the token buckets ... also note that a working token bucket looks like this: FillRate: 1,1 Interval: 4,8 TokensMin: 6 TokensMax: 50 PrioBias: 0 cpu 0: 5296 11 17101 5288 0 R- 6 6 50 1/4 1/8 0 0 ~~ hold ticks I will check that with your ancient kernel and patch version shortly ... tested now with 2.6.14.3-vs2.0.1 ... works fine here as expected: PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 22 root 25 0 1304 252 200 R 24.1 0.4 0:09.59 cpuhog 23 root 17 0 1800 896 728 R 2.5 1.5 0:02.72 top best, Herbert HTH, Herbert [1] http://vserver.13thfloor.at/Experimental/TOOLS/vcmd-0.08.tar.bz2 [2] http://vserver.13thfloor.at/Experimental/TOOLS/cpuhog.c Thanks for your help. -Albert -bash-2.05b# cat /proc/virtual/2/status UseCnt: 9 Tasks: 3 Flags: 000202020110 BCaps: 354c24ff CCaps: 0101 Ticks: 0 -bash-2.05b# cat /proc/virtual/3/status UseCnt: 9 Tasks: 3 Flags: 000202020110 BCaps: 354c24ff CCaps: 0101 Ticks: 0 top - 14:02:25 up 2:34, 3 users, load average: 1.91, 0.88, 0.34 Tasks: 132 total, 3 running, 129 sleeping, 0 stopped, 0 zombie Cpu(s): 100.0% us, 0.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si Mem:513084k total, 118572k used, 394512k free,16704k buffers Swap:0k total,0k used,0k free,46648k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 32600 root 25 0 1336 232 184 R 49.8 0.0 1:38.31 exceed_cpu_limi 32697 root 25 0 1336 232 184 R 49.8 0.0 1:14.18 exceed_cpu_limi -bash-2.05b# cat /proc/virtual/2/sched Token: 140 FillRate: 80 Interval:100 TokensMin:50 TokensMax: 140 PrioBias: 0 VaVaVoom: 0 cpu 0: 127657 47 0 -bash-2.05b# cat /proc/virtual/3/sched Token: 140 FillRate: 10 Interval:100 TokensMin:50 TokensMax: 140 PrioBias: 0 VaVaVoom: 0 cpu 0: 113825 45 0 -Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Sun 3/18/2007 7:45 AM To: Albert Mak (almak) Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] Vserver CPU limit question On Sat, Mar 17, 2007 at 10:17:47PM -0700, Albert Mak (almak) wrote: Hi Herbert Here is the output of /proc/virtual/2/status as requested Both context 2 and 3 have the same setting. -bash-2.05b# cat /proc/virtual/2/status UseCnt: 7 Tasks: 2 Flags: 000202020210 ~~ http://linux-vserver.org/Capabilities_and_Flags 0100 sched_hard 0200 sched_prio so you haven't enabled sched_hard here, which explains why you do not see hard scheduling behaviour :) HTC, Herbert BCaps: 354c24ff CCaps: 0101 Ticks: 0 Thanks. -Albert -Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Saturday, March 17, 2007 11:36 AM To: Albert Mak (almak) Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] Vserver CPU limit question On Fri, Mar 16, 2007 at 06:54:26PM -0700, Albert Mak (almak) wrote: 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
RE: [Vserver] Vserver CPU limit question
Thanks Herbert, I am double checking what is up with my setup! -Albert -Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Monday, March 19, 2007 4:57 PM To: Albert Mak (almak); vserver@list.linux-vserver.org Subject: Re: [Vserver] Vserver CPU limit question On Mon, Mar 19, 2007 at 11:40:01PM +0100, Herbert Poetzl wrote: On Mon, Mar 19, 2007 at 01:52:42PM -0700, Albert Mak (almak) wrote: Hi Herbert, I repeated the same expriment with sched_hard. The result is the same, vserver is not able to enforce the CPU limit. I am under the impression that sched_prio will also make use of the priority scheme to limit CPU utilization per Vserver context sounds really strange, as it is working fine here ... (with linux-2.6.19.7-vs2.2.0-rc19) here is a short example how you can test it, eliminating all possible reasons for doing something wrong - get and compile the vcmd tool [1] and the cpuhog [2] - do the following incantations: vcmd -i 100 -BC ctx_create .flagword=^34^33^32^8 -- cpuhog - check the results with 'vtop' which should show something like this: PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 29 root 25 0 1312 252 200 H 24.5 0.5 0:33.81 cpuhog 30 root 16 0 1808 900 728 R 1.5 1.6 0:14.84 top by default, the CPU limit will be roughly 25% without doing any adjustments to the token buckets ... also note that a working token bucket looks like this: FillRate: 1,1 Interval: 4,8 TokensMin: 6 TokensMax: 50 PrioBias: 0 cpu 0: 5296 11 17101 5288 0 R- 6 6 50 1/4 1/8 0 0 ~~ hold ticks I will check that with your ancient kernel and patch version shortly ... tested now with 2.6.14.3-vs2.0.1 ... works fine here as expected: PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 22 root 25 0 1304 252 200 R 24.1 0.4 0:09.59 cpuhog 23 root 17 0 1800 896 728 R 2.5 1.5 0:02.72 top best, Herbert HTH, Herbert [1] http://vserver.13thfloor.at/Experimental/TOOLS/vcmd-0.08.tar.bz2 [2] http://vserver.13thfloor.at/Experimental/TOOLS/cpuhog.c Thanks for your help. -Albert -bash-2.05b# cat /proc/virtual/2/status UseCnt: 9 Tasks: 3 Flags: 000202020110 BCaps: 354c24ff CCaps: 0101 Ticks: 0 -bash-2.05b# cat /proc/virtual/3/status UseCnt: 9 Tasks: 3 Flags: 000202020110 BCaps: 354c24ff CCaps: 0101 Ticks: 0 top - 14:02:25 up 2:34, 3 users, load average: 1.91, 0.88, 0.34 Tasks: 132 total, 3 running, 129 sleeping, 0 stopped, 0 zombie Cpu(s): 100.0% us, 0.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si Mem:513084k total, 118572k used, 394512k free,16704k buffers Swap:0k total,0k used,0k free,46648k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 32600 root 25 0 1336 232 184 R 49.8 0.0 1:38.31 exceed_cpu_limi 32697 root 25 0 1336 232 184 R 49.8 0.0 1:14.18 exceed_cpu_limi -bash-2.05b# cat /proc/virtual/2/sched Token: 140 FillRate: 80 Interval:100 TokensMin:50 TokensMax: 140 PrioBias: 0 VaVaVoom: 0 cpu 0: 127657 47 0 -bash-2.05b# cat /proc/virtual/3/sched Token: 140 FillRate: 10 Interval:100 TokensMin:50 TokensMax: 140 PrioBias: 0 VaVaVoom: 0 cpu 0: 113825 45 0 -Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Sun 3/18/2007 7:45 AM To: Albert Mak (almak) Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] Vserver CPU limit question On Sat, Mar 17, 2007 at 10:17:47PM -0700, Albert Mak (almak) wrote: Hi Herbert Here is the output of /proc/virtual/2/status as requested Both context 2 and 3 have the same setting. -bash-2.05b# cat /proc/virtual/2/status UseCnt: 7 Tasks: 2 Flags: 000202020210 ~~ http://linux-vserver.org/Capabilities_and_Flags 0100 sched_hard 0200 sched_prio so you haven't enabled sched_hard here, which explains why you do not see hard scheduling behaviour :) HTC, Herbert BCaps: 354c24ff CCaps: 0101 Ticks: 0 Thanks. -Albert -Original Message- From: Herbert Poetzl [mailto:[EMAIL PROTECTED] Sent: Saturday, March 17, 2007 11:36 AM To: Albert Mak (almak) Cc: vserver@list.linux-vserver.org Subject: Re: [Vserver] Vserver CPU limit question On Fri, Mar 16, 2007 at 06:54:26PM -0700, Albert Mak (almak) wrote: Hi, I have Linux (2.6.14.3