>> MySQLTuner 1.7.19 - 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.7.29-32
[OK] Operating on 64-bit architecture
-------- Log file Recommendations ------------------------------------------------------------------
[OK] Log file /var/log/mysqld.log exists
[--] Log file: /var/log/mysqld.log(878M)
[OK] Log file /var/log/mysqld.log is readable.
[OK] Log file /var/log/mysqld.log is not empty
[!!] Log file /var/log/mysqld.log is bigger than 32 Mb
[!!] /var/log/mysqld.log contains 31338 warning(s).
[!!] /var/log/mysqld.log contains 119732 error(s).
[--] 12 start(s) detected in /var/log/mysqld.log
[--] 1) 2020-03-20T01:54:04.481797Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 2) 2020-03-20T01:14:33.245007Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 3) 2020-03-20T01:00:59.489279Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 4) 2020-03-20T00:36:58.798962Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 5) 2020-03-20T00:30:42.679584Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 6) 2020-03-14T09:42:09.135228Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 7) 2020-03-14T09:37:52.537650Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 8) 2020-03-14T09:34:18.079197Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 9) 2020-03-14T09:30:00.543633Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 10) 2020-03-11T20:17:53.417479Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 11 shutdown(s) detected in /var/log/mysqld.log
[--] 1) 2020-03-20T01:54:03.284071Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 2) 2020-03-20T01:14:30.363308Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 3) 2020-03-20T01:00:55.892018Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 4) 2020-03-20T00:32:44.060354Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 5) 2020-03-20T00:26:01.048946Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 6) 2020-03-14T09:42:04.378252Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 7) 2020-03-14T09:37:48.160684Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 8) 2020-03-14T09:34:07.803387Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 9) 2020-03-14T09:27:40.345485Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 10) 2020-03-11T20:17:52.037663Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA
[--] Data in MyISAM tables: 581.5M (Tables: 17)
[--] Data in InnoDB tables: 12.2G (Tables: 2370)
[--] Data in MEMORY tables: 0B (Tables: 17)
[OK] Total fragmented tables: 0
-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.
-------- Security Recommendations ------------------------------------------------------------------
[OK] There are no anonymous accounts for any database users
[OK] All database users have passwords assigned
[--] Bug #80860 MySQL 5.7: Avoid testing password when validate_password is activated
-------- CVE Security Recommendations --------------------------------------------------------------
[OK] NO SECURITY CVE FOUND FOR YOUR VERSION
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 6d 8h 23m 49s (403M q [736.042 qps], 704K conn, TX: 706G, RX: 112G)
[--] Reads / Writes: 86% / 14%
[--] Binary logging is disabled
[--] Physical Memory : 31.2G
[--] Max MySQL memory : 338.9M
[--] Other process memory: 0B
[--] Total buffers: 169.0M global + 1.1M per thread (151 max threads)
[--] P_S Max memory usage: 72B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 340.0M (1.06% of installed RAM)
[OK] Maximum possible memory usage: 338.9M (1.06% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/403M)
[!!] Highest connection usage: 100% (152/151)
[OK] Aborted connections: 0.07% (498/704714)
[!!] 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.
[!!] Query cache efficiency: 0.0% (0 cached / 249M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (34K temp sorts / 60M sorts)
[!!] Joins performed without indexes: 895579
[OK] Temporary tables created on disk: 24% (18M on disk / 76M total)
[OK] Thread cache hit rate: 90% (69K created / 704K connections)
[!!] Table cache hit rate: 0% (2K open / 1M opened)
[!!] table_definition_cache(1400) is lower than number of tables(2700)
[OK] Open file limit used: 0% (0/5K)
[OK] Table locks acquired immediately: 100% (826 immediate / 826 locks)
-------- Performance schema ------------------------------------------------------------------------
[--] Memory used by P_S: 72B
[--] Sys schema is installed.
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is enabled.
[--] Thread Pool Size: 24 thread(s).
[OK] thread_pool_size between 16 and 36 when using InnoDB storage engine.
-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 18.2% (1M used / 8M cache)
[!!] Key buffer size / total MyISAM indexes: 8.0M/274.9M
[!!] Read Key buffer hit rate: 94.3% (2K cached / 159 reads)
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[!!] InnoDB buffer pool / data size: 128.0M/12.2G
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (75 %): 48.0M * 2/128.0M should be equal to 25%
[OK] InnoDB buffer pool instances: 1
[--] Number of InnoDB Buffer Pool Chunk : 1 for 1 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 99.78% (87974748947 hits/ 88167330550 total)
[!!] InnoDB Write Log efficiency: 18.8% (5912643 hits/ 31446695 total)
[OK] InnoDB log waits: 0.00% (0 waits / 37359338 writes)
-------- AriaDB Metrics ----------------------------------------------------------------------------
[--] AriaDB is disabled.
-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.
-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.
-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.
-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: ROW
[--] XA support enabled: ON
[--] Semi synchronous replication Master: Not Activated
[--] Semi synchronous replication Slave: Not Activated
[--] This is a standalone server
-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
/var/log/mysqld.log is > 32Mb, you should analyze why or implement a rotation log strategy such as logrotate!
Control warning line(s) into /var/log/mysqld.log file
Control error line(s) into /var/log/mysqld.log file
Reduce or eliminate persistent connections to reduce connection usage
Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1
We will suggest raising the 'join_buffer_size' until JOINs not using indexes are found.
See https://dev.mysql.com/doc/internals/en/join-buffer-size.html
(specially the conclusions at the bottom of the page).
Increase table_open_cache gradually to avoid file descriptor limits
Read this before increasing table_open_cache over 64: https://bit.ly/1mi7c4C
Read this before increasing for MariaDB https://mariadb.com/kb/en/library/optimizing-table_open_cache/
This is MyISAM only table_cache scalability problem, InnoDB not affected.
See more details here: https://bugs.mysql.com/bug.php?id=49177
This bug already fixed in MySQL 5.7.9 and newer MySQL versions.
Beware that open_files_limit (5000) variable
should be greater than table_open_cache (2000)
Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: https://bit.ly/2TcGgtU
Variables to adjust:
max_connections (> 151)
wait_timeout (< 28800)
interactive_timeout (< 28800)
query_cache_size (=0)
query_cache_type (=0)
query_cache_limit (> 1M, or use smaller result sets)
join_buffer_size (> 256.0K, or always use indexes with JOINs)
table_open_cache (> 2000)
table_definition_cache(1400) > 2700 or -1 (autosizing if supported)
key_buffer_size (> 274.9M)
innodb_buffer_pool_size (>= 12.2G) if possible.
innodb_log_file_size should be (=16M) if possible, so InnoDB total log files size equals to 25% of buffer pool size.