Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ./mysqltuner.pl
- >> MySQLTuner 1.7.20 - Major Hayden <[email protected]>
- >> Bug reports, feature requests, and downloads at http://mysqltuner.pl/
- >> Run with '--help' for additional options and output filtering
- [--] Skipped version check for MySQLTuner script
- [OK] Currently running supported MySQL version 5.7.33
- [OK] Operating on 64-bit architecture
- -------- Log file Recommendations ------------------------------------------------------------------
- [OK] Log file /var/log/mysqld.log exists
- [--] Log file: /var/log/mysqld.log(211K)
- [OK] Log file /var/log/mysqld.log is readable.
- [OK] Log file /var/log/mysqld.log is not empty
- [OK] Log file /var/log/mysqld.log is smaller than 32 Mb
- [!!] /var/log/mysqld.log contains 354 warning(s).
- [!!] /var/log/mysqld.log contains 46 error(s).
- [--] 24 start(s) detected in /var/log/mysqld.log
- [--] 1) 2021-01-18T07:52:15.495804Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 2) 2021-01-18T00:18:51.190631Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 3) 2021-01-18T00:18:34.063526Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 4) 2021-01-17T20:47:50.403309Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 5) 2021-01-17T16:36:54.163673Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 6) 2021-01-17T14:12:33.208790Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 7) 2021-01-15T10:25:09.524791Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 8) 2021-01-15T09:37:07.264257Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 9) 2021-01-14T11:30:59.930120Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 10) 2021-01-14T11:08:52.530228Z 0 [Note] /usr/sbin/mysqld: ready for connections.
- [--] 12 shutdown(s) detected in /var/log/mysqld.log
- [--] 1) 2021-01-18T07:50:30.130362Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 2) 2021-01-18T00:18:48.895307Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 3) 2021-01-18T00:18:29.135485Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 4) 2021-01-15T10:25:04.851885Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 5) 2021-01-15T09:37:02.771313Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 6) 2021-01-14T11:27:51.895559Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 7) 2021-01-14T11:08:49.145150Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 8) 2021-01-14T11:06:24.969477Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 9) 2021-01-14T10:58:53.419431Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- [--] 10) 2021-01-14T09:35:54.472640Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
- -------- Storage Engine Statistics -----------------------------------------------------------------
- [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA
- [--] Data in InnoDB tables: 535.2M (Tables: 445)
- [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
- [!!] There is no basic password file list!
- -------- CVE Security Recommendations --------------------------------------------------------------
- [--] Skipped due to --cvefile option undefined
- -------- Performance Metrics -----------------------------------------------------------------------
- [--] Up for: 2h 20m 20s (751K q [89.279 qps], 4K conn, TX: 5G, RX: 295M)
- [--] Reads / Writes: 89% / 11%
- [--] Binary logging is disabled
- [--] Physical Memory : 2.8G
- [--] Max MySQL memory : 38.1G
- [--] Other process memory: 0B
- [--] Total buffers: 169.0M global + 257.1M per thread (151 max threads)
- [--] P_S Max memory usage: 72B
- [--] Galera GCache Max memory usage: 0B
- [!!] Maximum reached memory usage: 3.7G (133.00% of installed RAM)
- [!!] Maximum possible memory usage: 38.1G (1376.09% of installed RAM)
- [!!] Overall possible memory usage with other process exceeded memory
- [OK] Slow queries: 0% (0/751K)
- [OK] Highest usage of available connections: 9% (14/151)
- [OK] Aborted connections: 0.04% (2/4681)
- [!!] Query cache may be disabled by default due to mutex contention.
- [!!] Query cache efficiency: 0.0% (0 cached / 646K selects)
- [OK] Query cache prunes per day: 0
- [OK] Sorts requiring temporary tables: 0% (32 temp sorts / 64K sorts)
- [OK] No joins without indexes
- [!!] Temporary tables created on disk: 74% (37K on disk / 49K total)
- [OK] Thread cache hit rate: 99% (33 created / 4K connections)
- [!!] Table cache hit rate: 8% (1K open / 21K opened)
- [OK] table_definition_cache(1400) is upper than number of tables(724)
- [OK] Open file limit used: 0% (32/40K)
- [OK] Table locks acquired immediately: 100% (462 immediate / 462 locks)
- -------- Performance schema ------------------------------------------------------------------------
- [--] Memory used by P_S: 72B
- [--] Sys schema is installed.
- -------- ThreadPool Metrics ------------------------------------------------------------------------
- [--] ThreadPool stat is disabled.
- -------- MyISAM Metrics ----------------------------------------------------------------------------
- [!!] Key buffer used: 18.3% (1M used / 8M cache)
- [OK] Key buffer size / total MyISAM indexes: 8.0M/43.0K
- [!!] Read Key buffer hit rate: 89.5% (656 cached / 69 reads)
- -------- InnoDB Metrics ----------------------------------------------------------------------------
- [--] InnoDB is enabled.
- [--] InnoDB Thread Concurrency: 0
- [OK] InnoDB File per table is activated
- [!!] InnoDB buffer pool / data size: 128.0M/535.2M
- [!!] 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.99% (76785770 hits/ 76790596 total)
- [!!] InnoDB Write Log efficiency: 47.76% (68173 hits/ 142749 total)
- [OK] InnoDB log waits: 0.00% (0 waits / 74576 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:
- Control warning line(s) into /var/log/mysqld.log file
- Control error line(s) into /var/log/mysqld.log file
- MySQL was started within the last 24 hours - recommendations may be inaccurate
- Reduce your overall MySQL memory footprint for system stability
- Dedicate this server to your database for highest performance.
- When making adjustments, make tmp_table_size/max_heap_table_size equal
- Reduce your SELECT DISTINCT queries which have no LIMIT clause
- Increase table_open_cache gradually to avoid file descriptor limits
- Read this before increasing table_open_cache over 64: https://bit.ly/2Fulv7r
- 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 (40000) 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:
- *** 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_limit (> 1M, or use smaller result sets)
- tmp_table_size (> 16M)
- max_heap_table_size (> 16M)
- table_open_cache (> 2000)
- innodb_buffer_pool_size (>= 535.2M) if possible.
- innodb_log_file_size should be (=16M) if possible, so InnoDB total log files size equals to 25% of buffer pool size.
- ulimit -a
- core file size (blocks, -c) 1000000
- data seg size (kbytes, -d) unlimited
- scheduling priority (-e) 0
- file size (blocks, -f) unlimited
- pending signals (-i) 11115
- max locked memory (kbytes, -l) 64
- max memory size (kbytes, -m) unlimited
- open files (-n) 4096
- pipe size (512 bytes, -p) 8
- POSIX message queues (bytes, -q) 819200
- real-time priority (-r) 0
- stack size (kbytes, -s) 8192
- cpu time (seconds, -t) unlimited
- max user processes (-u) 14335
- virtual memory (kbytes, -v) unlimited
- file locks (-x) unlimited
- iostat -xm 5 3
- Linux 3.10.0-1160.11.1.el7.x86_64 (31-22-2-109.cprapid.com) 01/18/2021 _x86_64_ (4 CPU)
- avg-cpu: %user %nice %system %iowait %steal %idle
- 15.59 0.22 6.61 1.18 0.16 76.24
- Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
- xvda 0.45 19.17 24.34 53.02 0.64 0.62 33.47 0.66 8.58 19.63 3.51 0.66 5.10
- avg-cpu: %user %nice %system %iowait %steal %idle
- 10.37 0.00 3.46 0.55 0.10 85.52
- Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
- xvda 0.00 7.20 0.20 59.60 0.00 1.61 55.04 0.41 6.86 1.00 6.88 0.48 2.88
- avg-cpu: %user %nice %system %iowait %steal %idle
- 5.21 0.00 1.95 0.10 0.05 92.69
- Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
- xvda 0.00 5.40 0.00 11.40 0.00 0.20 36.63 0.02 2.07 0.00 2.07 0.60 0.68
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement