I have a database server that runs on 128GB of RAM, 500GB HDD and 10core processor.
I have installed mysqltuner and adjusted all variables as suggested but the MySQL performance improves for only a few hours and then goes back to sluggish performance.
According to mytop, i have about 8 slow queries which I doubt can be the cause of this.
Note that this server has only MySQL running.
How best can i further improve/optimize MySQL perfomance. Below is a snippet of mysql.conf file.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
key_buffer_size = 128M
max_allowed_packet = 400M
thread_stack = 284K
thread_cache_size = 64
innodb_buffer_pool_size = 4G
innodb_log_file_size = 576M
innodb_buffer_pool_instances = 4
innodb_flush_log_at_trx_commit = 2
innodb_file_per_table = 1
innodb_flush_method = O_DIRECT
innodb_doublewrite = 0
innodb_support_xa = 0
innodb_checksums = 0
join_buffer_size=500M
sort_buffer_size=4M
read_buffer_size=4M
read_rnd_buffer_size=4M
table_definition_cache=4096
table_open_cache=4096
tmp_table_size=536870912
optimizer_search_depth=12
innodb_adaptive_hash_index=0
max_heap_table_size=1610612736
expire_logs_days = 10
max_binlog_size = 100M