Subject: Re: managing process memory limits on the fly?
To: Carl Brewer <carl@bl.echidna.id.au>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: netbsd-users
Date: 02/21/2007 21:27:14
On Thu, 22 Feb 2007 13:18:50 +1100
Carl Brewer <carl@bl.echidna.id.au> wrote:
> Steven M. Bellovin wrote:
>
> > I believe it only applies via login. If you have a root process
> > starting the zope process, have the root process change its soft (or
> > hard) limit before invoking the 'su' command.
>
> I expect the most suitable place to do that would be in the rc.d
> script? It would, I think, require the least maintenance when
> zope gets updated etc? Will the children (zope-owned) inherit
> limit|ulimit settings from an rc script ok?
Yes.
However, there's one thing to watch for. If I'm not mistaken, all of
the rc.d scripts run in a single process. You want to ensure that you
don't change the limits for other rc.d scripts.
Looking further, though, I see that 'su' has a '-c' -- login class --
parameter. It may do exactly what you need.
--Steve Bellovin, http://www.cs.columbia.edu/~smb