tech-kern archive

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

Re: Autotuning of kern.ipc.shmmaxpgs

On Mon, 2 Mar 2009 01:20:25 +0100
Joerg Sonnenberger <> wrote:

> Looking more at this, anyone able to kill the system with SysV shared
> memory could do the same thing with a normal mmap as well.

Speaking of this, I've noticed on netbsd-5 that I had to write a
watchdog script to monitor the RSS of a process because rlimits would
not appear to help at all.  Perhaps that if rlimits were better
observed it'd indeed be possible to drop any API-specific memory
allocation limits...

Anyone else noticed such a problem, and if so, solutions to this?  My
impression is that memory limits will only be enforced when the system
is out of memory, at which point it's already a little late and any
critical process might get killed instead of the offending one.

Another issue was that the process in question was being paged out
aggressively while it was still growing, so RSS wouldn't really
increase that much beyond a certain point, and swap would completely
fill, before a process was killed (often a seemingly random one
including X11's).  Trying out restrictive limits for other
memory-related rlimits didn't help either.


Home | Main Index | Thread Index | Old Index