PHP performance: accelerators and HTTP servers


First, which is the fastest accelerator: XCache or APC? And should I have nginx, lighttpd, Apache or Apache with nginx as a reverse proxy for static contents. What's better?
Thank you.




There is no general answer on this. It depends on what you need. I always choose APC for new projects. I used XCache but I think APC is better for the following reasons.

  • Stability: APC is more stable than XCache
  • Support: You will get more support for APC because there are a lot more users using APC
  • Support2: There are a lot mor Frameworks and libraries that support APC than XCache
  • Development: The development of APC is more uptodate than XCache. New PHP-Versions are supported quicker than in XCache

So pure performance is not everything :)




APC is more user friendly and gives you better hit miss stats. XCache is about the same in performance but not as stable. It really depends on your server and what your running on it. You need to benchmark different scenarios and find your sweet spot. For my WordPress installation on a VPS with 768M Ram I got the best results using an Nginx reverse proxy static cache along with Memcached. Here is the bench to get an idea of what I achieved with this set up:

$ ab -n 1000 -c 100

yielded 1712.33 requests per second

alt text

People are also looking for solutions to the problem: php - None of the cases match the result of get_headers()


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.