Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does apc cache counts into php memory usage? I am using php-fpm but I am not sure if that is relevant. If apc memory is set to 256MB and php memory limit for individual workers is also 256MB does that mean apc can take all the memory for the php process?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The total memory allocated by apc.shm_size is not counted as part of the memory usage by PHP. But when the pages for a file are mapped into the process address space, these add to the memory usage - but since PHP does not have to read and parse the source code, the memory usage per running instance is a lot lower with APC, and unless you've got a lot of diferent files stored by APC relative to the number of requests, there's usually a large net saving.

php memory limit for individual workers is also 256MB does that mean apc can take all the memory for the php process?

This doesn't make a lot of sense - there is no APC process to allocate memory - it's an exension in eavery PHP process which uses a shared memory segment.

share|improve this answer

Your Answer

 
discard

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.