1

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.

seriousdev
  • 7,519
  • 8
  • 45
  • 52
  • why not do your own benchmarks? different versions and different environments will yield different results. you can't make an intelligent decision based on hearsay. – bcosca Sep 05 '10 at 13:51
  • See http://stackoverflow.com/questions/930877/apc-vs-eaccelerator-vs-xcache for the discussion on PHP accelerators. – rjk Sep 05 '10 at 13:55
  • What is better - a hot-rod car, a truck or an ambulance vehicle? – Your Common Sense Sep 08 '10 at 09:46
  • When I read even "which is", let alone "fastest" I knew this was going to be a feeding frenzy of generally-no-answer's and strange metaphors =P – puk Mar 07 '12 at 07:20

2 Answers2

1

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 :)

Timo Haberkern
  • 4,409
  • 2
  • 27
  • 41
1

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

Chris_O
  • 3,429
  • 1
  • 22
  • 28