Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> 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
- [--] Performing tests on 127.0.0.1:3306
- Please enter your MySQL administrative login: root
- Please enter your MySQL administrative password: [OK] Currently running supported MySQL version 10.3.15-MariaDB
- [OK] Operating on 64-bit architecture
- -------- Log file Recommendations ------------------------------------------------------------------
- [OK] Log file /var/log/mysql/error.log exists
- [--] Log file: /var/log/mysql/error.log(350M)
- [OK] Log file /var/log/mysql/error.log is readable.
- [OK] Log file /var/log/mysql/error.log is not empty
- [!!] Log file /var/log/mysql/error.log is bigger than 32 Mb
- [!!] /var/log/mysql/error.log contains 3105917 warning(s).
- [!!] /var/log/mysql/error.log contains 401272 error(s).
- [--] 21 start(s) detected in /var/log/mysql/error.log
- [--] 1) 2019-11-20 0:08:52 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 2) 2019-10-05 10:15:23 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 3) 2019-09-11 15:55:03 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 4) 2019-09-11 13:44:01 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 5) 2019-07-31 19:15:35 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 6) 2019-06-18 21:44:33 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 7) 2019-06-17 23:23:59 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 8) 2019-06-15 12:01:51 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 9) 2019-06-14 12:03:45 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 10) 2019-06-13 23:25:46 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 19 shutdown(s) detected in /var/log/mysql/error.log
- [--] 1) 2019-11-20 0:08:47 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 2) 2019-10-05 10:14:30 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 3) 2019-09-11 15:54:58 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 4) 2019-09-11 13:41:26 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 5) 2019-07-31 18:58:49 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 6) 2019-06-18 21:41:49 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 7) 2019-06-17 23:22:44 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 8) 2019-06-15 12:01:47 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 9) 2019-06-14 12:03:42 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 10) 2019-06-13 23:22:54 0 [Note] /usr/sbin/mysqld: Shutdown complete
- -------- Storage Engine Statistics -----------------------------------------------------------------
- [--] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE
- [--] Data in MyISAM tables: 6.2M (Tables: 117)
- [--] Data in InnoDB tables: 38.8G (Tables: 316)
- [!!] Total fragmented tables: 1
- -------- 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
- [!!] User 'xxxxxxxx@%' does not specify hostname restrictions.
- [!!] User 'xxxxxxxx@%' does not specify hostname restrictions.
- [!!] User 'root@%' does not specify hostname restrictions.
- [!!] User 'xxxxxxxx@%' does not specify hostname restrictions.
- [!!] User 'xxxxxxxx@%' does not specify hostname restrictions.
- [--] There are 620 basic passwords in the list.
- -------- CVE Security Recommendations --------------------------------------------------------------
- [OK] NO SECURITY CVE FOUND FOR YOUR VERSION
- -------- Performance Metrics -----------------------------------------------------------------------
- [--] Up for: 65d 23h 26m 6s (4B q [782.794 qps], 212M conn, TX: 40826G, RX: 572G)
- [--] Reads / Writes: 96% / 4%
- [--] Binary logging is disabled
- [--] Physical Memory : 15.5G
- [--] Max MySQL memory : 23.5G
- [--] Other process memory: 0B
- [--] Total buffers: 8.5G global + 30.6M per thread (500 max threads)
- [--] P_S Max memory usage: 0B
- [--] Galera GCache Max memory usage: 0B
- [!!] Maximum reached memory usage: 17.5G (113.01% of installed RAM)
- [!!] Maximum possible memory usage: 23.5G (151.30% of installed RAM)
- [!!] Overall possible memory usage with other process exceeded memory
- [OK] Slow queries: 0% (3K/4B)
- [OK] Highest usage of available connections: 60% (301/500)
- [OK] Aborted connections: 0.04% (93147/212540381)
- [!!] Query cache may be disabled by default due to mutex contention.
- [OK] Query cache efficiency: 24.0% (1B cached / 5B selects)
- [!!] Query cache prunes per day: 183329
- [OK] Sorts requiring temporary tables: 0% (53 temp sorts / 292M sorts)
- [!!] Joins performed without indexes: 52622
- [OK] Temporary tables created on disk: 0% (322K on disk / 34M total)
- [OK] Thread cache hit rate: 96% (7M created / 212M connections)
- [OK] Table cache hit rate: 70% (4K open / 5K opened)
- [!!] table_definition_cache(400) is lower than number of tables(598)
- [OK] Open file limit used: 1% (269/16K)
- [OK] Table locks acquired immediately: 100% (8M immediate / 8M 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: 8 thread(s).
- [--] Using default value is good enough for your version (10.3.15-MariaDB)
- -------- MyISAM Metrics ----------------------------------------------------------------------------
- [!!] Key buffer used: 18.6% (3M used / 16M cache)
- [OK] Key buffer size / total MyISAM indexes: 16.0M/2.8M
- [OK] Read Key buffer hit rate: 100.0% (16M cached / 49 reads)
- [!!] Write Key buffer hit rate: 75.5% (155 cached / 117 writes)
- -------- InnoDB Metrics ----------------------------------------------------------------------------
- [--] InnoDB is enabled.
- [--] InnoDB Thread Concurrency: 0
- [OK] InnoDB File per table is activated
- [!!] InnoDB buffer pool / data size: 8.2G/38.8G
- [!!] Ratio InnoDB log file size / InnoDB Buffer pool size (48.4848484848485 %): 2.0G * 2/8.2G should be equal to 25%
- [!!] InnoDB buffer pool instances: 6
- [--] Number of InnoDB Buffer Pool Chunk : 66 for 6 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: 100.00% (1142523932247 hits/ 1142567012459 total)
- [OK] InnoDB Write log efficiency: 98.05% (334204576 hits/ 340844667 total)
- [OK] InnoDB log waits: 0.00% (0 waits / 6640091 writes)
- -------- AriaDB Metrics ----------------------------------------------------------------------------
- [--] AriaDB is enabled.
- [OK] Aria pagecache size / total Aria indexes: 128.0M/1B
- [OK] Aria pagecache hit rate: 100.0% (459M cached / 83K reads)
- -------- 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: MIXED
- [--] XA support enabled: ON
- [--] Semi synchronous replication Master: OFF
- [--] Semi synchronous replication Slave: OFF
- [--] This is a standalone server
- -------- Recommendations ---------------------------------------------------------------------------
- General recommendations:
- /var/log/mysql/error.log is > 32Mb, you should analyze why or implement a rotation log strategy such as logrotate!
- Control warning line(s) into /var/log/mysql/error.log file
- Control error line(s) into /var/log/mysql/error.log file
- Run OPTIMIZE TABLE to defragment tables for better performance
- OPTIMIZE TABLE `xxxxxxxx`.`xxxxxxxx`; -- can free 1902 MB
- Total freed space after theses OPTIMIZE TABLE : 1902 Mb
- Restrict Host for 'xxxxxxxx'@% to xxxxxxxx@SpecificDNSorIp
- UPDATE mysql.user SET host ='SpecificDNSorIp' WHERE user='xxxxxxxx' AND host ='%'; FLUSH PRIVILEGES;
- Restrict Host for 'xxxxxxxx'@% to xxxxxxxx@SpecificDNSorIp
- UPDATE mysql.user SET host ='SpecificDNSorIp' WHERE user='xxxxxxxx' AND host ='%'; FLUSH PRIVILEGES;
- Restrict Host for 'root'@% to root@SpecificDNSorIp
- UPDATE mysql.user SET host ='SpecificDNSorIp' WHERE user='root' AND host ='%'; FLUSH PRIVILEGES;
- Restrict Host for 'xxxxxxxx'@% to xxxxxxxx@SpecificDNSorIp
- UPDATE mysql.user SET host ='SpecificDNSorIp' WHERE user='xxxxxxxx' AND host ='%'; FLUSH PRIVILEGES;
- Restrict Host for 'xxxxxxxx'@% to xxxxxxxx@SpecificDNSorIp
- UPDATE mysql.user SET host ='SpecificDNSorIp' WHERE user='xxxxxxxx' AND host ='%'; FLUSH PRIVILEGES;
- Reduce your overall MySQL memory footprint for system stability
- Dedicate this server to your database for highest performance.
- Increasing the query_cache size over 128M may reduce performance
- 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).
- Performance schema should be activated for better diagnostics
- Consider installing Sys schema from https://github.com/mysql/mysql-sys for MySQL
- Consider installing Sys schema from https://github.com/FromDual/mariadb-sys for MariaDB
- Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: https://bit.ly/2TcGgtU
- Variables to adjust:
- *** MySQL's maximum memory usage is dangerously high ***
- *** Add RAM before increasing MySQL buffer variables ***
- query_cache_size (=0)
- query_cache_type (=0)
- query_cache_size (> 128M) [see warning above]
- join_buffer_size (> 4.0M, or always use indexes with JOINs)
- table_definition_cache(400) > 598 or -1 (autosizing if supported)
- performance_schema = ON enable PFS
- innodb_buffer_pool_size (>= 38.8G) if possible.
- innodb_log_file_size should be (=1G) if possible, so InnoDB total log files size equals to 25% of buffer pool size.
- innodb_buffer_pool_instances(=8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement