# Help! Am I reading this right?



## Mayhem30 (Jul 25, 2010)

I'm running FreeBSD 7.2 64bit

I recently installed the APC opcode cache to help speed up PHP applications. I'm not sure if I'm reading 'top' stats correctly or not.

This is what 'top' looks like WITHOUT APC enabled :







After I enable APC, it appears that my apache processes double in size - or am I reading it wrong?






If I am right, APC is useless to me as I'm effectively reducing my apache "MaxClients" in half. Also have a look at the 'time' column in both pictures. With APC enabled, it grew to 2x the normal size in only a few pagwviews.


----------



## Mayhem30 (Jul 25, 2010)

I'm refering to the 'RES' column if that help any. 

I hope someone can clear this up for me.


----------



## phoenix (Jul 26, 2010)

Apache RES will increase by the amount of cache you specify to APC.  Duh!  You are telling APC to cache data ... inside the Apache process.  

However, this won't limit you MaxClients, as that's based on number of processes, not amount of RAM.


----------



## Mayhem30 (Jul 26, 2010)

> Apache RES will increase by the amount of cache you specify to APC



I thought it would only increase the "SIZE" column (which it does - I've set it up APC for a 256mb cache). The "SIZE" column is shared memory, is it not?



> However, this won't limit you MaxClients, as that's based on number of processes, not amount of RAM



If my apache processes double in size, how does this not effect "MaxClients"? 

If I have 30mb processes, I can only have 'MaxClients' set to 150. That will use 150 x 30mb = 4.5gb ram.

If the processes are now 60mb each (with APC enabled) : 150 x 60mb = 8.7gb ram

My server will start swapping and come to a crashing halt.


----------

