Thanks Brion,
It's always nice to hear what you were thinking from someone else! Now, off to
configure-land!
-Daniel
-----Original Message-----
From: wikitech-l-bounces(a)lists.wikimedia.org
[mailto:wikitech-l-bounces@lists.wikimedia.org] On Behalf Of Brion Vibber
Sent: Wednesday, April 11, 2012 2:39 PM
To: Wikimedia developers
Subject: Re: [Wikitech-l] APC and memcached
On Wed, Apr 11, 2012 at 11:18 AM, Daniel Renfro <drenfro(a)vistaprint.com>wrote;wrote:
I'd like to get some input on configuring the
caching-strategy for my
Mediawiki installation.
As I understand it, APC caches the PHP byte-code to improve on
webserver performance, but can also store sessions and objects.
Memcached is mainly used to save rendered pages, can be used to store
other things such as sessions and objects, but can be *distributed.*
Is there a downside to having these two caching mechanisms installed
on one machine? I am not interested in sharing caches between
machines, I'm only working with a single system. Is there an advantage
to using one strategy over the other for this case?
My recommendation is to install both APC and memcached; use APC exclusively for PHP opcode
caching, and use memcached exclusively for caching data from the application. (ie, set up
MediaWiki to use memcached and don't tell it anything about APC, which will Just Work
for speeding up execution.)
You can use APC for both if running on a single system, but there are some potential
pitfalls:
* you can easily run out of cache space unless you up the defaults a lot
* web server's APC cache won't be available to CLI scripts, so command-line
maintenance scripts may encounter caching problems
* if you ever expand to multiple servers in the future, you'll need to switch to
memcached anyway so the data cache can be shared.
-- brion
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l