Need to migrate your e-mails to a new server? Free and paid versions of our online tool available.
Hero Image

Tune MySQL Performance on OpenBSD 7.5

Tune MySQL Performance on OpenBSD 7.5

my.cnf

[mysqld]
innodb_buffer_pool_size        = 4G
innodb_buffer_pool_instances   = 4
innodb_log_file_size           = 512M
innodb_flush_log_at_trx_commit = 1
innodb_flush_method            = O_DIRECT
max_connections                = 200
thread_cache_size              = 50
tmp_table_size                 = 64M
max_heap_table_size            = 64M
slow_query_log                 = 1
long_query_time                = 1
log_queries_not_using_indexes  = 1

Restart

systemctl restart mysql 2>/dev/null || rc-service mysql restart 2>/dev/null || rcctl restart mysqld

Find missing indexes

SELECT * FROM sys.statements_with_full_table_scans LIMIT 20;

Buffer pool usage

SHOW STATUS LIKE 'Innodb_buffer_pool_%';