0

I've taken steps to reduce as much as possible the memory footprint of my Apache mod_php processes by disabling Apache modules as well as Drupal modules.

When the server is under light load, I see memory usage between 40MB and 80MB. However, when the server is under heavy load and there are about 100 processes active, 90 of those 100 will be 12MB.

I'm assuming this is a good thing of course. I know that the PHP is embedded into each process so then why would there be such a drastic difference in the memory footprints, 12MB and 80MB, and why can those first 10 be in the area of the 12MB range?

3

The main difference is that different requests to a Drupal site will do different things.

Serving up a static image, CSS, or JS file has very little overhead and the PHP handler doesn't do anything.

Serving up a cached page invokes the PHP handler and Drupal bootstraps, but the overhead is small, compared to other requests.

Serving up a non-cached page will cause a full Drupal bootstrap, and all of the PHP necessary to render the URL will run.

Serving up an image derivative will invoke PHP, and there will be additional memory overhead.

Serving up a page with an empty Drupal cache will result in all of the overhead of rebuilding the memus, registry, etc, and can cause a pretty big memory swell.

So, I suspect you are seeing the result of processes serving up different types of requests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.