MySQL 8.4 LTS Production my.cnf (Redo Capacity & NVMe)
# MySQL 8.4 LTS / 9.x Production Configuration (32 GB RAM / 8 vCPU / NVMe SSD)
# Place at /etc/mysql/conf.d/99-production-84.cnf
# Clean of removed 8.0 flags (default_authentication_plugin, binlog_transaction_dependency_tracking)
[mysqld]
# 1. InnoDB Buffer Pool & Dynamic Redo Capacity (70% RAM on dedicated DB server)
innodb_buffer_pool_size = 22G
innodb_buffer_pool_instances = 8
innodb_redo_log_capacity = 8G
innodb_log_buffer_size = 64M
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 1
# 2. NVMe Concurrency & Page Cleaners
innodb_io_capacity = 4000
innodb_io_capacity_max = 10000
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_page_cleaners = 8
innodb_numa_interleave = ON
# 3. Connections & In-Memory Temp Tables
max_connections = 500
thread_cache_size = 64
temptable_max_ram = 1G
temptable_max_mmap = 1G
tmp_table_size = 64M
max_heap_table_size = 64M
# 4. Binary Logging & Multi-Threaded GTID Replication (MySQL 8.4 Terminology)
server_id = 101
gtid_mode = ON
enforce_gtid_consistency = ON
binlog_format = ROW
binlog_row_image = MINIMAL
sync_binlog = 1
binlog_expire_logs_seconds = 604800
replica_parallel_workers = 8
replica_preserve_commit_order = ON
# 5. Slow Query Log & Performance Schema Digests
slow_query_log = ON
long_query_time = 0.5
log_slow_extra = ON
performance_schema = ON