3 ms·
I have uptime of weeks with APC opcode cache without problems on very heavy loaded servers. You can also run a script to watch for PHP/APC segfaults and just r
by ck2 14y ago
I have uptime of weeks with APC opcode cache without problems on very heavy loaded servers.
You can also run a script to watch for PHP/APC segfaults and just restart the the cache.
I cannot imagine running PHP without an opcode cache, you are losing a speedup of 300% to 500%
- jacques_chester 14y ago> You can also run a script to watch for PHP/APC segfaults and just restart the the cache. ... wat > I cannot imagine running PHP without an opcode cache, you are losing a speedup of 300% to 500% That's just not what my profiling showed.
- ck2 14y agoYou mentioned opcode cache problems - some people complain of segfaults and I am just pointing out you can make it restart if that ever happens. (I've had it trigger three times this entire year so far.) There is most certainly a serious load reduction when using an opcode cache. It's not just common sense, you easily find a dozen independent benchmarks on the web proving it. Now if you had the opcode cache running incorrectly you might not see the improvement (ie. some people misconfigure it where the memory is not shared and persistant, and instead gets destroyed as php children are created/removed).
- jacques_chester 14y agoMy point is that loading, parsing and interpreting PHP is rarely the bottleneck in Wordpress. In terms of microbenchmarks, opcode caches look spectacular. In terms of the larger stack, given the way Wordpress works? Meh, a few percent. It might be worth it for a big site to shave a few dozen servers off the bill. But the overhead imposed by flakiness is not worth my time.
- mh- 14y agoI've never heard of anyone not get incredible speedups with APC. We're talking 250%+. Every (large) production PHP deployment I've seen, disabling APC would make everything fall over. They would need 3-4x as much capacity.
- andrewaylett 14y agoI think the big point here is that on a Wordpress site, most hits don't actually get as far as PHP -- most of the time, pages can be served statically from wp-supercache or similar.
- barsxl 14y agoThe majority of our transient bugs on WordPress.com are probably related to APC opcode issues. We try to catch them and handle it gracefully, but it isn't always so easy.
- jacques_chester 14y agoOut of the opcode caches I've tried, XCache was the most stable. APC was an utter bomb, I wouldn't trust it with burnt hair.
- mikescar 14y agoI'm interested to hear what versions of PHP and APC you used. In my experience, stable APC releases have been very stable, but beta APC can poop out pretty bad, even if the changelog doesn't indicate anything that might affect your application. I've used stable APC + PHP + Apache releases to do some large things, so not sure why APC is an utter bomb in 2012.
- jacques_chester 14y agoWe're talking ... late 2007 here. I must confess that I didn't keep an engineering diary.
- mh- 14y agoreally? that might have been worth mentioning in all your other comments trashing opcode caching. that was 5 years ago.
- mikescar 14y agoNo kidding. There really aren't "three major opcode caches" anymore, APC won out years ago and is now tightly integrated with PHP compiles and as a module available in any package manager.
- deleted 14y ago[deleted]