On Tue, Jan 11, 2011 at 2:27 PM, Jim Hu jimhu@tamu.edu wrote:
As the number of wikis we host increases, I worry about our single mysql server becoming a bottleneck. I assume that by modifying $wgDBserver in the different copies of LocalSettings.php, I can point each wiki to a different port that is running a different instance of mysql.
But is this worth doing? My concern is that when we do db intensive stuff on wiki A, wikis B...X will underperform.
In most cases, the only reason to run multiple MySQL instances is because they're running on separate machines.
It'll almost certainly be much better to run only a single MySQL daemon instance per host. Multiple instances on the same host would be doing the same work *plus* additional work, as they'd each individually be maintaining their own in-memory data caches, file access, etc. If your memory sizes are too large, you'll hit swap and performance will be completely destroyed; if your memory sizes are too small, you won't be using the full capacity of the machine.
A single instance will generally be able to much more reasonably partition resources according to usage. (A database that is never used need not take up any memory; a database that is hugely used can use as much key cache memory etc as it needs -- but must negotiate for that space with the other things being done.)
-- brion