• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Anyone using an APC opcode cache with less than 2GB of memory?


Well-known member
How much memory do you have APC users?

My vps has 768MB guaranteed, burst to 1.5GB - WHM/cpanel

At the moment we are using suPHP & suEXEC with no opcode cache at all.

I had the hosting provider enable fastCGI & APC set up for opcode cache, and after enabling those it lasted a few minutes the ceremoniously crashed... so we are back to suPHP which does not utilize APC.

So I am curious if APC / fastCGI is possible with a small amount of memory. I've not asked for any tips from my hosting provider yet.

Luke F

Well-known member
You only need to allocate 100ish MB to APC, probably a lot less for a single forum.

Losing Apache and going with nginx would help RAM and overall performance a lot, but you should be fine.

Also wouldn't recommend fastcgi+apache at all, defeats the purpose of using a server architecture like Apache.


Well-known member
Also wouldn't recommend fastcgi+apache at all, defeats the purpose of using a server architecture like Apache.
cgi or dso better than fastCGI?

My understanding is that suPHP that we are currently using, will not allow the APC cache to work at all.

edit: at the moment APC is set to use 32MB...
We are currently using about 450MB with suPHP, cpanel/whm, and some other things running that may consume significant memory at times.

EDIT: apc.shm_segments = 0 mean opcode cache only?

Luke F

Well-known member
I don't really know much about Apache (been an nginx guy for ages), but I would be very surprised if mod_php based PHP didn't allow you to use APC


Well-known member

Start with the 32mb and load up the page apc.php (will be somewhere on your server). It will show you if the cache is too small or way to big then make changes etc. If you change the admin password at the top of apc.php you can login and get some more stats about what scripts/variables are also being cached.


Well-known member
I use APC / Nginx / FastCGI on my Linode 512 system. I get some fragmentation problems maybe twice a month, so I schedule a FastCGI recycle once or twice a month. I allocate 128M to the apc.shm_size variable. I could probably get better numbers or less frequent fragmentation, but I just don't want to break anything.

I had a problem in the past an nginx process using 100% of the CPU seemingly randomly, but the latest update seems to have resolved those.