Good Day!
Looking forward to getting guidance on optimizing my mysql server to keep the load down and function efficiently.
Below posted is the information that would help base suggestions. Thanks for your time in advance.
Server Details:
"top" Command Output
"free" command output
Looking forward to getting guidance on optimizing my mysql server to keep the load down and function efficiently.
Below posted is the information that would help base suggestions. Thanks for your time in advance.
Server Details:
Code:
Dual Xeon 5620 Quad core Processors
6 GB RAM
500 GB SATA x 2
RAID 1 Controller
Redhat Enterprise 5.1
Code:
my.cnf settings
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
group_concat_max_len=10000000
key_buffer_size = 512M
thread_cache_size = 25
query_cache_size = 64M
query_cache_limit = 2M
#tmp_table_size = 24M
#max_heap_table_size = 24M
skip-innodb
default-storage-engine = myisam
table_open_cache = 500
#table_definition_cache = 20000
#open_files_limit = 15000
#low_priority_updates=1
#concurrent_insert=ALWAYS
log-slow-queries=/var/lib/mysql/slow.log
Code:
mysqltuner.pl output
perl mysqltuner.pl
>> MySQLTuner 1.3.0 - Major Hayden <[email protected]>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password:
[OK] Currently running supported MySQL version 5.5.36-log
[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM
-------- Storage Engine Statistics -------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED -InnoDB +MRG_MYISAM
[--] Data in MyISAM tables: 12G (Tables: 59790)
[!!] Total fragmented tables: 30
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 16h 16m 25s (1M q [20.720 qps], 78K conn, TX: 2B, RX: 247M)
[--] Reads / Writes: 100% / 0%
[--] Total buffers: 592.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 997.8M (16% of installed RAM)
[OK] Slow queries: 0% (0/1M)
[OK] Highest usage of available connections: 46% (70/151)
[OK] Key buffer size / total MyISAM indexes: 512.0M/1.5G
[OK] Key buffer hit rate: 97.3% (56M cached / 1M reads)
[!!] Query cache efficiency: 17.3% (148K cached / 855K selects)
[!!] Query cache prunes per day: 1021830
[OK] Sorts requiring temporary tables: 0% (197 temp sorts / 167K sorts)
[!!] Temporary tables created on disk: 39% (135K on disk / 348K total)
[OK] Thread cache hit rate: 99% (71 created / 78K connections)
[!!] Table cache hit rate: 0% (500 open / 96K opened)
[OK] Open file limit used: 85% (998/1K)
[OK] Table locks acquired immediately: 100% (707K immediate / 707K locks)
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries without LIMIT clauses
Increase table_cache gradually to avoid file descriptor limits
Read this before increasing table_cache over 64: http://bit.ly/1mi7c4C
Variables to adjust:
query_cache_limit (> 2M, or use smaller result sets)
query_cache_size (> 64M)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
table_cache (> 500)
"top" Command Output
top - 22:44:54 up 602 days, 23:50, 1 user, load average: 1.41, 1.20, 1.44
Tasks: 255 total, 1 running, 254 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.1%sy, 0.0%ni, 98.6%id, 1.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 6220724k total, 6030940k used, 189784k free, 226260k buffers
Swap: 9438176k total, 84k used, 9438092k free, 4678788k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
30382 mysql 15 0 1021m 576m 4496 S 122.5 9.5 803:49.24 mysqld
16544 apache 15 0 124m 50m 31m S 4.0 0.8 0:04.25 httpd
"free" command output
free
total used free shared buffers cached
Mem: 6220724 6025900 194824 0 225648 4675496
-/+ buffers/cache: 1124756 5095968
Swap: 9438176 84 9438092