httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Kukuchka" <>
Subject Re: Query on deletion of Request pool
Date Sat, 29 Mar 2008 05:23:18 GMT
From: "Arnab Ganguly"

> >It up to the OS to mark the freed areas as free or use it as a
> >filesystem buffer or whatever buffer, as long as the memory isn't needed
> >by applications.
> Thanks for the update.Actually when I do top -p on the process id I do see
> memory consumed by Apache is very less but over the time when I do free -m
> the RAM gets reduced.

As Robert indicated, a running Linux system will attempt to make use of all physical memory.
 This is because it is undesirable to leave memory unused (wasted) when it can be put to good
use for things such as disk cache.

Google "linux memory management" for more information.

> I wonder can be this case happen free -m is 0 and the
> machine will crash or something....

Typically, you will see free memory get close to 0 and stay there.  It will usually not go
past that point unless you have your machine overloaded in some fashion.  In most cases, even
if free memory dips to 0, you will still have your swap memory available.  At that point,
system performance will start to degrade, but you will still be running.

> I was thinking may be the Apache was eating up the RAM

To see how much physical memory (in kilobytes) is being used by Apache, use this command sequence:

ps -e -o rss,comm | fgrep httpd | awk '{sum+=$1} END {print sum}'

It is not unusual to see memory go up as an Apache process matures.  This is especially true
if you are running modules like PHP or Perl which have the potential to load many helper modules.
 A quick review of a handful of running machines available to me show 2-18MB per process is
not unusual.  Of those, PHP users are typically 10-12MB higher than non-PHP users.  YMMV.


Chris Kukuchka
Sequoia Group, Inc.

View raw message