MySQL Performance Tuning Primer Script

This script takes information from “SHOW STATUS LIKE…” and “SHOW VARIABLES LIKE…”
to produce sane recomendations for tuning server variables.
It is compatable with all versions of MySQL 3.23 and higher (including 5.1).

Currently it handles recomendations for the following:

  • Slow Query Log
  • Max Connections
  • Worker Threads
  • Key Buffer
  • Query Cache
  • Sort Buffer
  • Joins
  • Temp Tables
  • Table (Open & Definition) Cache
  • Table Locking
  • Table Scans (read_buffer)
  • Innodb Status

網址 http://www.day32.com/MySQL/
下載 http://www.day32.com/MySQL/tuning-primer.sh

這是一個用 Linux shell script 寫出來的調教分析工具,在命令列環境中下載後的使用方法:

1
2
# chmod +x tuning-primer.sh
# ./tuning-primer.sh

經過一段時間的分析就會得到各項資訊與建議,特別是紅色的部分就是需要調整的參數。