tags:

views:

72

answers:

2

I have a virtual private server that only allows me to use 128MB of RAM. I recently installed APC for PHP and it consumes more than 128MB. My provider wants me to upgrade my account if I don't get that number down. Is there a config option that I can use to set a maximum on APC?

+3  A: 

You can use the apc.shm_size config option. APC Configuration

jasonbar
+2  A: 

It seems you need to make changes to apc.shm_segments and apc.shm_size to change overall memory given to APC.

aularon
I believe setting `shm_segments` is only advised if you've already maxed out `shm_size`.
Frank Farmer
I have shm_size=10 and shm_segments=1. How do these numbers influence MB of use? I am using php5-cgi w/ lighttpd.
User1
from the same page, they say `shm_size` is in MB, and the total usage will be `apc.shm_segments`* `apc.shm_size`, as @Rudi pointed out above.
aularon