ผู้เขียน หัวข้อ: MySQLTuner  (อ่าน 5381 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ sothorn

  • Jr. Member
  • **
  • กระทู้: 66
  • Respect: 0
    • ดูรายละเอียด
MySQLTuner
« เมื่อ: กันยายน 04, 2008, 09:04:28 AM »
0
พอดีไปเจอลิงค์จาก howtoforge นำมาฝากกันนะครับ

http://www.howtoforge.com/tuning-mysql-performance-with-mysqltuner

ผมลองเล่นดูเล็กน้อย บนเครื่องทำงานของผมเองก็ได้ผลตามด้านล่าง

root@sothorn:~# wget http://mysqltuner.com/mysqltuner.pl
--09:07:39--  http://mysqltuner.com/mysqltuner.pl
           => `mysqltuner.pl'
Connecting to 192.168.2.254:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 36,740 (36K) [text/plain]

100%[====================================>] 36,740        --.--K/s             

09:07:42 (2.98 MB/s) - `mysqltuner.pl' saved [36740/36740]

root@sothorn:~# chmod +x mysqltuner.pl
root@sothorn:~# ./mysqltuner.pl

 >>  MySQLTuner 0.9.8 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password:

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.51a-3ubuntu5.1
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 84K (Tables: 44)
[!!] InnoDB is enabled but isn't being used
[!!] Total fragmented tables: 2

-------- Performance Metrics -------------------------------------------------
[--] Up for: 2h 1m 30s (90 q [0.012 qps], 12 conn, TX: 30K, RX: 3K)
[--] Reads / Writes: 100% / 0%
[--] Total buffers: 2.6M per thread and 58.0M global
[OK] Maximum possible memory usage: 320.5M (15% of installed RAM)
[OK] Slow queries: 0% (0/90)
[OK] Highest usage of available connections: 1% (1/100)
[OK] Key buffer size / total MyISAM indexes: 16.0M/183.0K
[!!] Query cache efficiency: 0.0%
[OK] Query cache prunes per day: 0
[OK] Temporary tables created on disk: 0%
[OK] Thread cache hit rate: 91%
[OK] Table cache hit rate: 91%
[OK] Open file limit used: 11%
[OK] Table locks acquired immediately: 100%
[!!] Connections aborted: 8%

อันนี้เป็นคำแนะนำ ไม่รู้ว่าเชื่อได้ทั้งหมดหรือเปล่า

-------- Recommendations -----------------------------------------------------
General recommendations:
    Add skip-innodb to MySQL configuration to disable InnoDB
    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
    Your applications are not closing MySQL connections properly
Variables to adjust:
    query_cache_limit (> 1M, or use smaller result sets)

root@sothorn:~#

doramon

  • บุคคลทั่วไป
Re: MySQLTuner
« ตอบกลับ #1 เมื่อ: กันยายน 04, 2008, 10:06:07 AM »
0
ขอบคุณครับ