Skip to content

Instantly share code, notes, and snippets.

@malwador
Last active July 5, 2018 16:32
Show Gist options
  • Save malwador/2185c298b1ab4d61b2f9d78ea9c9052e to your computer and use it in GitHub Desktop.
Save malwador/2185c298b1ab4d61b2f9d78ea9c9052e to your computer and use it in GitHub Desktop.
root@KpF-honestbrew:~# curl -s https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl | perl
>> MySQLTuner 1.7.9 - Major Hayden <[email protected]>
>> 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] Logged in using credentials from debian maintenance account.
[OK] Currently running supported MySQL version 10.1.32-MariaDB-1~xenial
[OK] Operating on 64-bit architecture
-------- Log file Recommendations ------------------------------------------------------------------
[--] Log file: /var/lib/mysql/KpF-honestbrew.err(0B)
[!!] Log file /var/lib/mysql/KpF-honestbrew.err doesn't exist
[!!] Log file /var/lib/mysql/KpF-honestbrew.err isn't readable.
-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE
[--] Data in InnoDB tables: 5G (Tables: 130)
[OK] Total fragmented tables: 0
-------- Security Recommendations ------------------------------------------------------------------
[OK] There are no anonymous accounts for any database users
[OK] All database users have passwords assigned
[!!] User 'db_dom15338@%' does not specify hostname restrictions.
[!!] There is no basic password file list!
-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 59m 49s (805K q [224.366 qps], 3K conn, TX: 14G, RX: 148M)
[--] Reads / Writes: 96% / 4%
[--] Binary logging is disabled
[--] Physical Memory : 16.0G
[--] Max MySQL memory : 9.9G
[--] Other process memory: 2.7G
[--] Total buffers: 7.4G global + 51.3M per thread (50 max threads)
[--] P_S Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 7.9G (49.64% of installed RAM)
[OK] Maximum possible memory usage: 9.9G (61.84% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/805K)
[OK] Highest usage of available connections: 22% (11/50)
[OK] Aborted connections: 0.00% (0/3568)
[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
[!!] Query cache may be disabled by default due to mutex contention.
[OK] Query cache efficiency: 38.6% (465K cached / 1M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 46K sorts)
[!!] Joins performed without indexes: 57
[!!] Temporary tables created on disk: 68% (39K on disk / 57K total)
[OK] Thread cache hit rate: 99% (11 created / 3K connections)
[OK] Table cache hit rate: 96% (153 open / 159 opened)
[OK] Open file limit used: 0% (25/16K)
[OK] Table locks acquired immediately: 100% (398K immediate / 398K locks)
-------- Performance schema ------------------------------------------------------------------------
[--] Performance schema is disabled.
[--] Memory used by P_S: 0B
[--] Sys schema isn't installed.
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is enabled.
[--] Thread Pool Size: 16 thread(s).
[--] Using default value is good enough for your version (10.1.32-MariaDB-1~xenial)
-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 24.2% (31K used / 131K cache)
[OK] Key buffer size / total MyISAM indexes: 128.0K/121.0K
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 6.0G/5.7G
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (1.5625 %): 48.0M * 2/6.0G should be equal 25%
[OK] InnoDB buffer pool instances: 6
[--] InnoDB Buffer Pool Chunk Size not used or defined in your version
[OK] InnoDB Read buffer efficiency: 99.99% (1355809427 hits/ 1355918985 total)
[OK] InnoDB Write log efficiency: 97.50% (85989 hits/ 88191 total)
[OK] InnoDB log waits: 0.00% (0 waits / 2202 writes)
-------- AriaDB Metrics ----------------------------------------------------------------------------
[--] AriaDB is enabled.
[OK] Aria pagecache size / total Aria indexes: 128.0M/1B
[!!] Aria pagecache hit rate: 93.6% (284K cached / 18K reads)
-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.
-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.
-------- RocksDB Metrics ---------------------------------------------------------------------------
[--] RocksDB is disabled.
-------- Spider Metrics ----------------------------------------------------------------------------
[--] Spider is disabled.
-------- Connect Metrics ---------------------------------------------------------------------------
[--] Connect is disabled.
-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.
-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: STATEMENT
[--] ON
[--] Semi synchronous replication Master: Not Activated
[--] Semi synchronous replication Slave: Not Activated
[--] This is a standalone server
-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
Restrict Host for user@% to user@SpecificDNSorIp
MySQL was started within the last 24 hours - recommendations may be inaccurate
Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1
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
Performance schema should be activated for better diagnostics
Consider installing Sys schema from https://github.com/mysql/mysql-sys
Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: http://bit.ly/2wgkDvS
Variables to adjust:
query_cache_size (=0)
query_cache_type (=0)
join_buffer_size (> 32.0M, or always use indexes with JOINs)
performance_schema = ON enable PFS
innodb_log_file_size should be (=768M) if possible, so InnoDB total log files size equals to 25% of buffer pool size.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment