We have a large number (2,500+) of databases and users in MySQL 5.6 on a single virtualized server (4 cpus and 8GB of memory). All the tables are using InnoDB. The actual data size is not very large (~5GB), and queries per second is low, just lots of small databases and users. Each account created for our application get's their own database and user (this architecture cannot change unfortunately).
We are seeing very poor performance, especially when trying to stop mysqld (often times it just times-out). Starting mysqld and spawning (ready for connections) takes over 3+ minutes. Running mysqldump brings the entire server to its knees. Load, CPU usage, and iowait, all skyrocket during mysqldump, and cause other queries to timeout and fail.
It was recommend that we transition off of using
innodb_file_per_table because of the excessive number of open file descriptors, shear number of directories and files, and i/o operations.
innodb_file_per_table to off does this, but how can we convert all existing databases and tables to utilize this?
Below is our current
/etc/my.conf just for reference, in-case there are further optimizations we can make to optimize for lots of small databases.