Defaults and tuning guidance for 8.4¶
MySQL 8.4 updates several server defaults to align with modern CPUs, memory sizes, and SSD/NVMe storage. An in-place upgrade that blindly reuses an 8.0-era my.cnf may miss out on these improvements or cause unexpected performance behaviors. Review and re-evaluate your configuration on 8.4, or generate a new config, rather than carrying old settings forward.
Notable InnoDB default changes¶
| InnoDB System Variable Name | New Default (8.4) | Previous Default (8.0) |
|---|---|---|
innodb_adaptive_hash_index |
OFF | ON |
innodb_change_buffering |
none | all |
innodb_doublewrite_files |
2 | innodb_buffer_pool_instances * 2 |
innodb_doublewrite_pages |
128 | 4 |
innodb_flush_method on Linux |
O_DIRECT if supported, otherwise fsync | fsync |
innodb_io_capacity |
10000 | 200 |
innodb_log_buffer_size |
67108864 (64 MiB) | 16777216 (16 MiB) |
innodb_buffer_pool_populate |
ON | N/A (new) |
innodb_numa_interleave |
ON | OFF |
temptable_max_ram |
3% of total memory (1–4 GiB range) | 1073741824 (1 GiB) |
innodb_parallel_read_threads |
available logical processors / 8 (min 4) | 4 |
Why these changes matter:
- Higher
innodb_io_capacityleverages SSD/NVMe for IO-bound workloads; legacy spinning disks may need a lower value. - Larger
innodb_log_buffer_sizereduces redo flush frequency—helpful for write-heavy workloads. innodb_adaptive_hash_indexdefault OFF favors predictability; the adaptive hash index can become a contention source under concurrency.innodb_buffer_pool_populatedefaults ON to enforce page faults on startup and avoid runtime stalls from page faults; disable it if you value fast startup more than runtime latency. See NUMA interleave and buffer pool populate.innodb_numa_interleavedefaults ON to reduce memory imbalance on multi-socket systems. From 8.4.11, it only controls interleaved NUMA allocations and no longer affects whether page faults are enforced on startup.innodb_change_bufferingset tononereduces overhead for modern storage that handles random writes efficiently.innodb_doublewrite_pagesincreased to 128 improves doublewrite performance on fast storage.
Configuration review checklist¶
Use this to adapt an 8.0 configuration to 8.4:
- Remove overrides that merely reassert old 8.0 defaults unless they are proven necessary.
- Re-evaluate IO settings (
innodb_io_capacity, flush method) based on storage type and observed latency. - Confirm redo/undo settings and log buffer meet current write patterns.
- Validate parallel read threads relative to CPU topology and workload.
- If
innodb_numa_interleaveis set toOFF, reviewinnodb_buffer_pool_populate. In 8.4.10, disabling NUMA interleave also skipped startup pre-faulting. In 8.4.11, you must setinnodb_buffer_pool_populate=OFFto keep that behavior. - Generate a fresh config for 8.4 when possible; only reapply carefully justified overrides.
NUMA interleave and buffer pool populate¶
In 8.4.10, innodb_numa_interleave controlled both interleaved NUMA allocation and whether buffer pool pages were pre-faulted on startup.
In 8.4.11, those behaviors are separate:
innodb_numa_interleavecontrols only interleaved NUMA allocations.innodb_buffer_pool_populatecontrols whether pages are pre-faulted on startup.
Both default to ON. With the defaults, startup behavior matches 8.4.10 when innodb_numa_interleave was ON. There is no behavior change unless you override one of the variables.
If my.cnf disables NUMA interleave, 8.4.11 still pre-faults pages because innodb_buffer_pool_populate remains ON. To compare 8.4.10 and 8.4.11 fairly, also disable populate so neither version pre-faults pages:
8.4.10:
innodb_buffer_pool_size = 4G
innodb_numa_interleave = OFF
innodb_buffer_pool_load_at_startup = ON
Equivalent 8.4.11 configuration (no pre-faulted pages, matching 8.4.10 with NUMA interleave off):
innodb_buffer_pool_size = 4G
innodb_numa_interleave = OFF
innodb_buffer_pool_populate = OFF
innodb_buffer_pool_load_at_startup = ON
Without MAP_POPULATE (innodb_buffer_pool_populate=OFF in 8.4.11, or innodb_numa_interleave=OFF in 8.4.10), mmap raises only virtual size (VSZ). Resident set size (RSS) grows as pages are first touched.
Practical evaluation steps¶
- Benchmark with your workload: establish a baseline on 8.0, then restore to 8.4 and run the same tests.
- Compare Performance Schema metrics and wait events for regressions or new hotspots.
- Adjust a single variable at a time; document changes and their impacts.