https://www.tecmint.com/install-secure-performance-tuning-mariadb-database-server/ https://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/ # OS tuning 1) use sysctl to set: vm.swappiness = 1 2) Store MySQL Database Data on Fast Separate Partition # tuning mysqldb / mariadb 1) enable innoDB file-per-table innodb_file_per_table=1 2) Optimizing InnoDB buffer pool Usage innodb_buffer_pool_size 3) Set MySQL Max Connections Keep in mind that too many connections can cause high RAM usage and lock up your MySQL server. Usually small websites will require between 100-200 connections while larger may require 500-800 or even more. The value you apply here strongly depends on your particular MySQL/MariaDB usage. max_connections=151 4) Configure MySQL thread_cache_size To improve your performance you can set the thread_cache_size to a relatively high number. To find the thread cache hit rate, you can use the following technique: mysql> show status like 'Threads_created'; mysql> show status like 'Connections'; calculate the thread cache hit rate percentage: 100 - ((Threads_created / Connections) * 100) 5) Disable MySQL Reverse DNS Lookups skip-name-resolve # tuning tools MySQLTuner-perl # check mysqldb /mariadb setting: mysql> SHOW VARIABLES; mysql> SHOW VARIABLES LIKE "%max%";