On Sat, Jan 10, 2009 at 01:49:39PM +0100, Sebastien Bonnegent wrote: > Hi, > > I want to increase the rlimit "number of files" on a vserver guest. rlimit or ulimit? (note that we refer the the guest wide limit as rlimits, and to the 'user' limits as ulimts)? > So, I have to: > > Before, the default value is 1024: > # vserver foo enter > # ulimit -n > 1024 > # exit > > # echo SYS_RESOURCE >> /etc/vservers/foo/bcapabilities > # echo SET_RLIMIT >> /etc/vservers/foo/ccapabilities this one ~~~~~~~~~~ affects the ulimits, despite the name (mainline uses rlimit and ulimit alternatingly) > # mkdir /etc/vservers/foo/rlimits/ > # echo 2048 > /etc/vservers/foo/rlimits/nofile.soft > # echo 4096 > /etc/vservers/foo/rlimits/nofile.hard > # vserver foo restart > > "/etc/security/limits.conf" on the guest is empty, so the > default value for nofile is used. yep, the host default (1024) will be used unless you set the proper value in /etc/vservers/<guest>/ulimits > Now, "nofile" limit should be 4096 (at least 2048) but it isn't: check with /proc/virtual/<xid>/limits, the file limits should be 2048/4096 there > # vserver foo enter > # ulimit -n > 1024 > > There are another capability to enable ? see above ... HTC, Herbert > # vserver-info > Versions: > Kernel: 2.6.28-vs2.3.0.36.2-090106 > VS-API: 0x00020304 > util-vserver: 0.30.214; Mar 17 2008, 09:22:48 ~~~~~~~~~~~~~~~~~~~~~ you want to update that for this kernel branch > Features: > CC: gcc, gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu4) > CXX: g++, g++ (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu4) > 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 > Use dietlibc: yes > Build C++ programs: yes > Build C99 programs: yes > Available APIs: v13,net,v21,v22,v23,netv2 > 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 > > > -- > Cordialement - Sébastien Bonnegent > > "GNU/Linux, il y a moins bien mais c'est plus cher." > --------------------------------------------------------------------------------------- > | http://www.insa-rouen.fr/institution/organisation/equipe-de-direction/informatique/ | > --------------------------------------------------------------------------------------- > | Ingénieur système et réseau | Tél: 02 32 95 98 61 | GnuPG: 0x669176B0 | > ------------------------------------------------------------------------- > | https://asi.insa-rouen.fr/asipedia/index.php/GnuPG | > ------------------------------------------------------ >