MariaDB innodb_buffer_pool_size for LearnDash Activity Tables
Keep wp_learndash_user_activity, wp_learndash_pro_quiz_statistic, and wp_usermeta hot pages resident in RAM to stop disk-bound quiz stalls.
1.25x Active DB Size | innodb_flush_log_at_trx_commit=2
How Quiz Progress Writes Thrash Small Buffer Pools
Every lesson completion and quiz question answer updates wp_learndash_user_activity and wp_learndash_pro_quiz_statistic. When MariaDB ships with a 128M default innodb_buffer_pool_size, active B-tree indexes constantly evict and force synchronous NVMe reads on every student click.
Safe my.cnf Allocation Without Starving PHP-FPM
Size innodb_buffer_pool_size at 1.25x your active LMS working tables (typically 1 GB to 8 GB), never exceeding 45% of total RAM on a single-node VPS so PHP-FPM retains predictable headroom. Setting innodb_flush_log_at_trx_commit=2 eliminates per-commit fsync latency spikes during simultaneous quiz submissions.
Measured Thresholds & Configuration Targets
| Active LMS Database Size | Recommended Buffer Pool | Redo Log Size | Min Host RAM |
|---|---|---|---|
| < 1 GB (10k Enrollments) | 1,024 MB | 256 MB | 4 GB+ |
| 1 - 3 GB (50k Enrollments) | 2,048 - 3,072 MB | 512 MB | 8 GB+ |
| 3 - 8 GB (BuddyBoss + LD) | 4,096 - 6,144 MB | 1,024 MB | 16 GB+ |
| 8 - 16 GB (Multi-Cohort) | 8,192 - 12,288 MB | 2,048 MB | 32 GB+ |