Optimizing RAM use for Apache (and LAMP in general)

I scaled up from 1 GB to 2 GB, and after a while Apache made use of that RAM too. I guess that’s as it should be with mpm_prefork using default settings, but documentation about how it works and how it is configured is very scarce.

So to the questions:

Does Apache take into account other applications’ need for RAM, so that swapping doesn’t occur even if an application might need 500 MB or more temporarily?

E.g. scaling large pictures via GD or ImageMagick can easily take 100 Mbyte per picture, and if resources are not immediately destroyed that can accumulate.

si and so are always 0, so at least during normal use it doesn’t cause swapping.

Thanks in advance, Anders

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

To the best of my knowledge Apache does not take into account other applications. If you’re doing a large amount of image manipulation it might be a better solution to scale horizontally by setting up separate workers to do image manipulation tasks from the droplets serving the public pages and portions of your site.