About this list Date view Thread view Subject view Author view Attachment view

From: edward_at_DigitalAngel.com.au
Date: Mon 23 Sep 2002 - 09:19:37 BST


First impression from the patch:

There may be noticable performance hit
because of several iterations through
the full list of processes in mmap.c whenever
a process needs to allocate a memory block

I'd probable keep the resource limits/usage inside
s_info structure instead but then you'd need to keep updating it
and worry about locking...

hth
Ed

On Monday, 23 September 2002 at 1:58, J. Nick Koston wrote:

> I've attached a patch against 2.4.19ctx-13 that creates a new
> rlimit called RLIMIT_CTX_AS. You'll need to use attached
> vserver-setmemlimit program to set the limit (right now it is hard
> coded to a 200 meg limit ... just edit and recompile)
>
> Basic howto:
>
> Patch your kernel sources with the patch-2.4.19ctx-13
> Patch your kernel sources with patch-rlimit-ctx-as.patch
>
> Patch the vserver-0.20 package with vserver-0.20-ctx_as-limit.patch
> Copy the new chcontext into /usr/sbin
>
> Find the S_FLAGS line and add "mem" into the line
>
> Example: S_FLAGS="lock nproc sched mem"
>
> Compile the two vserver-*memlimit programs (note: vserver-setmemlimit
> starts an ash shell by default.. edit the source and change it to bash
> if you don't have ash)
>
> gcc vserver-setmemlimit.c -o vserver-setmemlimit
> gcc vserver-showmemlimit.c -o vserver-showmemlimit
> [root_at_localhost root]# ./vserver-setmemlimit
> # ./vserver-showmemlimit
> Current Vserver Memory Limit: 200 Megs
> # vserver <vservername> start
>
> I'm not sure if this is the best way to do this, but it seems to
> work ok. I have no idea if this is SMP safe, or if this is even a
> good thing (tm) so I'd appricate comments.
>
> -Nick
>
>
>
>


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 06 Nov 2002 - 07:03:42 GMT by hypermail 2.1.3