Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm going to install APC on my server to enhance Drupal performances, however I've read on internet that if I have little ram it might be a risk, and performances could get worse.

I have 256MB ram, so I was wondering if it make sense to install APC and how much ram I should assign it.

Ps. I'm running lighttpd as web server


share|improve this question
I can think of many things that have the initials "APC". Care to clarify? – John Gardeniers Dec 30 '10 at 21:54
up vote 1 down vote accepted


... the apc.php script ... Cache full count number (on the left) will display the number of times the cache has reached maximum capacity and has had to forcefully clean any entries that haven't been accessed in the last apc.ttl seconds. This number is minimized in a well-configured cache. If the cache is constantly being filled, and thusly forcefully freed, the resulting churning will have disparaging effects on script performance. The easiest way to minimize this number is to allocate more memory for APC. Barring that, the apc.filters ought to be used to cache fewer scripts.

when dealing with mesure problems, measurement tools and a quantitative approach(asking yoursel "how much?") works better than "try and fail", so you could invest some time in finding a resonable tool to mesure exactly the problem, say

free -mot

and a testing environment, say your distro in a VirtualBox instance snapshoted to remember sensible configurations, than monitor memory usage under tests with different conf, ie.

ab -n 500 -c 30

tests are meaningless if you try static html page or the helloword in php, you need to test the real application/s and probably modify the application itself to log where it spends time doig what.

we cant reach 0ms per request anyway, so we should define what "fast enough" is for users. 500ms is enough for me, knowing downloading a single gif in the template will vanish hours of effort on the server side. furthermore, spending real effort on software configuration will not, will never achieve what a blessed RAM addition will.

in my personal experience with LAMP stacks, but for the reasons stated above we cant generalize, mysql usage of RAM is the bottleneck, not php itself (nor apache).

if, and only if, you are absolutely forced to use such poor amount of RAM and you cant insist in purchasing more(2Gb is reasonable for my uses), which is probably the less expensive scenario (kindly insist on the economic aspect of loosing dev hours without real benefit had worked for me...), knowing the real work and expertise this optimization will require, using your web framework file cache(@see , @see or sqlite could be worth experimenting with, too.

share|improve this answer
+1 - although I'd treat any metrics from ab as very suspect - its not real world requests. – symcbean Dec 31 '10 at 9:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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