[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Limiting Memory Use Per Process/User



On Tue, May 03, 2005 at 11:44:13PM -0700, Stephen Le wrote:
> I was wondering if there was a way to limit the amount of memory used
> by any single process or user. I'd like to prevent Apache (and other
> server daemons) from consuming all available memory and thrashing my
> disk when everything else is forced to swap.

Note that resource limits (ulimit etc) won't prevent that. Instead, they
will just cause apache to abort with an "out of memory" error. There
would have to be a resource limiting mechanism internal to apache, and
PHP, in this case, to provide such thing. I don't believe there are
such, though. FWIW, java has something closest to this, as you can
fine-tune the garbage collector and heap sizes, at least in Sun's
implementation.

Marcin
-- 
Marcin Owsiany <porridge@debian.org>             http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216



Reply to: