Re: [Lit.] Buffer overruns

From: Thomas Pornin (pornin_at_nerim.net)
Date: 02/11/05


Date: Fri, 11 Feb 2005 17:36:07 +0000 (UTC)

According to <blmblm@myrealbox.com>:
> (I have to say that I find this rather shocking behavior on the part
> of the OS. But perhaps I lack an appreciation for how in the real
> world sometimes performance matters more than "correctness"? My idea
> is that it doesn't matter how fast something runs if it doesn't give
> the right answers, but that may be naive.)

At some time a few years ago, ftp.cdrom.com was the biggest FTP site
online. It could handle about 700 simultaneously connected users; there
was not enough RAM in the machine to get more. By activating overcommit,
the number raised to 3000.

This is of course a very specific area, where a random process crash
is no big deal: if the memory was too overcommited, some process gets
a segfault and the client is disconnected, but no incorrect data is
sent on the wire.

Nevertheless, I find this a good illustration of what overcommit can be
good for. Note that overcommit is really useful when you have a big swap
area (so that the critical point where one process has to get killed can
be reached only after considerable disk thrashing).

        --Thomas Pornin



Relevant Pages

  • Re: Out of memory management in embedded systems
    ... keep in mind that disabling overcommit will mean that you need to put more ram in your embeded system to have it run ... there can be very significant saving in ram from the fact that a large program can do fork-exec of a small program without having to have enough ram in the system for two copies of the large program. ... you get even more savings in most systems from the fact that Linux does copy-on-write when programs fork instead of allocating all the memory the program accesses. ... overcommit by default is optimistic that if the program requesting the memory actually tries to use it there will be enough. ...
    (Linux-Kernel)
  • Re: [PATCH] strict VM overcommit accounting for 2.4.32/2.4.33-pre1
    ... >>> ram and can be set that way. ... doesn't this imply that you cannot control overcommit unless ... i.e Without swap the kernel cannot use all of ram, ... important and necessary workaround to inhibit OOM-killer, ...
    (Linux-Kernel)

Quantcast