メモリ 4G のマシンの設定例
max_connections = 900
thread_cache_size = 300
table_cache = 256
max_allowed_packet = 32M
query_cache_limit = 2M
query_cache_size = 256M
tmp_table_size = 32M
max_heap_table_size = 32M
thread_stack = 512K
key_buffer_size = 32M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 1M
join_buffer_size = 1M
myisam_sort_buffer_size = 1M
bulk_insert_buffer_size = 1M
innodb_buffer_pool_size = 128M
innodb_log_file_size = 32M
innodb_thread_concurrency = 8
mysqld --verbose --help > /dev/null
systemctl restart mariadb
systemctl restart mysql
service mysqld start