root@freebsd:~ # mysqltuner
>> MySQLTuner 1.9.9
* Jean-Marie Renouard <
jmrenouard@gmail.com>
* Major Hayden <
major@mhtx.net>
>> 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
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password: [OK] Currently running supported MySQL version 8.0.31
[OK] Operating on 64-bit architecture
-------- Log file Recommendations ------------------------------------------------------------------
[OK] Log file /var/db/mysql/error.log exists
[--] Log file: /var/db/mysql/error.log (6K)
[OK] Log file /var/db/mysql/error.log is not empty
[OK] Log file /var/db/mysql/error.log is smaller than 32 Mb
[OK] Log file /var/db/mysql/error.log is readable.
[!!] /var/db/mysql/error.log contains 12 warning(s).
[!!] /var/db/mysql/error.log contains 1 error(s).
[--] 3 start(s) detected in /var/db/mysql/error.log
[--] 1) 2023-08-03T10:06:06.903932Z 0 [System] [MY-010931] [Server] /usr/local/libexec/mysqld: ready for connections. Version: '8.0.31' socket: '/tmp/mysql.sock' port: 3306 Source distribution.
[--] 2) 2022-12-20T06:12:18.619402Z 0 [System] [MY-010931] [Server] /usr/local/libexec/mysqld: ready for connections. Version: '8.0.31' socket: '/tmp/mysql.sock' port: 3306 Source distribution.
[--] 3) 2022-12-20T05:51:11.923333Z 0 [System] [MY-010931] [Server] /usr/local/libexec/mysqld: ready for connections. Version: '8.0.31' socket: '/tmp/mysql.sock' port: 3306 Source distribution.
[--] 2 shutdown(s) detected in /var/db/mysql/error.log
[--] 1) 2023-08-03T09:58:57.815617Z 0 [System] [MY-010910] [Server] /usr/local/libexec/mysqld: Shutdown complete (mysqld 8.0.31) Source distribution.
[--] 2) 2022-12-20T06:10:54.046630Z 0 [System] [MY-010910] [Server] /usr/local/libexec/mysqld: Shutdown complete (mysqld 8.0.31) Source distribution.
-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA
[--] Data in InnoDB tables: 9.8G (Tables: 64)
[OK] Total fragmented tables: 0
-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.
-------- Views Metrics -----------------------------------------------------------------------------
-------- Triggers Metrics --------------------------------------------------------------------------
-------- Routines Metrics --------------------------------------------------------------------------
-------- Security Recommendations ------------------------------------------------------------------
[--] Skipped due to unsupported feature for MySQL 8
-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 1d 18h 11m 12s (61K q [0.402 qps], 18K conn, TX: 4G, RX: 706M)
[--] Reads / Writes: 0% / 100%
[--] Binary logging is enabled (GTID MODE: ON)
[--] Physical Memory : 16.0G
[--] Max MySQL memory : 767.5G
[--] Other process memory: 0B
[--] Total buffers: 12.0G global + 257.9M per thread (3000 max threads)
[--] P_S Max memory usage: 72B
[--] Galera GCache Max memory usage: 0B
[!!] Maximum reached memory usage: 14.1G (88.02% of installed RAM)
[!!] Maximum possible memory usage: 767.5G (4806.93% of installed RAM)
[!!] Overall possible memory usage with other process exceeded memory
[OK] Slow queries: 0% (12/61K)
[OK] Highest usage of available connections: 0% (8/3000)
[OK] Aborted connections: 0.04% (8/18893)
[--] Query cache have been removed in MySQL 8
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 293 sorts)
[OK] No joins without indexes
[OK] Temporary tables created on disk: 0% (0 on disk / 204 total)
[OK] Thread cache hit rate: 99% (8 created / 18K connections)
[OK] Table cache hit rate: 99% (1M hits / 1M requests)
[OK] table_definition_cache (2000) is greater than number of tables (391)
[OK] Open file limit used: 0% (6/470K)
[OK] Table locks acquired immediately: 100% (9 immediate / 9 locks)
[OK] Binlog cache memory access: 100.00% (643076 Memory / 643076 Total)
-------- Performance schema ------------------------------------------------------------------------
[--] Performance_schema is activated.
[--] Memory used by P_S: 72B
[--] Sys schema is installed.
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.
-------- MyISAM Metrics ----------------------------------------------------------------------------
[--] MyISAM Metrics are disabled on last MySQL versions.
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 12.0G/9.8G
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (0.78125%): 48.0M * 2/12.0G should be equal to 25%
[!!] InnoDB buffer pool instances: 8
[--] Number of InnoDB Buffer Pool Chunk: 96 for 8 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.64% (64634321 hits/ 64866515 total)
[!!] InnoDB Write Log efficiency: 74.74% (7700343 hits/ 10303358 total)
[OK] InnoDB log waits: 0.00% (0 waits / 2603015 writes)
-------- Aria Metrics ------------------------------------------------------------------------------
[--] Aria Storage Engine not available.
-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.
-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.
-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.
-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] This server is acting as master for 1 server(s).
[--] Binlog format: ROW
[--] XA support enabled: ON
[--] Semi synchronous replication Master: Not Activated
[--] Semi synchronous replication Slave: Not Activated
[OK] This replication slave is running with the read_only option enabled.
[!!] This replication slave is lagging and slave has 1 second(s) behind master host.
-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
Check warning line(s) in /var/db/mysql/error.log file
Check error line(s) in /var/db/mysql/error.log file
Reduce your overall MySQL memory footprint for system stability
Dedicate this server to your database for highest performance.
Buffer Key MyISAM set to 0, no MyISAM table detected
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 ***
key_buffer_size=0
innodb_log_file_size should be (=1G) if possible, so InnoDB total log files size equals 25% of buffer pool size.
innodb_buffer_pool_instances(=12)