スポンサーリンク

mysqltunerは、MySQLの統計情報や改善可能なポイントを調べるツールです。

インストール
cd /usr/ports/databases/mysqltuner
sudo make install clean


使い方


   MySQLTuner 0.9.9 - MySQL High Performance Tuning Script
   Bug reports, feature requests, and downloads at http://mysqltuner.com/
   Maintained by Major Hayden (major@mhtx.net) - 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 <hostname>    Connect to a remote host to perform tests (default: localhost)
      --socket <socket>    Use a different socket for a local connection
      --port <port>        Port to use for connection (default: 3306)
      --user <username>    Username to use for authentication
      --pass <password>    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)
      --checkversion       Check for updates to MySQLTuner (default: don't check)
      --forcemem <size>    Amount of RAM installed in megabytes
      --forceswap <size>   Amount of swap memory configured in megabytes

   Output Options:
      --nogood             Remove OK responses
      --nobad              Remove negative/suggestion responses
      --noinfo             Remove informational responses
      --nocolor            Don't print output in color


実行例

% /usr/local/bin/mysqltuner.pl

 >>  MySQLTuner 0.9.9 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.51a-log
[OK] Operating on 32-bit architecture with less than 2GB RAM

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

-------- Performance Metrics -------------------------------------------------
[--] Up for: 14d 16h 5m 27s (25M q [20.162 qps], 533 conn, TX: 1B, RX: 2B)
[--] Reads / Writes: 53% / 47%
[--] Total buffers: 34.0M global + 2.7M per thread (100 max threads)
[OK] Maximum possible memory usage: 302.7M (29% of installed RAM)
[OK] Slow queries: 0% (78/25M)
[OK] Highest usage of available connections: 16% (16/100)
[OK] Key buffer size / total MyISAM indexes: 8.0M/4.0K
[OK] Key buffer hit rate: 99.9% (37K cached / 46 reads)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 8% (971 temp sorts / 12K sorts)
[OK] Temporary tables created on disk: 2% (7 on disk / 307 total)
[!!] Thread cache is disabled
[OK] Table cache hit rate: 89% (52 open / 58 opened)
[OK] Open file limit used: 0% (67/11K)
[OK] Table locks acquired immediately: 99% (15M immediate / 15M locks)

-------- Recommendations -----------------------------------------------------
General recommendations:
    Add skip-innodb to MySQL configuration to disable InnoDB
    Add skip-bdb to MySQL configuration to disable BDB
    Set thread_cache_size to 4 as a starting value
Variables to adjust:
    query_cache_size (>= 8M)
    thread_cache_size (start at 4)

スポンサーリンク
スポンサーリンク
 
いつもシェア、ありがとうございます!


もっと情報を探しませんか?

関連記事

最近の記事

人気のページ

スポンサーリンク
 

過去ログ

2020 : 01 02 03 04 05 06 07 08 09 10 11 12
2019 : 01 02 03 04 05 06 07 08 09 10 11 12
2018 : 01 02 03 04 05 06 07 08 09 10 11 12
2017 : 01 02 03 04 05 06 07 08 09 10 11 12
2016 : 01 02 03 04 05 06 07 08 09 10 11 12
2015 : 01 02 03 04 05 06 07 08 09 10 11 12
2014 : 01 02 03 04 05 06 07 08 09 10 11 12
2013 : 01 02 03 04 05 06 07 08 09 10 11 12
2012 : 01 02 03 04 05 06 07 08 09 10 11 12
2011 : 01 02 03 04 05 06 07 08 09 10 11 12
2010 : 01 02 03 04 05 06 07 08 09 10 11 12
2009 : 01 02 03 04 05 06 07 08 09 10 11 12
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
2004 : 01 02 03 04 05 06 07 08 09 10 11 12
2003 : 01 02 03 04 05 06 07 08 09 10 11 12

サイト

Vim入門

C言語入門

C++入門

JavaScript/Node.js入門

Python入門

FreeBSD入門

Ubuntu入門

セキュリティ入門

パソコン自作入門

ブログ

トップ


プライバシーポリシー