Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1595976
  • 博文数量: 117
  • 博客积分: 2559
  • 博客等级: 少校
  • 技术积分: 4385
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-13 20:08










分类: Mysql/postgreSQL

2011-06-02 10:27:48






# ./ --help


   MySQLTuner 1.2.0 - MySQL High Performance Tuning Script

   Bug reports, feature requests, and downloads at

   Maintained by Major Hayden ( - Licensed under GPL


   Important Usage Guidelines:

      To run the script with the default options, run the script without arguments

      Allow MySQL server to run for at least 24-48 hours before trusting suggestions


      Some routines may require root level privileges (script will provide warnings)


      You must provide the remote server's total memory when connecting to other servers



   Connection and Authentication#连接、认证

      --host     Connect to a remote host to perform tests (default: localhost)

      --socket     Use a different socket for a local connection#通常在本机测试时使用

      --port         Port to use for connection (default: 3306)

      --user     Username to use for authentication

      --pass     Password to use for authentication


   Performance and Reporting Options#性能报告选项

      --skipsize           Don't enumerate tables and their types/sizes (default: on)


                             (Recommended for servers with many tables)

-------- Storage Engine Statistics -------------------------------------------

[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster

[--] Data in MyISAM tables: 392K (Tables: 116)

[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)

[!!] InnoDB is enabled but isn't being used

[OK] Total fragmented tables: 0


      --checkversion       Check for updates to MySQLTuner (default: don't check)


#[OK] You have the latest version of MySQLTuner


#[--] Skipped version check for MySQLTuner script

      --forcemem     Amount of RAM installed in megabytes

      --forceswap    Amount of swap memory configured in megabytes


#[--] Assuming 512 MB of physical memory

#[--] Assuming 1024 MB of swap space


   Output Options:


      --nogood             Remove OK responses

      --nobad              Remove negative/suggestion responses

      --noinfo             Remove informational responses

      --nocolor            Don't print output in color


./ --socket /var/lib/mysql2/mysql2.sock


-------- Performance Metrics -------------------------------------------------

[--] Up for: 23h 37m 18s (542 q [0.006 qps], 176 conn, TX: 442K, RX: 33K)


-------- Recommendations -----------------------------------------------------

General recommendations:

    Add skip-innodb to MySQL configuration to disable InnoDB

    MySQL started within last 24 hours - recommendations may be inaccurate

    Reduce your overall MySQL memory footprint for system stability

    Enable the slow query log to troubleshoot bad queries

    Set thread_cache_size to 4 as a starting value

Variables to adjust:

  *** MySQL's maximum memory usage is dangerously high ***

  *** Add RAM before increasing MySQL buffer variables ***

    query_cache_size (>= 8M)

    thread_cache_size (start at 4)

阅读(4920) | 评论(0) | 转发(3) |