Drupal performance: separate sites vs multisite configuration on single host?
Does anyone have performance data on running several separate Drupal sites (on a single host) vs using Drupal's multisite configuration?
I face a choice: configure several Apache virtual hosts with completely separate codebases, vs a shared multisite instance of Drupal core with site directories sites/www.example.com, sites/www.example1.com, etc. [In a multisite configuration, there are still Apache virtual hosts, but the all of their DocumentRoot entries point to the multisite Drupal directory.] I assume the multisite method uses Drupal code to perform virtual host dispatching, which I imagine is slower than letting Apache do it. On the other hand, I assu开发者_如何转开发me there is a probably a caching benefit to the multisite configuration.
Performance comparison data anyone?
keith,
if you have a single site setup, chances are you have it under /sites/default. from the documentation on settings.php, we see that drupal looks for the settings.php in 9 places before it defaults to the sites/default/settings.php, as per the snippet below:
* The configuration directory will be discovered by stripping the
* website's hostname from left to right and pathname from right to
* left. The first configuration file found will be used and any
* others will be ignored. If no other configuration file is found
* then the default configuration file at 'sites/default' will be used.
*
* For example, for a fictitious site installed at
* http://www.drupal.org/mysite/test/, the 'settings.php'
* is searched in the following directories:
*
* 1. sites/www.drupal.org.mysite.test
* 2. sites/drupal.org.mysite.test
* 3. sites/org.mysite.test
*
* 4. sites/www.drupal.org.mysite
* 5. sites/drupal.org.mysite
* 6. sites/org.mysite
*
* 7. sites/www.drupal.org
* 8. sites/drupal.org
* 9. sites/org
*
* 10. sites/default
adding another single site setup will still keep those 9 checks and will add the apache virtual on top of it, so i don't see how that can possibly be any faster.
additionally, if you end up with a lot of sites to manage, having several instances of drupal unnecessarily increases your administration overhead. If you plan to have a lot of drupal sites, i would recommend you look at the hosting project, which is part of the aegir hosting system. the guys maintaining that project put a lot of effort to simply the maintenance and deployment of large number of drupal sites.
精彩评论