On Fri, Feb 23, 2007 at 07:05:24PM +0900, Taisuke Yamada wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi.
> 
> Yesterday, I tried to find out absolute maximum number of
> virtualhosts I can host on my server, and got this message after
> 40-50VMs:

yes, known issue with the debian kernel, if you
switch to mainline kernels, you will get to
roughly 5000-8000 contexts ...

>   # vserver vh2-59 start
>   vcontext: vc_create_context(): Out of memory
> 
> This is much lower than expected limit (I have 4GB of memory),
> and contrary to above message, there is plenty of free memory:
> 
>   # free
>              total     used     free  shared  buffers   cached
>   Mem:     3633332  2365060  1268272       0   305952  1706888
>   -/+ buffers/cache: 352220  3281112
>   Swap:    2907724       44  2907680
> 
> I also checked ulimit, but all of them are either unlimited or
> huge enough. I did some searching and wondering if vserver is
> limited to 1G (due to 3G/1G split) of memory kernel can use, thus
> ignoring other 3GB.

nope, not at all, though with 4GB memory, the
1G/3G split would be better in most cases, but
again, this issue is not present in mainline
kernels, only in the debian ones ...

> Is this the case? In any case, how can I workaround this issue?

simple, get a 2.6.19.4 and patch it with a
recent patch, e.g. this one:

 http://vserver.13thfloor.at/Experimental/patch-2.6.19.4-vs2.2.0-rc14.diff

and the issue will be gone ... otherwise, wait
for the next debian kernel release, which will
hopefully fix this issue ...

> I'm using Debian GNU/Linux (sid/4.0), with 2.6.18-4-vserver-686
> kernel package. Current environment and vserver status are as follows:
> 
>   # vserver-stat
>   CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME
>   0       54 259.8M  98.8M  10m35s34   2h46m59   1d19h03 root server
>   49294    4   7.7M   2.5M   0m00s00   0m00s20   1m37s30 vh2-10
>   49295    4   7.7M   2.5M   0m00s00   0m00s20   1m36s71 vh2-11
>   ...
>   49378    4   7.7M   2.5M   0m00s10   0m00s10   0m06s90 vh2-58

you should really switch to static contexts
too, because the dynamic ones are deprecated
for more than a year now and will go away
soon ...

>   # vserver-stat | wc -l
>   51
> 
>   # vserver-info
>   Versions:
>           Kernel: 2.6.18-4-vserver-686
>           VS-API: 0x00020002
>     util-vserver: 0.30.212; Dec  9 2006, 12:26:51
> 
>   Features:
>                      CC: gcc, gcc (GCC) 4.1.2 20061115 (prerelease)
> (Debian 4.1.1-20)
>                     CXX: g++, g++ (GCC) 4.1.2 20061115 (prerelease)
> (Debian 4.1.1-20)
>                CPPFLAGS: ''
>                  CFLAGS: '-Wall -g  -O2 -std=c99 -Wall -pedantic -W
> - -funit-at-a-time'
>                CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W
> - -fmessage-length=0 -funit-at-a-time'
>              build/host: i486-pc-linux-gnu/i486-pc-linux-gnu

you can probably improve overall performance
of the system, by not compiling for 486
machines too :)

>            Use dietlibc: yes
>      Build C++ programs: yes
>      Build C99 programs: yes
>          Available APIs: compat,v11,fscompat,v13,net,v21,oldproc,olduts
>           ext2fs Source: e2fsprogs
>   syscall(2) invocation: alternative
>     vserver(2) syscall#: 273/glibc
> 
>   Paths:
>                  prefix: /usr
>       sysconf-Directory: /etc
>           cfg-Directory: /etc/vservers
>        initrd-Directory: $(sysconfdir)/init.d
>      pkgstate-Directory: /var/run/vservers
>         vserver-Rootdir: /var/lib/vservers
> 
>   # dmesg
>   Linux version 2.6.18-4-vserver-686 (Debian 2.6.18.dfsg.1-10)
> ([EMAIL PROTECTED]) (gcc version 4.1.2 20061115 (prerelease) (Debian
> 4.1.1-21)) #1 SMP Fri Feb 2 17:58:05 UTC 2007
>   ...
>   Use a PAE enabled kernel.
>   3200MB HIGHMEM available.
>   896MB LOWMEM available.

a 1G/3G split will give you slightly below
3GB lowmem, and you might consider disabling
highmem completely ... but YMMV

best,
Herbert
 
> Thanks in advance.
> - --
> Taisuke Yamada <[EMAIL PROTECTED]>, http://rakugaki.org/
> 2268 E9A2 D4F9 014E F11D  1DF7 DCA3 83BC 78E5 CD3A
> 
> Message to my public address may not be handled in a timely manner.
> For a direct contact, please use my private address on my namecard.
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFF3rxj3KODvHjlzToRAoE5AJ4nDfuRX+GKSHrYePmmgpcxgs5J/wCgs2JD
> RTGqDpIt0DefrJIteprsOjo=
> =5yg+
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> Vserver mailing list
> [email protected]
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
[email protected]
http://list.linux-vserver.org/mailman/listinfo/vserver

Reply via email to