DragonFly BSD
DragonFly kernel List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: phk malloc, was (Re: ptmalloc2)

From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Wed, 23 Feb 2005 15:14:01 +0100
Mail-followup-to: kernel@crater.dragonflybsd.org

On Tue, Feb 22, 2005 at 01:50:45PM -0500, Dan Melomedman wrote:
> This begs the question whether we could have a feature to disable
> overcommit on a sysadmins', or the software's demand.

You can easily disable memory overcommit. You just have to ensure
that kern.maxproc * max(Virtual Memory Size) <= Physical Memory + Swap.

A normal system doesn't want to satisfy that relation. Any threaded program
has a acquire a fixed heap size in advance, with libthread_xu that will be
2 MB per thread. A well-written application doesn't need it under normal
circumstances. But those application don't care about about changing
the default either. Any shared mmap would have to be fully accounted to
each of programs, since the system doesn't know in advance if they won't
be remapped writeable later on. There are a lot of other examples.

To summarize this, for a normal system disabling overcommit just hurts.
It's the responsibility of the administrator to ensure that enough swap
is available or to adjust the process limits accordingly.


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