2013年6月26日 星期三

MySQL my.conf (mysql config tune) mysql-config

/usr/my.cnf

; remark on the font
# remark on the font or middle


key_buffer_size=256M
table_cache=256
set_buffer_size=1M
query_cache_type=
query_cache_size=16M

#####################

set-variable = max_connections=500
safe-show-database
skip-innodb
long_query_time=5
log-slow-queries=/var/log/mysql/log-slow-queries.log
query_cache_type=1
query_cache_size=16M
query_cache_limit=1M
table_cache=512
key_buffer=150M
thread_concurrency=2
thread_cache_size=80
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=768K



After edit this file : service mysql restart




SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 0 out of 666413 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 = 4
Current threads_cached = 3
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 50
Current threads_connected = 2
Historic max_used_connections = 17
The number of used connections is 34% of the configured maximum.
Your max_connections variable seems to be fine.

No InnoDB Support Enabled!

MEMORY USAGE
Max Memory Ever Allocated : 168 M
Configured Max Per-thread Buffers : 231 M
Configured Max Global Buffers : 90 M
Configured Max Memory Limit : 321 M
Physical Memory : 1.71 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 15 M
Current key_buffer_size = 32 M
Key cache miss rate is 1 : 130
Key buffer free ratio = 67 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 48 M
Current query_cache_used = 18 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 38.37 %
Current query_cache_min_res_unit = 4 K
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 = 2.00 M
You have had 35 queries where a join could not use an index properly
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 = 3060 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 = 1500 tables
You have a total of 1087 tables
You have 1108 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 250 M
Current tmp_table_size = 250 M
Of 7076 temp tables, 26% 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 = 12 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 1777
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.

沒有留言:

張貼留言