English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: Separate DBs vs. One Big Shared DB?
#7463
Separate DBs vs. One Big Shared DB? 13 Years, 6 Months ago Karma: 0
Greetings,

For Edwin, and anyone with extensive experience with JMS Multisites - I have what I believe to be a simple question...

I am setting up a back-end only multisite environement - meaning, users won't be able to purchase or setup a new site on their own from the front-end. I will manage all of the new sites when a new client signs up.

From Edwin's tutorial, 0.b - page 24, I have established the Master site with all components, plugins, modules ...etc. (no configurations), and am creating the SLAVE1, which will act as the template for all new sites.

QUESTION:

Is it best to use separate databases for each master/slave? Or to share a single DB and use various table prefixes? I don't know if this even matters, but my brain tells me to setup a different DB for each new site as this would allow for easier troubleshooting of a specific site should the need arise.

EDIT: I should mention that I have no limitation as to the number of DBs I can create on my cPanel server.

Thanks,
--Kevin
Gremlin
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/06/20 22:40 By Gremlin.
The administrator has disabled public write access.
 
#7468
Re: Separate DBs vs. One Big Shared DB? 13 Years, 6 Months ago Karma: 54
Creating several website into a same DB is sometimes required when sharing extension content and that it is not possible to have a MySQL user that has the privileges across DB.

We also consider that there is a limitation on the number of website that you can put in a same DB. We consider the limit at 100 websites into the same DB.
The reason is related to MySQL performance.
Each MySQL table use 3 files on the disk.
A core Joomla use 39 tables. We can imagine that a normal website can have 150 tables or more depending on the number of extensions installed.
So the number of files in the same directory is (100 websites * 150 tables * 3 files) = 45,000 files. The operating system can become slower when it has more than 100,000 files into the same directory.

So to avoid using a too huge number of files into the same directory, it is better to have several DB and for example use 1 DB per website when this is possible.

Another problem when using a very large number of tables into the same DB is the configuration of MySQL to allow proceeding with backup of the DB.
During the backup of a DB, MySQL need to lock all the tables. So if you have a large number of tables into the same DB, you need to have a large enougth locking file and open file description in MySQL.

So using the same DB is generally used when there is MySQL priviliges issues and is sometime easier to setup.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
Last Edit: 2011/06/21 09:38 By edwin2win.
The administrator has disabled public write access.
 
#7472
Re: Separate DBs vs. One Big Shared DB? 13 Years, 6 Months ago Karma: 0
Great reply - As each of my slaves will have data unique to that site, I will not be sharing content once the a new slave is created, so I will use a separate DB for each site.

Thanks,
--Kevin
Gremlin
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla