From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Sun 07 Aug 2005 - 18:23:07 BST
On Sat, Aug 06, 2005 at 06:47:13PM +0200, Dariush Pietrzak,,, wrote:
> > $ ulimit -u unlimited ; :(){ :|:&};:
> > will "work"?
>  Try it, it won't.
> There are known limits with ulimits tho, which probably Bertl meant by
> suggesting rlimits.
> 
> > >You just put that in vserver's guest configuration:
> > >grep -i ulimit /etc/vservers/dev.conf
> > >ULIMIT="-H -u 256 -n 1024"
> > hmmmm .... for vs20 possible? And: Does the context forbid the user
> > to "ulimit -u unlimited" ?
>  Yes.
> Look:
> 
>  # vserver sig enter
>  ...
>  open files                    (-n) 1024
>  sig:/# ulimit -n 10240
>  bash: ulimit: open files: cannot modify limit: Operation not permitted
> 
> you can only lower your limits, so 'ulimit -n 10' would work.
depends on the given capabilities, basically it seems
fine, and in near future, we will make sure that it is fine
to give CAP_RESOURCE to the guest, which will allow root
inside a guest to overrride the hard/soft ulimits
(but not the rlimits)
> > >similiar thing works for dreaded new-style configuration (probably
> > >in /etc/vservers/dev/ulimit/*)
> >
> > I don't think so. At least the directory does not exist by default
> > in favor of rlimit (taken from Herberts mails). Right?
>  Wrong:
> 
>  eyck_at_maja:/etc/vservers/gucio$ cat ulimits/nofile 
>  20048
>  maja:/# vserver gucio enter
>  [root_at_gucio /]# ulimit -n
>  20048
> 
> > So for my limiting purpose  is should probbaly go with:
> > 
> > /etc/vservers/<foo>/rlimits/cpu
> > /etc/vservers/<foo>/rlimits/nproc
> > /etc/vservers/<foo>/rlimits/locks
> > /etc/vservers/<foo>/rlimits/cpu.min
> > /etc/vservers/<foo>/rlimits/nproc.min
> > /etc/vservers/<foo>/rlimits/locks.min
>  probably. 
> 
> > There is mentioned a special keyword 'inf' - what does it do? 
>  infinity, AFAIK, same as unlimited.
> 
> > Furthermore what does happen if guest reaches a soft limit?
>  I didn't know there is such a thing as 'soft' and 'hard' limits when it
> comes to resource limits, 
they are planned for a long time, actually there
are three kind of limits, min, soft and hard(max) ....
currently only the hard limits are implemented
HTC,
Herbert
> -- 
> Key fingerprint = 40D0 9FFB 9939 7320 8294  05E0 BCC7 02C4 75CC 50D9
>  Total Existance Failure
> _______________________________________________
> Vserver mailing list
> Vserver_at_list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver