[wp-hackers] Running several WordPress sites on the same server

Brian Layman wp-hackers at thecodecave.com
Fri Aug 24 18:59:16 UTC 2012


On 8/23/2012 3:48 PM, Ryan Hellyer 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.

I think I'd disagree on both of those points.

First,  Linux will cache as much of the disk as it can in order to speed 
up disk IO.
If you do a
$   free -m
It will show you the columns Buffers and Cached.  This is your disk 
cache.   It isn't strictly a file cache, but a block cache of what is on 
the disk.  So if you have the files all come from one location rather 
than the same file in multiple locations, your cache will not be filled 
up with redundant information.  So there would be less swapping and a 
smaller cache could be more effective. (I still wouldn't bother with the 
softlinks unless you REALLY need it.)

As far as opcode caching, I would instead say try it! Once it is 
activated, there's no configuration and likely no maintenance.  So it is 
easy to do a test.  Chances are that you will get a boost to your site 
when it is under load. However, this is not always the case and I have 
seen opcode caching slow down a site that's server was already being 
overwhelmed and had no memory available.  So, while it's not a  
requirement, there are quite often benefits and some people consider 
configuring the server with a php accelerator a no-brainer decision.

BTW this subject is complicated somewhat by the fact that the opcode 
cache, used by an accelerator like APC to store the compiled bytecode of 
the php source, can also be used by plugins for Object Caching.  So 
articles like 
http://blog.cheapvps.co.uk/index.php/2012/03/28/testing-wordpress-the-importance-of-php-opcode-cache/ 
that show great graphs for the benefits of opcode caching are actually 
showing the benefits of an Object Caching plugin.  In reading that 
article I don't see that they are actually turning on and off the 
acceleration - just the object caching.

Brian Layman





More information about the wp-hackers mailing list