1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XCache or APC?

Discussion in 'General PHP and MySQL Discussions' started by Douglas Taylor, Jan 20, 2012.

  1. Douglas Taylor

    Douglas Taylor Active Member

    I use XCache now, but would APC be any better performance-wise?
     
  2. Deebs

    Deebs Well-Known Member

    Some recommend XCache over APC for performance, personally for me I use APC as it is now part of PHP and maintained by the same folks. In all honestly I have not noticed a difference (and I used to use XCache all the time).
     
    Adam Howard and BamaStangGuy like this.
  3. xmlxp

    xmlxp Active Member

  4. BamaStangGuy

    BamaStangGuy Well-Known Member

    I use APC with xenForo.
     
    Adam Howard likes this.
  5. intradox

    intradox Well-Known Member

    I use APC
     
    TheVisitors likes this.
  6. Dinh Thanh

    Dinh Thanh Well-Known Member

    In this article, the author concluded that xCache is faster and more stable.
    I agree with him, xCache is faster and less bugs.

     
    TheVisitors likes this.
  7. digitalpoint

    digitalpoint Well-Known Member

    In my setup eAccelerator ended up being about 10% faster than APC/XCache. But even so, I uninstalled eAccelerator when they decided to remove a bunch of features I used in their newest version.

    Seems like it was a good choice to remove it these days... development has more or less stopped.

    I think the thing that made eAccelerator a little faster was because it had not only an opcode cacher, but also a code optimizer.

    Currently I use XCache (I used APC before I switched to eAccelerator). I've been tossing around the notion of going back to APC since it's a "little more official" (if there is such a thing) with PHP devs working on it. But it's also one of those things where if it's not broken, don't fix it. :)
     
    Dinh Thanh likes this.
  8. Hoffi

    Hoffi Well-Known Member

    I use X-Cache. Used it before on my vB. It's fast and I have no Problems till now.
    I use it for my XF and two WP.
     
  9. Eagle

    Eagle Well-Known Member

    I'm using xCache as well and haven't had any problems. However, xCache was made by the developers of lighttpd, benchmarks show it performs similiarly to eAccelerator and faster than APC. Either way APC is handled by the same developers who work on PHP, so that might have something to say for it.
     
    Dinh Thanh likes this.
  10. moman

    moman Active Member

    In practice, you won't see a difference. However, since APC is now bundled with PHP 5.4, if/when you upgrade to that, you won't need to worry about ever again installing a separate opcode cacher.

    As far as caching objects goes, I'd go with memcached as it offers a great PHP API.
     
  11. digitalpoint

    digitalpoint Well-Known Member

    It is??? I knew they were planning it for 6.0 at least as an optional compile option, but didn't know it made it into 5.4.
     
  12. BamaStangGuy

    BamaStangGuy Well-Known Member

    APC is not going to be in 5.4. Not sure where you got that from.
     
    Luke F likes this.
  13. p4guru

    p4guru Well-Known Member

    personal experience
    • Apache/mod_php = xcache
    • Nginx/php-fpm = apc
    • Litespeed web server/LSAPI PHP non-suexec = apc
     
  14. moman

    moman Active Member

    You are right. It looks like Wikipedia lied:

    5.4 B1 did not bundle APC so it looks like we'll have to wait for it...guess they prioritized other things (look at all the syntax changes!). Maybe they thought APC isn't stable enough yet? I installed it on my server and if I don't allocate more memory than all my scripts combined use, apache starts segfaulting (w/ APC 3.1, 3.0.19 was fine but it doesn't support PHP 5.3.8).
     
  15. estranged

    estranged Well-Known Member

    I used to use apc but I saw many segfaults in our logs when it was enabled. Now I have installed xcache and everything seems fine. Xcache seems more stable to me.
     
  16. Adam Howard

    Adam Howard Well-Known Member

    APC will still be install-able in php 5.4, but as a separate package. Development of APC has not ended.
     
  17. Dinh Thanh

    Dinh Thanh Well-Known Member

    Even in Load Balancing environment, I sill refer using xCache.
     
    Luke F likes this.
  18. MattW

    MattW Well-Known Member

    I couldn't get APC to work on my VPS, so installed Xcache.
     
  19. Thomas Jepp

    Thomas Jepp Member

    I'm using xcache on my lighttpd setup
     
  20. Ranma1981

    Ranma1981 Member

    Hi all,

    Which php handler did you use with Xcache?

    It seems compatible only with Dso or Fcgi. Which is better between them?

    My Hosting say also that with Dso, could have some risk for security.
     

Share This Page