Am găsit întâmplător o unealtă bună pentru optimizarea configurării MySQL.
Unealta analizează istoricul operaţiunilor MySQL şi sugerează modificările pe care ar trebui să le faci pentru a avea o configuraţie optimă.

– By: Matthew Montgomery –

MySQL Version 5.0.27-standard i686

Uptime = 0 days 13 hrs 16 min 43 sec
Avg. qps = 22
Total Questions = 1092347
Threads Connected = 5

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:

Current long_query_time = 3 sec.
You have 127 out of 1092359 that take longer than 3 sec. to complete
The slow query log is NOT enabled.
Your long_query_time seems to be fine

Current thread_cache_size = 128
Current threads_cached = 116
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

Current max_connections = 500
Current threads_connected = 5
Historic max_used_connections = 121
The number of used connections is 24% of the configured maximum.
Your max_connections variable seems to be fine.

Max Memory Ever Allocated : 801 M
Configured Max Per-thread Buffers : 2 G
Configured Max Global Buffers : 266 M
Configured Max Memory Limit : 2 G
Total System Memory : 2.98 G
Max memory limit seem to be within acceptable norms

Current MyISAM index space = 631 M
Current key_buffer_size = 64 M
Key cache miss rate is 1 : 972
Key buffer fill ratio = 24.00 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere

Query cache is enabled
Current query_cache_size = 192 M
Current query_cache_used = 184 M
Current query_cach_limit = 4 M
Current Query cache fill ratio = 95.94 %
However, 21692 queries have been removed from the query cache due to lack of memory
Perhaps you should raise query_cache_size
MySQL won’t cache query results that are larger than query_cache_limit in size

Current sort_buffer_size = 2 M
Current record/read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

Current join_buffer_size = 1.00 M
You have had 57 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.

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

Current table_cache value = 2048 tables
You have a total of 1418 tables
You have 1474 open tables.
The table_cache value seems to be fine

Current max_heap_table_size = 95 M
Current tmp_table_size = 96 M
Of 16881 temp tables, 73% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
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.

Current read_buffer_size = 1020 K
Current table scan ratio = 174 : 1
read_buffer_size seems to be fine

Current Lock Wait ratio = 1 : 222
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 concurrentcy of inserts on Dynamic row-length tables
consider setting ‘concurrent_insert=2’.

Unealta se numeşte MySQL Performance Tuning Primer Script şi o găsiţi (alături de alte script-uri interesante) la adrsa: