Stack Matrix Hub (11)
Consolidated MariaDB InnoDB Buffer & Table Open Cache for 50+ DBs
Prevent file descriptor exhaustion and disk thrashing when hosting 50 to 250 separate client WordPress databases on one MariaDB instance.
table_open_cache=4096 · 2-6 GB InnoDB · O_DIRECT
The Hidden table_open_cache Bottleneck at 50+ Databases
Fifty WordPress sites with WooCommerce and Yoast average 1,800+ distinct database tables. MariaDB default table_open_cache = 400 forces constant table file reopening and mutex lock contention on every page load.
Scaling Buffer Pool & Open Files Limit Together
Raise open_files_limit = 16384 and table_open_cache = 4096 alongside a 2 GB to 6 GB innodb_buffer_pool_size (with innodb_flush_method = O_DIRECT) so hot wp_options and HPOS tables stay pinned in RAM.
Measured Density & Margin Thresholds
| Portfolio Size | Total Tables | table_open_cache | InnoDB Buffer Pool |
|---|---|---|---|
| 20-50 Client DBs | 700 - 1,800 | 2,048 | 1.5 - 2.0 GB |
| 50-120 Client DBs | 1,800 - 4,200 | 4,096 | 3.0 - 4.0 GB |
| 120-250 Client DBs | 4,200 - 8,500 | 8,192 | 6.0 - 8.0 GB |