I have a biz where I am hosting my customers on a VPS server running http, exim, pop3, imap, mysql, etc (basically, all processes). I'm running multi-site
As the users are independent of each other, I thought I'd give each user a different DB and simply copy the contents from my master DB when I create a new site.
So far I have no problems, but I only have a handful of sites and they're currently pretty low volume.
What happens when sites grow to dozens and hundreds and / or volume goes up?
I don't know much about mysql. Is there more of a memory or process hit if there are more DBs than if the DB server is running a single DB with tables with unique prefixes? Is the risk of using the single DB more than the risk of using 1 DB / User? What happens f the DB gets corrupted?
Base drupal is 5.1, mysql is 4.1, php is 5.1.6, MyIsam sql engine.
I've already upgraded the memory and process limit once. I was getting too many processes and hitting memory limits.
Thanks.
Comments
Drupal Dojo
There's a whole section on Drupal Dojo about multisites - some even doing exactly what you're talking about.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
=-=
you wouldn't want dozens of sites running on one DB in my opinon. Drupal can be database heavy to begin with, add a dozen sites into the same db and I can see a db growing out of control.
On the Dojo
They do use separate databases. But they have 100s of sites on a single server.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Mysql performance is
Mysql performance is configured and server.
There's no problem with multiple sites and databases as long as the total traffic can be handled.
Each connection takes RAM, and temporary tables often take disk speed.
You need to fine tune both my.cnf and httpd.conf for the connections to take the right amount of RAM.
For example, with 512 MB of free RAM (not total) you can expect to handle MaxConnections 100 with 5 MB of RAM each.
This may be enough for cached pages, but watch for any heavy pages that could take 20-30 MB each.
Other things you can do
Disable as much apache modules as you can (no need for mod_perl, mod_python, jk, ...etc.) to reduce memory consumption per process.
Install a PHP op-code cache/accelerator.
Install a flat file caching module (fscache, boost).
Get a lot of RAM and tune your database to cache tables (Linux will cache a lot for you by default).
More on Drupal performance tuning and optimization for large web sites.
--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com
--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba