Re: Overcomittable memory (Was: Linux 2.2.15pre12)

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Mon Mar 13 2000 - 10:08:03 EST


In <20000313154510.F15800@pcep-jamie.cern.ch> Jamie Lokier (lk@tantalophile.demon.co.uk) wrote:
JL> Khimenko Victor wrote:
>> And my 20 apache processes will require 800MiB of virtual memory instead of
>> 60MiB they are using now.

JL> If those Apaches _might_ conceivably all enter mod_perl at the same time
JL> and run a tricky script, and you want to _guarantee_ that nothing can
JL> die, 800MiB is the correct vm requirement.

If it can enter tricky perl script said script can need ANY amount of RAM
and even 800MiB can be not enough. 40MiB per process are just initial shared
tables created on apache startup. You'll need more for script. On other hand
with sane script you'll need just a few additional KiBs per process (and insane
one can lead to ANY amount of RAM used).

JL> Your choice. Use 60MiB and accept that there are conditions under which
JL> the Apaches can die, or buy a bigger disk and claim that they cannot.

And when it crash nevertheless blame yourself for stupid waste of 800MiB.
And BTW my system with overcommit will NOT kill any sane script (there are
100MiBs of not used swap -- enough for 20-40 sane scripts) while system
without overcommit will:
  1. need additional 800MiB of swap and
  2. will kill scripts unlike existing one (even if thereare plenty of free
swap malloc() will return ENOMEM since we do not overcommit and script will be
killed!) oh, it'll not kill it explicitly but will return ENOMEM for alloc so
perl will kill itself -- big difference, I know :-)

Great deal! You wasting 800MiB and this buys your headache and nothing more.

JL> (Heavily swapping Apaches are probably worse than dead ones, but that's
JL> your choice to make).

And your wonderfull system without overcommit will start to kill apaches before
swapping will even start !

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:25 EST