MySQL Tuner

เก็บ MySQLTuner มาฝากครับเอาไว้จูน Mysql ว่าต้องปรับอะไรบ้างจริงๆมีตั้งนานแล้วล่ะครับแต่พี่ที่ทำงานพึ่งส่งให้ เริ่มกันเลยนะครับก็โหลดมาด้วยการใช้ wget 


root:#  /usr/bin/perl

หลังจากนั้นก็จะมีรายงานขึ้นมาเพียบเลยครับอ่านรายละเอียดแล้วแก้ไขตามที่ระบบแจ้งมาครับ หลังจากนั้นก็ปรับจูน my.cnf แล้วเช็คดูครับ
 >>  MySQLTuner 1.0.0 – Major Hayden <>
 >>  Bug reports, feature requests, and downloads at
 >>  Run with ‘–help’ for additional options and output filtering
Please enter your MySQL administrative login: fuckadmin
Please enter your MySQL administrative password:

——– General Statistics ————————————————–
[–] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.67-0ubuntu6-log
[!!] Switch to 64-bit OS – MySQL cannot currently use all of your RAM

——– Storage Engine Statistics ——————————————-
[–] Status: +Archive -BDB -Federated -InnoDB -ISAM -NDBCluster
[–] Data in MyISAM tables: 1G (Tables: 1121)
[–] Data in MEMORY tables: 0B (Tables: 2)
[!!] Total fragmented tables: 105

——– Performance Metrics ————————————————-
[–] Up for: 2h 12m 51s (1M q [155.646 qps], 34K conn, TX: 3B, RX: 131M)
[–] Reads / Writes: 79% / 21%
[–] Total buffers: 554.0M global + 13.1M per thread (1024 max threads)
[!!] Allocating > 2GB RAM on 32-bit systems can cause system instability
[!!] Maximum possible memory usage: 13.7G (345% of installed RAM)
[OK] Slow queries: 0% (39/1M)
[OK] Highest usage of available connections: 8% (90/1024)
[OK] Key buffer size / total MyISAM indexes: 256.0M/387.4M
[OK] Key buffer hit rate: 100.0% (111M cached / 52K reads)
[OK] Query cache efficiency: 72.0% (732K cached / 1M selects)
[!!] Query cache prunes per day: 884139
[OK] Sorts requiring temporary tables: 0% (19 temp sorts / 14K sorts)
[!!] Joins performed without indexes: 152
[!!] Temporary tables created on disk: 37% (4K on disk / 11K total)
[OK] Thread cache hit rate: 96% (1K created / 34K connections)
[!!] Table cache hit rate: 6% (1K open / 15K opened)
[OK] Open file limit used: 37% (1K/5K)
[OK] Table locks acquired immediately: 96% (430K immediate / 446K locks)

——– Recommendations —————————————————–
General recommendations:
    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
    Adjust your join queries to always utilize indexes
    Temporary table size is already large – reduce result set size
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
  *** MySQL’s maximum memory usage is dangerously high ***
  *** Add RAM before increasing MySQL buffer variables ***
    query_cache_size (> 32M)
    join_buffer_size (> 1.0M, or always use indexes with joins)
    table_cache (> 1024)

ส่วนผมเองก็ปรับมั่วๆไปเรื่อยเปลื่อยครับ Mysql รัน 100% ก็มีบางครั้งแก้ไม่หายซ่ะก่ะที

  • แต่ละเรื่องที่ตั้งมา ต้องเทพจริงๆ จะเข้า ส่วนผม งง มากๆครับ

  • bkklady

    ว้าว งงดีค่ะ

  • เอ่อ….


    เดยวจะลองเอาไป งม ดูงับ


  • I really like your wordpress template, where did you down load it through?

  • Coach bags organizations working Coach Bus Rental turn need to extra their own users

  • reported by the shape in Buy Louis Vuitton Louis Vuitton handbags have grown

  • The chanel handbag was one of the most revolutionary of its time due to the introduction of a chain strap, enabling women to carry their purse on their arm instead of in their hand.

  • nations seeking most of these CoCo Chanel Perfume the earrings which usually speedily

  • It’s good to swallow an tackle there this good topic. Gentlemanly article, dialect right caring