群晖自带的Mariadb参数优化

群晖自带的mariadb的性能,非常的差查询万行级别的表就需要大概 3 秒的时间。所以相关的参数是需要进行优化的,这里为了存档就,直接贴一份现在的配置。来作为备份。

[mysqld]
bind-address = 0.0.0.0
socket = /run/mysqld/mysqld10.sock
pid-file = /run/mysqld/mysqld10.pid
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 64M
table_open_cache = 4000
table_open_cache_instances = 32
read_buffer_size = 1M
read_rnd_buffer_size = 1M
net_buffer_length = 8K
thread_stack = 512K
innodb_data_home_dir = /var/packages/MariaDB10/target/mysql
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/packages/MariaDB10/target/mysql
innodb_buffer_pool_size = 512M
innodb_log_file_size = 128M
innodb_flush_log_at_trx_commit = 0
#innodb_lock_wait_timeout = 50
innodb_file_per_table = 1
synology_password_check = FORCE_PLUS_PERMANENT

slow_query_log = OFF
query_cache_type = ON
query_cache_size = 64M
query_cache_limit = 128M
#max_heap_table_size = 64M
long_query_time = 3

留下点什么吧