shlomi-noach / awesome-mysql

A curated list of awesome MySQL software, libraries, tools and resources
Other
2.36k stars 375 forks source link

Adding MySQLTuner #19

Closed mbenardis closed 9 years ago

mbenardis commented 9 years ago

Adding MySQLTuner (http://mysqltuner.com) in performance tools.

morgo commented 9 years ago

MySQL Tuner does not support any currently supported MySQL releases (which are 5.5 and 5.6). I'm not sure it's a good idea to add it.

samlambert commented 9 years ago

MySQL Tuner does not support any currently supported MySQL releases (which are 5.5 and 5.6). I'm not sure it's a good idea to add it.

I agree here.

shlomi-noach commented 9 years ago

See also https://github.com/shlomi-noach/awesome-mysql/pull/20 This version of mysqltuner is not the same as in https://launchpad.net/mysqltuner

morgo commented 9 years ago

I actually have an example of why current version support is required. See this reddit post:

 >>  MySQLTuner 1.4.0 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.6.22-72.0
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in InnoDB tables: 29M (Tables: 45)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 52)
[OK] Total fragmented tables: 0

-------- Security Recommendations  -------------------------------------------
[!!] User '@localhost' has no password set.
[!!] User '@vultr.guest' has no password set.

-------- Performance Metrics -------------------------------------------------
[--] Up for: 1m 17s (324 q [4.208 qps], 52 conn, TX: 2M, RX: 35K)
[--] Reads / Writes: 100% / 0%
[--] Total buffers: 192.0M global + 1.1M per thread (151 max threads)
[OK] Maximum possible memory usage: 352.4M (47% of installed RAM)
[OK] Slow queries: 0% (0/324)
[OK] Highest usage of available connections: 0% (1/151)
[OK] Key buffer size / total MyISAM indexes: 16.0M/98.0K
[!!] Query cache efficiency: 0.0% (0 cached / 237 selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 5% (2 temp sorts / 38 sorts)
[OK] Temporary tables created on disk: 17% (82 on disk / 472 total)
[OK] Thread cache hit rate: 98% (1 created / 52 connections)
[OK] Table cache hit rate: 24% (125 open / 507 opened)
[OK] Open file limit used: 0% (46/5K)
[OK] Table locks acquired immediately: 100% (288 immediate / 288 locks)
[OK] InnoDB data size / buffer pool: 29.3M/128.0M

-------- Recommendations -----------------------------------------------------
General recommendations:
    MySQL started within last 24 hours - recommendations may be inaccurate
Variables to adjust:
    query_cache_limit (> 1M, or use smaller result sets)

It says that a maximum of 352.4M (47% of installed RAM) will be used, but it's not including p_s memory. The server is actually being killed by oomkiller, and the tool is not picking it up. Also, query cache is disabled in 5.6+ by default due to mutex contention.

gilliangunson-okta commented 9 years ago

Either version of mysqltuner is too old to be included on this list (the perl one only supports up to 5.1, Sheeri's was last updated 5 years ago). I'm with @morgo at wanting this off the list given the risk of dangerous recommendations.

jmrenouard commented 8 years ago

MySQLTuner have been updated and support MySQL, MariaDB and Galera in 16.3 version.

jmrenouard commented 8 years ago

I just fix query cache recommendations on mysqltuner.pl https://github.com/major/MySQLTuner-perl/

I'm agree with @morgo about query cache.

Last time we meet with @morgo, I ask how to calculate P_S memory usage and max ram usage. There is also a ticket opened for this issue https://github.com/major/MySQLTuner-perl/issues/40

Is there any other point on mysqltuner that made him incompatible as element of mysql awesome ?

morgo commented 8 years ago

Hi @jmrenouard, I've commented on major/MySQLTuner-perl#40. Thanks for the ping!

(Off topic: If you have default configuration recommendations for 5.8, please see my blog post here.)

shlomi-noach commented 8 years ago

@jmrenouard I'm good to include it again in the list. Will you kindly open a new PR and please reference this one?