[wp-hackers] Running several WordPress sites on the same server
jdub at bethesignal.org
Sun Aug 26 02:58:31 UTC 2012
On Fri, Aug 24, 2012 at 5:48 AM, Ryan Hellyer <ryan at pixopoint.com> wrote:
> On Thu, Aug 23, 2012 at 5:57 PM, Ryan WP Mailing Lists
> <ryan.wpmailinglists at gmail.com> wrote:
> > The RAM benefit isn't something I had thought of. My assumption was its
> > still 100 copies of WP running even it it was just from one source and so
> > RAM footprint would be the same.
> The RAM benefits Simon mentioned apply only to when you are using an
> opcode cache. Opcodes store the compiled PHP in RAM. If you aren't
> running opcode caching, then this will not provide any benefit.
> There's usually no reason not be running opcode caching though.
They apply in both instances:
Without an opcode cache, your PHP runtime (mod-php, fpm, whatever) has to
load, compile and execute completely different sets of files. They'll use
RAM in the PHP runtime, waste system disk cache (which will help you a bit,
but not much), etc. Plus, that's going to be a *lot* of work reading and
compiling separate-but-identical WordPress codebases on every request!
(Reminder: Always use an opcode cache.)
With an opcode cache, your PHP runtime won't have to load and compile all
those files on every request, but it will maintain them separately in the
opcode cache implemenation's shared memory (because they are different
files, with different file names, it can't tell), which is a waste. You'd
have to make your opcode cache N times the size it would normally need to
be, just to get the benefit of using it at all.
In short: Try your very hardest not to run multiple WordPress instances...
and hooray for multisite. :-)
More information about the wp-hackers