Systems Tuning
MariaDB 10.11 InnoDB Buffer Pool & Log Sizing for Multi-Tenant DBs
Calibrate innodb_buffer_pool_size, innodb_log_file_size, and max_connections across 20-40 tenant schemas without starving PHP-FPM or Varnish.
35% Node RAM Pool · 1 GB Redo Log · O_DIRECT Zero Double-Cache
Why Multi-Site Nodes Must Not Give 70% RAM to InnoDB
Dedicated database servers allocate 70-80% of RAM to InnoDB, but a single-node CloudPanel VPS shares memory with Nginx, Varnish malloc, Redis, and PHP-FPM pools. Keeping InnoDB at 30-35% of RAM prevents Linux OOM-killer sweeps.
Using O_DIRECT to Protect OS Page Cache
Enabling innodb_flush_method = O_DIRECT bypasses OS double-buffering for InnoDB data files, leaving Linux page cache available for Nginx static files and rotated logs.
Measured Parameters & CloudPanel Stack Directives
| my.cnf Parameter | 16 GB Node (KVM 4 / HF) | 32 GB Node (KVM 8) |
|---|---|---|
| innodb_buffer_pool_size | 5.6G (35% of total RAM) | 11.2G (35% of total RAM) |
| innodb_log_file_size | 512M - 1G | 1G - 2G |
| innodb_flush_method | O_DIRECT | O_DIRECT |
| max_connections | 150 (with 16M thread_cache_size) | 250 (with 32M thread_cache_size) |