Its Quad core with 12gb Ram.
[mysqld] bind-address=127.0.0.1 local-infile=0 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid query_cache_type=1 query_cache_size=64M table_open_cache=16384 table_definition_cache=6384 tmp_table_size=64M join_buffer_size=512k
>> MySQLTuner 1.2.0 - Major Hayden <firstname.lastname@example.org> >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering -------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.1.61 [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ------------------------------------------- [--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 614M (Tables: 1416) [--] Data in InnoDB tables: 1G (Tables: 2446) [--] Data in MEMORY tables: 1M (Tables: 42) [!!] Total fragmented tables: 2612 -------- Security Recommendations ------------------------------------------- [OK] All database users have passwords assigned -------- Performance Metrics ------------------------------------------------- [--] Up for: 11d 7h 4m 57s (18M q [18.815 qps], 721K conn, TX: 160B, RX: 4B) [--] Reads / Writes: 88% / 12% [--] Total buffers: 34.0M global + 2.7M per thread (151 max threads) [OK] Maximum possible memory usage: 449.2M (3% of installed RAM) [OK] Slow queries: 0% (171/18M) [OK] Highest usage of available connections: 29% (44/151) [OK] Key buffer size / total MyISAM indexes: 8.0M/430.4M [OK] Key buffer hit rate: 95.9% (181M cached / 7M reads) [!!] Query cache is disabled [OK] Sorts requiring temporary tables: 0% (10 temp sorts / 1M sorts) [!!] Joins performed without indexes: 13899 [!!] Temporary tables created on disk: 33% (239K on disk / 723K total) [!!] Thread cache is disabled [!!] Table cache hit rate: 0% (64 open / 1M opened) [OK] Open file limit used: 0% (74/65K) [OK] Table locks acquired immediately: 99% (21M immediate / 21M locks) [!!] InnoDB data size / buffer pool: 1.6G/8.0M -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance Enable the slow query log to troubleshoot bad queries Adjust your join queries to always utilize indexes When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries without LIMIT clauses Set thread_cache_size to 4 as a starting value Increase table_cache gradually to avoid file descriptor limits Variables to adjust: query_cache_size (>= 8M) join_buffer_size (> 128.0K, or always use indexes with joins) tmp_table_size (> 16M) max_heap_table_size (> 16M) thread_cache_size (start at 4) table_cache (> 64) innodb_buffer_pool_size (>= 1G)
-- MYSQL PERFORMANCE TUNING PRIMER -- - By: Matthew Montgomery - MySQL Version 5.1.61 x86_64 Uptime = 11 days 7 hrs 3 min 52 sec Avg. qps = 18 Total Questions = 18359638 Threads Connected = 7 Server has been running for over 48hrs. It should be safe to follow these recommendations To find out more information on how each of these runtime variables effects performance visit: http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html Visit http://www.mysql.com/products/enterprise/advisors.html for info about MySQL's Enterprise Monitoring and Advisory Service SLOW QUERIES The slow query log is NOT enabled. Current long_query_time = 10.000000 sec. You have 171 out of 18359659 that take longer than 10.000000 sec. to complete Your long_query_time seems to be fine BINARY UPDATE LOG The binary update log is NOT enabled. You will not be able to do point in time recovery See http://dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html WORKER THREADS Current thread_cache_size = 0 Current threads_cached = 0 Current threads_per_sec = 3 Historic threads_per_sec = 0 Threads created per/sec are overrunning threads cached You should raise thread_cache_size MAX CONNECTIONS Current max_connections = 151 Current threads_connected = 7 Historic max_used_connections = 44 The number of used connections is 29% of the configured maximum. Your max_connections variable seems to be fine. INNODB STATUS Current InnoDB index space = 343 M Current InnoDB data space = 1.59 G Current InnoDB buffer pool free = 0 % Current innodb_buffer_pool_size = 8 M Depending on how much space your innodb indexes take up it may be safe to increase this value to up to 2 / 3 of total system memory MEMORY USAGE Max Memory Ever Allocated : 138 M Configured Max Per-thread Buffers : 415 M Configured Max Global Buffers : 17 M Configured Max Memory Limit : 433 M Physical Memory : 11.61 G Max memory limit seem to be within acceptable norms KEY BUFFER Current MyISAM index space = 430 M Current key_buffer_size = 7 M Key cache miss rate is 1 : 24 Key buffer free ratio = 81 % Your key_buffer_size seems to be fine QUERY CACHE Query cache is supported but not enabled Perhaps you should set the query_cache_size SORT OPERATIONS Current sort_buffer_size = 2 M Current read_rnd_buffer_size = 256 K Sort buffer seems to be fine JOINS Current join_buffer_size = 132.00 K You have had 13596 queries where a join could not use an index properly You have had 303 joins without keys that check for key usage after each row You should enable "log-queries-not-using-indexes" Then look for non indexed joins in the slow query log. If you are unable to optimize your queries you may want to increase your join_buffer_size to accommodate larger joins in one pass. Note! This script will still suggest raising the join_buffer_size when ANY joins not using indexes are found. OPEN FILES LIMIT Current open_files_limit = 65535 files The open_files_limit should typically be set to at least 2x-3x that of table_cache if you have heavy MyISAM usage. Your open_files_limit value seems to be fine TABLE CACHE Current table_open_cache = 64 tables Current table_definition_cache = 256 tables You have a total of 3927 tables You have 64 open tables. Current table_cache hit rate is 0% , while 100% of your table cache is in use You should probably increase your table_cache You should probably increase your table_definition_cache value. TEMP TABLES Current max_heap_table_size = 16 M Current tmp_table_size = 16 M Of 484516 temp tables, 33% were created on disk Perhaps you should increase your tmp_table_size and/or max_heap_table_size to reduce the number of disk-based temporary tables Note! BLOB and TEXT columns are not allow in memory tables. If you are using these columns raising these values might not impact your ratio of on disk temp tables. TABLE SCANS Current read_buffer_size = 128 K Current table scan ratio = 20 : 1 read_buffer_size seems to be fine TABLE LOCKING Current Lock Wait ratio = 1 : 69809 Your table locking seems to be fine
Proposed new my.cnf
[mysqld] bind-address=127.0.0.1 local-infile=0 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 table_open_cache=8192 thread_cache_size=4 max_connections=200 innodb_buffer_pool_size=4096M query_cache_type=1 query_cache_size=256M query_cache_limit=8M join_buffer_size=1M table_definition_cache=6384 tmp_table_size=512M max_heap_table_size=512M innodb_thread_concurrency=10 key_buffer_size=512M max_allowed_packet=32M sort_buffer_size=64M read_buffer_size=64M read_rnd_buffer_size=64M myisam_sort_buffer_size=64M [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
Anyone spot anything glaringly obvious i've missed or messed up in the proposed new my.cnf before I commit?