I would like to tune up mysql cnf settings to boost performance of the queries in my new server

[[email protected] ]# cat /etc/my.cnf
[mysqld]
local-infile=0
skip-locking
query_cache_limit=4M
query_cache_size=32M
query_cache_type=1
max_connections=500
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_cache_size=128
key_buffer=16M
key_buffer_size=256M
join_buffer=1M
join_buffer_size=1M
max_allowed_packet=16M
table_cache=2048
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
# Try number of CPU’s*2 for thread_concurrency
thread_concurrency=8
myisam_sort_buffer_size=64M
server-id=1
tmp_table_size=64M
max_heap_table_siz=64M
innodb_buffer_pool_size=128M

[safe_mysqld]
err-log=/var/log/mysqld.log
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout

After restarting mysql server->   /etc/init.d/mysql restart

and testing out page load speed then ran mysqltuner.pl and  here are  the results from mysqltuner.pl

[[email protected] ]# ./mysqltuner.pl

>> Run with ‘–help’ for additional options and output filtering

——– General Statistics ————————————————–
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.51a-community
[OK] Operating on 64-bit architecture

——– Storage Engine Statistics ——————————————-
[--] Status: +Archive -BDB +Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 795M (Tables: 1641)
[--] Data in InnoDB tables: 72M (Tables: 118)
[--] Data in MEMORY tables: 0B (Tables: 6)
[!!] Total fragmented tables: 8

——– Security Recommendations ——————————————-
[OK] All database users have passwords assigned

——– Performance Metrics ————————————————-
[--] Up for: 10m 21s (7K q [12.483 qps], 735 conn, TX: 16M, RX: 1M)
[--] Reads / Writes: 85% / 15%
[--] Total buffers: 482.0M global + 5.5M per thread (500 max threads)
[OK] Maximum possible memory usage: 3.2G (81% of installed RAM)
[OK] Slow queries: 0% (0/7K)
[OK] Highest usage of available connections: 0% (3/500)
[OK] Key buffer size / total MyISAM indexes: 256.0M/183.2M
[OK] Key buffer hit rate: 97.3% (168K cached / 4K reads)
[OK] Query cache efficiency: 39.4% (1K cached / 4K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (1 temp sorts / 368 sorts)
[OK] Temporary tables created on disk: 21% (166 on disk / 785 total)
[OK] Thread cache hit rate: 99% (3 created / 735 connections)
[OK] Table cache hit rate: 99% (1K open / 1K opened)
[OK] Open file limit used: 72% (3K/4K)
[OK] Table locks acquired immediately: 100% (4K immediate / 4K locks)
[OK] InnoDB data size / buffer pool: 72.0M/128.0M

——– Recommendations —————————————————–
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours – recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries

 

and then ran tuning-primer.sh and here is the result of tuning-primer.sh

[[email protected] ]# ./tuning-primer.sh

— MYSQL PERFORMANCE TUNING PRIMER –
– By: Matthew Montgomery -

MySQL Version 5.0.51a-community x86_64

Uptime = 0 days 0 hrs 11 min 3 sec
Avg. qps = 12
Total Questions = 8041
Threads Connected = 1

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations

To find out more information on how each of these
runtime variables effects performance visit:

http://dev.mysql.com/doc/refman/5.0/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 sec.
You have 0 out of 8062 that take longer than 10 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.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 128
Current threads_cached = 2
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 500
Current threads_connected = 1
Historic max_used_connections = 3
The number of used connections is 0% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See “MEMORY USAGE” section to make sure you are not over-allocating

INNODB STATUS
Current InnoDB index space = 32 M
Current InnoDB data space = 72 M
Current InnoDB buffer pool free = 61 %
Current innodb_buffer_pool_size = 128 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 : 434 M
Configured Max Per-thread Buffers : 2.68 G
Configured Max Global Buffers : 418 M
Configured Max Memory Limit : 3.08 G
Physical Memory : 3.85 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 183 M
Current key_buffer_size = 256 M
Key cache miss rate is 1 : 38
Key buffer free ratio = 80 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 32 M
Current query_cache_used = 4 M
Current query_cache_limit = 4 M
Current Query cache Memory fill ratio = 13.23 %
Current query_cache_min_res_unit = 4 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won’t cache query results that are larger than query_cache_limit in 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 = 1.00 M
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

OPEN FILES LIMIT
Current open_files_limit = 4606 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_cache value = 2048 tables
You have a total of 1782 tables
You have 1795 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 64 M
Current tmp_table_size = 64 M
Of 800 temp tables, 18% were created on disk
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 1 M
Current table scan ratio = 29 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 0 : 8326
Your table locking seems to be fine


Here are the current results, I will re-check the settings after get the statistic from MySQL for 1 week.

 

Related information for is used for :

optimise mysql 5 0
optimize my cnf
my cnf optimization
my cnf
wordpress my cnf
optimized my cnf
You are using less than 10% of your configured max_connections
my ini
my cnf myisam index buffer
optimizing my cnf
mysql high performance my cnf
my cnf performance
my cnf optimize
optimizing my cnf centos
optimize my cnf for wordpress
rhel 6 my cnf
where is my cnf in wordpress
best centos 64 bit my cnf settings
open-files-limit 4606
centos 6 my cnf
centos 6 my cnf where
centos server optimization server
maximum possible memory usage my cnf
my cnf example wordpress
my conf sample centos
my ini optimization
mysql centos optimize