Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 read, that APC causes Apache to throw Segmentation faults.

Is this error still valid? I'm asking because we have a web application (PHP) that is used at a local fair and currently has a lot of usage.

We have no problems with memory consumption (currently 1 GB out of 8GB used) but we have quite a lot of CPU usage.

Would an opcode cache help reduce CPU usage? Or should I increase the apache number of apache forks?

share|improve this question
up vote 0 down vote accepted

an opcode cache may help reduce some CPU load thought it's really defined to increase response time because all the interpreting has already been done. some things to take a look at:

  • what parts of the code are taking the time and can they be optimized?
  • is the application DB intensive and can the queries be optimized?

what does apachetop show when the application is under load? are all threads being used - if so then you should set more threads for sure.

share|improve this answer

APC is pretty much default opcode cache for PHP nowadays.

Using opcode cache reduces CPU usage, in case of complicated scripts actually a lot.

Creating bigger worker pool ("number of forks" as you put it), will not reduce CPU usage, it might reduce latency if your server is really busy.

share|improve this answer

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.