Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

Save Memory with Alternative PHP Cache (APC)

Post new topic   Reply to topic    Apache Forum Index -> How-to's & Documentation & Tips

View previous topic :: View next topic  
Author Message

Joined: 11 Nov 2012
Posts: 8
Location: Montreal QC, Canada

PostPosted: Sat 24 Nov '12 5:22    Post subject: Save Memory with Alternative PHP Cache (APC) Reply with quote

I recently installed APC on my web server, and I've noticed an unexpected consequence...

Most of the information I’ve seen on PHP opcode caches focus on the performance aspect — having the opcode precompiled and ready — but the other benefit I’ve found is that process sizes are reduced dramatically. This may not be apparent at first, if you don’t consider the shared memory used by each process. For example, before activating APC, my httpd process size was about 100 MB in memory (RSS), with about 20 MB of that being shared (SHR) between all httpd processes. This means the actual RAM used by the httpd process was about 80 MB, not 100 MB. After installing APC, the process size in memory (RSS) has increased to about 120-140 MB, but the shared part of that memory has increased even more -- it's now about 50-60% of the RSS size. This means the actual / real process size has gone from 80 MB down to about 60 MB or less!

I wrote a quick article on my blog about how PHP's APC actually shrunk Apache's Httpd process size, which then allowed me to increase the MaxClients and ServerLimit by 20% or more.

Back to top

Post new topic   Reply to topic    Apache Forum Index -> How-to's & Documentation & Tips
Page 1 of 1