Оптимизация сервера mysql (mariadb)
Всем привет! Есть отдельный выделенный сервер для базы mysql. 8 ядер 32ГБ ОЗУ. Размер БД 50ГБ (370 таблиц) Последнюю неделю сервер начал тупить, нагрузка на сайт не возростала (все как обычно). Подскажите, может можно что-то оптимизировать для ускорения? Поставил mysqltuner и он выдал такие результаты:
[--] Reads / Writes: 94% / 6%
[--] Binary logging is disabled
[--] Physical Memory : 31.4G
[--] Max MySQL memory : 78.4G
[--] Other process memory: 0B
[--] Total buffers: 18.8G global + 1.2G per thread (50 max threads)
[--] P_S Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[!!] Maximum reached memory usage: 66.5G (211.72% of installed RAM)
[!!] Maximum possible memory usage: 78.4G (249.69% of installed RAM)
[!!] Overall possible memory usage with other process exceeded memory
[OK] Slow queries: 0% (43/19K)
[OK] Highest usage of available connections: 80% (40/50)
[OK] Aborted connections: 0.00% (0/1903)
[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
[!!] Query cache may be disabled by default due to mutex contention.
[!!] Query cache efficiency: 13.1% (2K cached / 21K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1K sorts)
[OK] No joins without indexes
[OK] Temporary tables created on disk: 24% (636 on disk / 2K total)
[OK] Thread cache hit rate: 97% (40 created / 1K connections)
[OK] Table cache hit rate: 98% (495 hits / 501 requests)
[OK] table_definition_cache(400) is upper than number of tables(298)
[OK] Open file limit used: 0% (28/16K)
[OK] Table locks acquired immediately: 100% (22K immediate / 22K locks)
Файл конфигурации:
low_query_log = 1
slow_query_log_file = /var/log/mysql/mariadb-slow.log
long_query_time = 7
wait_timeout = 20
interactive_timeout = 20
tmpdir = /dev/shm
key_buffer_size = 8G
max_allowed_packet = 8M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 2M
tmp_table_size = 2G
max_heap_table_size = 2G
thread_cache_size = 128
join_buffer_size = 128M
max_sort_length = 256
query_cache_limit = 8M
query_cache_size = 128M
query_cache_type = 1
max_connections = 50
max_user_connections = 0
#Innodb
innodb_buffer_pool_size = 27G
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 7G
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 30
innodb_file_format=barracuda