# CMPTV MySQL Tuning — updated 2026-05-10 (reduced buffer pool to relieve swap exhaustion)
[mysqld]
innodb_buffer_pool_size         = 1280M
innodb_buffer_pool_instances    = 1
innodb_log_file_size            = 128M
innodb_flush_log_at_trx_commit  = 2
innodb_flush_method             = O_DIRECT
innodb_read_io_threads          = 8
innodb_write_io_threads         = 8
max_connections                 = 200
max_allowed_packet              = 64M
wait_timeout                    = 300
interactive_timeout             = 300
query_cache_type                = 0
query_cache_size                = 0
tmp_table_size                  = 64M
max_heap_table_size             = 64M
slow_query_log                  = 1
slow_query_log_file             = /var/log/mysql/slow-queries.log
long_query_time                 = 2
key_buffer_size                 = 64M
table_open_cache                = 2000
thread_cache_size               = 16
join_buffer_size                = 2M
sort_buffer_size                = 2M
