[rock-devel] Memory overcomitting in Linux kernel

Clifford Wolf clifford at clifford.at
Fri May 11 20:44:02 CEST 2007


Hi,

On Fri, May 11, 2007 at 11:34:00AM +0200, Stefan Fiedler wrote:
> > by clifford
> > If you really think that is a kernel bug you should discuss this on the
> > linux kernel mailing list and suggest changing the
> >
> >   int sysctl_overcommit_memory = OVERCOMMIT_GUESS;
> >
> > in <kernel-source>/mm/mmap.c to something like
> >
> >   int sysctl_overcommit_memory = OVERCOMMIT_NEVER;
> >
> > however, I'd say there is a good reasonon that the whole OVERCOMMIT_GUESS
> > has been written in the first place and it is imo a bad idea to change that
> > to OVERCOMMIT_NEVER in a general purpose distribution.
> 
> Imo clean program termination (with OVERCOMMIT_NEVER) is better than seemingly 
> random trashing when there's not enough virtual memory. All it takes it to 
> allocate enough swap space in the first place. Ymmv, though.
> On systems with very limited virtual memory, the default behaviour would allow 
> to allocate more memory than really exists, but the risk of trashing would be 
> even bigger. So I'd say having the safer option as the default is actually 
> better.

well, imo this is a very legitime standpoint. that's why this is a runtime
configureable option in the linux kernel.

however, changing the default value of this option breaks the expectations
that users and developers have for a linux environment. as I said already,
if you feel like changing the default sysctl_overcommit_memory value for
general purpose systems is a good idea this should be better discussed on
the linux kernel mailing list then here.

when you are doing e.g. embedded systems development with ROCK Linux you
can still set this option in your target scripts.

yours,
 - clifford

-- 
 ____   ___   ____ _  __  _     _ www.rocklinux.org
|  _ \ / _ \ / ___| |/ / | |   (_)_ __  _   ___  __
| |_) | | | | |   | ' /  | |   | | '_ \| | | \ \/ /
|  _ <| |_| | |___| . \  | |___| | | | | |_| |>  <
|_| \_\\___/ \____|_|\_\ |_____|_|_| |_|\__,_/_/\_\


More information about the rock-devel mailing list