All pastes #895862 Raw Edit

Noboru

public shellscript v1 · immutable
·published 2008-02-08 03:48 UTC
rendered paste body
        -- MYSQL PERFORMANCE TUNING PRIMER --             - By: Matthew Montgomery -MySQL Version 5.0.45-log i686tuning-primer.sh: line 388: bc: command not foundtuning-primer.sh: line 389: bc: command not foundtuning-primer.sh: line 390: bc: command not foundtuning-primer.sh: line 391: bc: command not foundtuning-primer.sh: line 392: bc: command not foundtuning-primer.sh: line 393: bc: command not foundUptime =  days  hrs  min  secAvg. qps = 39Total Questions = 96999Threads Connected = 6Warning: Server has not been running for at least 48hrs.It may not be safe to use these recommendationsTo find out more information on how each of theseruntime variables effects performance visit:http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.htmlVisit http://www.mysql.com/products/enterprise/advisors.htmlfor info about MySQL's Enterprise Monitoring and Advisory ServiceSLOW QUERIESCurrent long_query_time = 10 sec.You have 1 out of 97017 that take longer than 10 sec. to completeThe slow query log is NOT enabled.Your long_query_time may be too high, I typically set this under 5 sec.WORKER THREADSCurrent thread_cache_size = 16Current threads_cached = 4Current threads_per_sec = 0Historic threads_per_sec = 0Your thread_cache_size is fineMAX CONNECTIONSCurrent max_connections = 768Current threads_connected = 7Historic max_used_connections = 11The number of used connections is 1% 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 memorySee "MEMORY USAGE" section to make sure you are not over-allocatingMEMORY USAGEtuning-primer.sh: line 1164: bc: command not foundtuning-primer.sh: line 1165: bc: command not foundtuning-primer.sh: line 1189: bc: command not foundtuning-primer.sh: line 1192: bc: command not foundtuning-primer.sh: line 1193: bc: command not foundtuning-primer.sh: line 1195: bc: command not foundtuning-primer.sh: line 1197: [: -gt: unary operator expectedtuning-primer.sh: line 350: [: max_memoryHR: integer expression expectedtuning-primer.sh: line 356: [: max_memoryHR: integer expression expectedtuning-primer.sh: line 362: [: max_memoryHR: integer expression expectedtuning-primer.sh: line 369: export: `0=max_memoryHR': not a valid identifierMax Memory Ever Allocated :  bytestuning-primer.sh: line 350: [: per_thread_buffersHR: integer expression expectedtuning-primer.sh: line 356: [: per_thread_buffersHR: integer expression expectedtuning-primer.sh: line 362: [: per_thread_buffersHR: integer expression expectedtuning-primer.sh: line 369: export: `0=per_thread_buffersHR': not a valid identi                                              fierConfigured Max Per-thread Buffers :  bytestuning-primer.sh: line 350: [: global_buffersHR: integer expression expectedtuning-primer.sh: line 356: [: global_buffersHR: integer expression expectedtuning-primer.sh: line 362: [: global_buffersHR: integer expression expectedtuning-primer.sh: line 369: export: `0=global_buffersHR': not a valid identifierConfigured Max Global Buffers :  bytestuning-primer.sh: line 350: [: total_memoryHR: integer expression expectedtuning-primer.sh: line 356: [: total_memoryHR: integer expression expectedtuning-primer.sh: line 362: [: total_memoryHR: integer expression expectedtuning-primer.sh: line 369: export: `0=total_memoryHR': not a valid identifierConfigured Max Memory Limit :  bytestuning-primer.sh: line 331: bc: command not foundPhysical Memory :  GMax memory limit seem to be within acceptable normsKEY BUFFERtuning-primer.sh: line 331: bc: command not foundtuning-primer.sh: line 612: bc: command not foundtuning-primer.sh: line 613: bc: command not foundtuning-primer.sh: line 331: bc: command not foundCurrent MyISAM index space =  Mtuning-primer.sh: line 331: bc: command not foundCurrent key_buffer_size =  MKey cache miss rate is 1 : 81Key buffer fill ratio =  %tuning-primer.sh: line 646: [: -ge: unary operator expectedtuning-primer.sh: line 650: [: -ge: unary operator expectedtuning-primer.sh: line 654: [: -le: unary operator expectedYour key_buffer_size seems to be fineQUERY CACHEtuning-primer.sh: line 685: bc: command not foundtuning-primer.sh: line 686: bc: command not foundQuery cache is enabledtuning-primer.sh: line 331: bc: command not foundCurrent query_cache_size =  Mtuning-primer.sh: line 331: bc: command not foundCurrent query_cache_used =  Mtuning-primer.sh: line 331: bc: command not foundCurrent query_cache_limit =  MCurrent Query cache Memory fill ratio =  %tuning-primer.sh: line 331: bc: command not foundCurrent query_cache_min_res_unit =  Ktuning-primer.sh: line 699: bc: command not foundtuning-primer.sh: line 700: bc: command not foundtuning-primer.sh: line 701: [: -gt: unary operator expectedtuning-primer.sh: line 708: [: -le: unary operator expectedMySQL won't cache query results that are larger than query_cache_limit in sizeSORT OPERATIONStuning-primer.sh: line 331: bc: command not foundCurrent sort_buffer_size =  Mtuning-primer.sh: line 331: bc: command not foundCurrent record/read_rnd_buffer_size =  MSort buffer seems to be fineJOINStuning-primer.sh: line 331: bc: command not foundCurrent join_buffer_size =  MYou have had 0 queries where a join could not use an index properlyYour joins seem to be using indexes properlyjoin_buffer_size >= 4 MThis is not advisedOPEN FILES LIMITCurrent open_files_limit = 65535 filesThe open_files_limit should typically be set to at least 2x-3xthat of table_cache if you have heavy MyISAM usage.Your open_files_limit value seems to be fineTABLE CACHECurrent table_cache value = 2048 tablesYou have a total of 4893 tablesYou have 2048 open tables.Current table_cache hit rate is 19%, while 100% of your table cache is in useYou should probably increase your table_cacheTEMP TABLEStuning-primer.sh: line 331: bc: command not foundCurrent max_heap_table_size =  Mtuning-primer.sh: line 331: bc: command not foundCurrent tmp_table_size =  MOf 251 temp tables, 20% were created on diskEffective in-memory tmp_table_size is limited to max_heap_table_size.Created disk tmp tables ratio seems fineTABLE SCANStuning-primer.sh: line 331: bc: command not foundCurrent read_buffer_size =  MCurrent table scan ratio = 68 : 1read_buffer_size seems to be fineTABLE LOCKINGCurrent Lock Wait ratio = 0 : 97318Your table locking seems to be fine