Re: Memory overcomitting in Linux kernel

Benjamin Schieder <[email protected]> Sat, 12 May 2007 12:01:18 +0200
Newsgroups gmane.linux.distributions.rock.devel
Message-ID <[email protected]>
--===============2046452892==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="V0207lvV8h4k8FAm"
Content-Disposition: inline


--V0207lvV8h4k8FAm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 11.05.2007 11:34:00, Stefan Fiedler wrote:
> Hi all,
>=20
> regarding the patch 2006112819464228950:
> > Stefan Fiedler:
> >         disable kernel memory overcommitting behaviour at boot-up
> >         via sysctl; this fixes a kernel bug, see man 3 malloc
> >         section BUGS for details.
> >
> >
> > 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 =3D OVERCOMMIT_GUESS;
> >
> > in <kernel-source>/mm/mmap.c to something like
> >
> >   int sysctl_overcommit_memory =3D OVERCOMMIT_NEVER;
> >
> > however, I'd say there is a good reasonon that the whole OVERCOMMIT_GUE=
SS
> > 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.
>=20
> Imo clean program termination (with OVERCOMMIT_NEVER) is better than seem=
ingly=20
> random trashing when there's not enough virtual memory. All it takes it t=
o=20
> allocate enough swap space in the first place. Ymmv, though.
> On systems with very limited virtual memory, the default behaviour would =
allow=20
> to allocate more memory than really exists, but the risk of trashing woul=
d be=20
> even bigger. So I'd say having the safer option as the default is actuall=
y=20
> better.

It would be interesting to know just why the default is _GUESS. I usually m=
ake
bad experiences with the default, too, so we should ask the maintainer of t=
he
kernel code in question.

Greetings,
	Benjmain
--=20
  ____  _        _    ____  _   _ _ _____ __  __=20
 / ___|| |      / \  / ___|| | | ( ) ____|  \/  |
 \___ \| |     / _ \ \___ \| |_| |/|  _| | |\/| |
  ___) | |___ / ___ \ ___) |  _  | | |___| |  | |
 |____/|_____/_/   \_\____/|_| |_| |_____|_|  |_|
 play online: telnet://slashem.crash-override.net
 view scores: http://slashem.crash-override.net
 watch deaths: irc://irc.freenode.net#slashem

--V0207lvV8h4k8FAm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFGRZBuAsME5O4xgqgRAlfZAJ4pyhUUp8kifw7h8F9ORJUui0slfwCcDfL6
x39/8/DFJ0KRReYrLCQ4nB4=
=tBDo
-----END PGP SIGNATURE-----

--V0207lvV8h4k8FAm--

--===============2046452892==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
rock-devel mailing list
[email protected]
http://www.rocklinux.net/mailman/listinfo/rock-devel

--===============2046452892==--