0

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?

Sebastian Hoitz
  • 3,019
  • 3
  • 23
  • 19

2 Answers2

0

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.

vartec
  • 6,137
  • 2
  • 32
  • 49
0

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.

Khushil
  • 553
  • 3
  • 11