MySQL – Hardware and Software Configuration for Database with 10,000+ Tables

MySQL

I am looking at rolling out a CMS system that will require the creation of around 10,000 tables within the primary MySQL database of the system.

The database will be the data store for several hundred small website front ends that might draw a modest load of around 150k unique viewers per month, but this might have to scale on short notice.

  1. I'm looking for some advice around what kind of hardware should be used to be cost effective but also to have the ability to scale if the need arises.

  2. I would also like some advice around the software configuration: i.e. should the MySQL setup be clustered or just straight forward MySQL with a high number of open files?

Any advice will be greatly appreciated!

Best Answer

This is no different than the average shared web hosting company. Hundreds to a thousand or more small sites sharing single database server. The high number of tables won't affect anything. I have a database server with over 40,000 actively used tables.

So don't use that as a basis in your hardware planning at all. Get as much RAM and fast disks as you can, as that's what your bottlenecks will always be.

When you grow beyond the capacity of one server, partitioning will be simple thanks to having separate tables for each CMS instance. You just need a scheme to map each one to which server its tables are on.