One of my server have low server load just about 1.xx to 2.xx max, but wordpress site run slow, maybe someone have suggestion what should code need to increase in my.cnf ? Dedicated server only for one medium wp site. I see from mysqltuner get limit like Thread cache hit etc.
Access WHM => Restart Services » SQL Server (MySQL) about 5 minutes, other whm menu just 4 sec.
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 39m 23s (1M q [765.257 qps], 2K conn, TX: 2G, RX: 204M)
[--] Reads / Writes: 99% / 1%
[--] Binary logging is disabled
[--] Physical Memory : 31.1G
[--] Max MySQL memory : 20.9G
[--] Other process memory: 0B
[--] Total buffers: 19.5G global + 2.9M per thread (500 max threads)
[--] P_S Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 19.5G (62.78% of installed RAM)
[OK] Maximum possible memory usage: 20.9G (67.26% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/1M)
[OK] Highest usage of available connections: 1% (9/500)
[OK] Aborted connections: 0.04% (1/2625)
[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (11 temp sorts / 93K sorts)
[OK] No joins without indexes
[!!] Temporary tables created on disk: 55% (21K on disk / 38K total)
[OK] Thread cache hit rate: 99% (9 created / 2K connections)
[OK] Table cache hit rate: 97% (291 open / 297 opened)
[OK] table_definition_cache(9086) is upper than number of tables(409)
[OK] Open file limit used: 0% (238/236K)
[OK] Table locks acquired immediately: 99% (1M immediate / 1M locks)
-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 68.1% (91M used / 134M cache)
[OK] Key buffer size / total MyISAM indexes: 128.0M/225.3M
[OK] Read Key buffer hit rate: 100.0% (202M cached / 65K reads)
[OK] Write Key buffer hit rate: 97.5% (4K cached / 4K writes)
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 19.0G/126.0M
[OK] Ratio InnoDB log file size / InnoDB Buffer pool size: 2.0G * 2/19.0G should be equal to 25%
[OK] InnoDB buffer pool instances: 19
[--] Number of InnoDB Buffer Pool Chunk : 152 for 19 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 99.88% (6703574 hits/ 6711932 total)
[!!] InnoDB Write Log efficiency: 198.66% (296 hits/ 149 total)
[OK] InnoDB log waits: 0.00% (0 waits / 445 writes)
Current my.cnf config
Access WHM => Restart Services » SQL Server (MySQL) about 5 minutes, other whm menu just 4 sec.
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 39m 23s (1M q [765.257 qps], 2K conn, TX: 2G, RX: 204M)
[--] Reads / Writes: 99% / 1%
[--] Binary logging is disabled
[--] Physical Memory : 31.1G
[--] Max MySQL memory : 20.9G
[--] Other process memory: 0B
[--] Total buffers: 19.5G global + 2.9M per thread (500 max threads)
[--] P_S Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 19.5G (62.78% of installed RAM)
[OK] Maximum possible memory usage: 20.9G (67.26% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/1M)
[OK] Highest usage of available connections: 1% (9/500)
[OK] Aborted connections: 0.04% (1/2625)
[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (11 temp sorts / 93K sorts)
[OK] No joins without indexes
[!!] Temporary tables created on disk: 55% (21K on disk / 38K total)
[OK] Thread cache hit rate: 99% (9 created / 2K connections)
[OK] Table cache hit rate: 97% (291 open / 297 opened)
[OK] table_definition_cache(9086) is upper than number of tables(409)
[OK] Open file limit used: 0% (238/236K)
[OK] Table locks acquired immediately: 99% (1M immediate / 1M locks)
-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 68.1% (91M used / 134M cache)
[OK] Key buffer size / total MyISAM indexes: 128.0M/225.3M
[OK] Read Key buffer hit rate: 100.0% (202M cached / 65K reads)
[OK] Write Key buffer hit rate: 97.5% (4K cached / 4K writes)
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 19.0G/126.0M
[OK] Ratio InnoDB log file size / InnoDB Buffer pool size: 2.0G * 2/19.0G should be equal to 25%
[OK] InnoDB buffer pool instances: 19
[--] Number of InnoDB Buffer Pool Chunk : 152 for 19 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 99.88% (6703574 hits/ 6711932 total)
[!!] InnoDB Write Log efficiency: 198.66% (296 hits/ 149 total)
[OK] InnoDB log waits: 0.00% (0 waits / 445 writes)
Current my.cnf config
Code:
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[mysqld]
log-error=/var/lib/mysql/servermysqlsystem.err
max_connections=500
performance-schema=0
default-storage-engine=InnoDB
#max_allowed_packet=268435456
open_files_limit=236340
sql_mode=""
skip-external-locking
query_cache_size = 0
query_cache_type = 0
## Table and TMP settings
max_heap_table_size = 256M
tmp_table_size = 256M
table_open_cache = 78780
table_definition_cache = 9086
wait_timeout = 60
#interactive_timeout = 60
connect_timeout = 60
### InnoDB Plugin Independent Settings ###
innodb_file_per_table = 1
innodb_log_file_size = 2G
innodb_buffer_pool_size = 19G #global buffer
#innodb_log_buffer_size = 256M #global buffer
innodb_lock_wait_timeout = 90
#innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT #O_DIRECT = local/DAS, O_DSYNC = SAN/iSCSI
skip-innodb-doublewrite
innodb_buffer_pool_instances = 19
innodb_stats_on_metadata=0
## MyISAM Engine
key_buffer_size = 1G #global buffer
myisam_sort_buffer_size = 512M #index buffer size for creating/altering indexes
myisam_max_sort_file_size = 512M #max file size for tmp table when creating/alering indexes
myisam_repair_threads = 4 #thread quantity when running repairs
myisam_recover = BACKUP #repair mode, recommend BACKUP
max_allowed_packet =268435456
[mysqldump]
quick
max_allowed_packet = 1024M