On mysql Tuning these are the recommendations.
Reduce your overall MySQL memory footprint for system stability
Dedicate this server to your database for highest performance.
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries which have no LIMIT clause
Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: https://bit.ly/2TcGgtU
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
tmp_table_size (> 24M)
max_heap_table_size (> 24M)
key_buffer_size (~ 1M)
innodb_log_file_size should be (=64M) if possible, so InnoDB total log files size equals to 25% of buffer pool size.
How to change all these values on server.
existing my.cnf details are
[mysqld]
performance-schema = 0
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
symbolic-links = 0
log-error = /var/log/mysqld.log
pid-file = /var/run/mysqld/mysqld.pid
innodb_buffer_pool_size = 500217728
max_allowed_packet = 268435456
open_files_limit = 40000
innodb_file_per_table = 1
skip-name-resolve=0
join_buffer_size=300M
tmp_table_size=24M
max_heap_table_size=24M
table_definition_cache=4000
performance_schema=ON
key_buffer_size=2M
Reduce your overall MySQL memory footprint for system stability
Dedicate this server to your database for highest performance.
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries which have no LIMIT clause
Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: https://bit.ly/2TcGgtU
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
tmp_table_size (> 24M)
max_heap_table_size (> 24M)
key_buffer_size (~ 1M)
innodb_log_file_size should be (=64M) if possible, so InnoDB total log files size equals to 25% of buffer pool size.
How to change all these values on server.
existing my.cnf details are
[mysqld]
performance-schema = 0
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
symbolic-links = 0
log-error = /var/log/mysqld.log
pid-file = /var/run/mysqld/mysqld.pid
innodb_buffer_pool_size = 500217728
max_allowed_packet = 268435456
open_files_limit = 40000
innodb_file_per_table = 1
skip-name-resolve=0
join_buffer_size=300M
tmp_table_size=24M
max_heap_table_size=24M
table_definition_cache=4000
performance_schema=ON
key_buffer_size=2M