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

Long-time APC users. What have you done to combat fragmentation?

Discussion in 'Server Configuration and Hosting' started by HittingSmoke, Dec 3, 2013.

  1. HittingSmoke

    HittingSmoke Active Member

    This is a hot-button topic around the web. I have one very low-traffic XF forum that's been up for months with APC running. Fragmentation is at ~8% which is extremely reasonable considering I'm using session caching. It's at around 145MB free with a 100% hit rate. I set the opcode hint to 11k files which I determined incorrectly from a grep command but only about 2k files are being cached.

    I just migrated a higher traffic vB forum to XenForo and I'm seeing much more aggressive fragmentation which I'm fairly sure is a result of the session caching and generally higher memory usage. I haven't been able to do much long-term monitoring because I've had to reset the PHP-FPM server several times while doing optimizations but fragmentation seems to hop into the high teens relatively quickly. I do see similar (to my lower traffic install) opcode usage at roughly 2000 files cached after traffic levels out over a day or so.

    Does setting a proper file hint help? What about user hint? It will be a while before I can get the appropriate data for a user hint setting. The merits of hint settings in APC seem to be vague and disputed.

    I'm not really looking for APC specific info that can be found in docs. I've read them all header to footer a dozen and a half times. I'm more interested in anecdotes from people who've run XenForo over long periods of time between clearing APC cache on medium traffic forums with session caching enabled. My average page load time is below .5 seconds with ngx_pagespeed and APC enabled so it's not like I'm having performance issues, even when APC fragmentation is above 10%. I'm just hoping to have some info chambered if it does become a performance issue and I have to disable session caching.
  2. MattW

    MattW Well-Known Member

    Move the sessions over to Memcached, and just use APC as the OPCache.
    Tracy Perry likes this.
  3. Floren

    Floren Well-Known Member

  4. Tracy Perry

    Tracy Perry Well-Known Member

    I dumped APC and went with Memcached and xCache (2GB and 1GB for each). Of course, it helps that I'm on a dedicated with (now) 36GB RAM.
    Wuebit and MattW like this.
  5. MattW

    MattW Well-Known Member

    Same here. I initially dumped APC and switched fully to Xcache. I'm now using PHP 5.5 so using Zend OPcache and Memcached for the sessions.
  6. melbo

    melbo Well-Known Member

    Thinking about moving from APC to Opcache - Obviously my server will be different than yours but can you share your OpCache configs? Want to get an idea of what I'll need to tweak
  7. MattW

    MattW Well-Known Member

    This are my current settings

    melbo likes this.

Share This Page