[Devops] apache memory footprint 1gb on centos normal?

Michael Renner michael.renner at amd.co.at
Mon Mar 14 01:26:56 CET 2011


Hey Julian,

Memory management on any modern OS involves quite a few things which are out of the reach of persons who haven't worked on Operating Systems themselves (short: voodoo). So the skinny for sysops is:

When looking at memory consumption on Linux systems (and most other Unix systems) you want to look at the "RSS" (Resident Set Size) column; this is the amount of memory the kernel thinks the process "owns" (and will be freed if you kill it).

This can and/or may include things like allocated memory, shared libraries, memory-mapped files, shared memory and a few other things I surely forgot. The sum of all these RSS should roughly add up to the value reported by free (the one minus buffers/caches) and should reflect the memory consumption of all processes.

So if your apache processes show an unusual high RSS this can either be caused by modules, configuration and in-apache code (think mod_perl Request Handlers) or by in-process interpreters who suck at memory management (mod_php5 *frown*).

In the past I've seen tremendous improvements in process size after installing a PHP opcode cache (which basically forces apache to compile scripts only once for all processes instead once per backend which handles a request for it), apparently because compiling each script in each backend caused quite a bit of stale data lying around in the process.


best,
Michael

// redirect because original mail was only sent to julian...

On Mar 9, 2011, at 18:14 , devops.wsm at c33s.net wrote:

> hi @all,
> 
> normally i work with debian only, but now i have the first contact with
> centos.
> there the httpd processes (prefork), has a memory footprint of 1.5gb, is
> this normal?




More information about the Devops mailing list