|
49 | 49 | - Validate MySQL and MariaDB versions (EOL check) |
50 | 50 | - Suggest 64-bit upgrade and architecture check |
51 | 51 | - Analyze mysqld error log file (Local, Docker, Podman, Kubectl, Systemd) |
| 52 | +- Detect Cloud Environment (AWS, GCP, Azure, DigitalOcean) |
| 53 | +- Detect Infrastructure (Storage type, Hardware architecture) |
52 | 54 | - Show parameters impacting performance during analysis |
53 | 55 | - Show information about databases (option: --dbstat) |
54 | 56 | - Show information about tables (option: --tbstat) |
|
65 | 67 | - Print AriaDB stats |
66 | 68 | - Print Galera cluster stats |
67 | 69 | - Print replication info |
| 70 | +- Query Anti-Pattern Detection (Performance Schema digests) |
68 | 71 | - Print Storage Engine specific stats (TokuDB, RocksDB, Spider, etc.) |
69 | 72 | - Print Performance Schema stats |
| 73 | +- Sysbench result analysis (if provided) |
| 74 | +- Historical Trend Analysis (if comparison file provided) |
70 | 75 | - Make recommendations based on stats |
71 | 76 | - Close reportfile if needed |
72 | 77 | - Dump result if debug is on |
|
94 | 99 |
|
95 | 100 | ## MySQLTuner system checks |
96 | 101 |
|
97 | | -* Check whether more than 2GB RAM present if on 32-bit OS |
| 102 | +- Check whether more than 2GB RAM present if on 32-bit OS |
| 103 | + |
98 | 104 | - Check number of opened ports (warn when more than 9 ports opened) |
99 | 105 | - Check 80, 8080, 443 and 8443 ports if warning is raised if they are opened |
100 | 106 | - Check if some banned ports are not opened (option --bannedports separated by comma) |
|
108 | 114 |
|
109 | 115 | ## MySQLTuner Server version checks |
110 | 116 |
|
111 | | -* EOL MySQL version check |
| 117 | +- EOL MySQL version check |
| 118 | + |
112 | 119 | - Currently MySQL < 5.1 are considered EOL |
113 | 120 | - Using 5.5+ version of MySQL for performance issue (asynchronous IO) |
114 | 121 |
|
115 | 122 | ## Mysql error log file analysis |
116 | 123 |
|
117 | | -* Look for potential current error log file name |
| 124 | +- Look for potential current error log file name |
| 125 | + |
118 | 126 | - Automatic detection for: |
119 | 127 | - Docker containers |
120 | 128 | - Podman containers |
|
150 | 158 |
|
151 | 159 | ## MySQLTuner database information |
152 | 160 |
|
153 | | -* Performance analysis parameter checks (metadata performance) |
| 161 | +- Performance analysis parameter checks (metadata performance) |
| 162 | + |
154 | 163 | - Per database information |
155 | 164 | * Tables number |
156 | | - - Rows number |
157 | | - - Total size |
158 | | - - Data size |
159 | | - - Percentage of data size |
160 | | - - Index size |
161 | | - - Percentage of index size |
162 | | - - Views number |
163 | | - - Triggers number |
164 | | - - Routines number |
165 | | - - Collation number |
166 | | - - Check that there is only one collation for all tables in database |
167 | | - - Check that there is only one collation for all table columns in database |
168 | | - - Check that there is only one storage engine per user database |
| 165 | + - Rows number |
| 166 | + - Total size |
| 167 | + - Data size |
| 168 | + - Percentage of data size |
| 169 | + - Index size |
| 170 | + - Percentage of index size |
| 171 | + - Views number |
| 172 | + - Triggers number |
| 173 | + - Routines number |
| 174 | + - Collation number |
| 175 | + - Check that there is only one collation for all tables in database |
| 176 | + - Check that there is only one collation for all table columns in database |
| 177 | + - Check that there is only one storage engine per user database |
169 | 178 |
|
170 | 179 | ## MySQLTuner index information |
171 | 180 |
|
172 | 181 | - Top 10 worth selectivity index |
173 | 182 | - Per index information |
174 | | - - Index Cardinality |
175 | | - - Index Selectivity |
176 | | - - Misc information about index definition |
177 | | - - Misc information about index size |
| 183 | + - Index Cardinality |
| 184 | + - Index Selectivity |
| 185 | + - Misc information about index definition |
| 186 | + - Misc information about index size |
178 | 187 |
|
179 | 188 | ## MySQLTuner Connections information |
180 | 189 |
|
|
212 | 221 | - Per Thread Buffer |
213 | 222 | - Read Buffer |
214 | 223 | - Read RND Buffer |
215 | | - - Sort Buffer |
216 | | - - Thread stack |
217 | | - - Join Buffer |
218 | | - - Binlog Cache Buffers size if activated |
| 224 | + - Sort Buffer |
| 225 | + - Thread stack |
| 226 | + - Join Buffer |
| 227 | + - Binlog Cache Buffers size if activated |
219 | 228 |
|
220 | 229 | ## MySQLTuner query cache checks |
221 | 230 |
|
|
295 | 304 | - wsrep_node_name is defined. |
296 | 305 | - Check thet notification script wsrep_notify_cmd is defined |
297 | 306 | - wsrep_cluster_status PRIMARY /NON PRIMARY. |
298 | | - - PRIMARY : Coherent cluster |
299 | | - - NO PRIMARY : cluster gets several states |
| 307 | + - PRIMARY : Coherent cluster |
| 308 | + - NO PRIMARY : cluster gets several states |
300 | 309 | - wsrep_local_state_comment: Node state |
301 | | - - SYNCED (uptodate), |
302 | | - - DONOR (sending information to another node) |
303 | | - - Joiner (try to reach cluster group) |
304 | | - - SYNCED state able to read/write |
| 310 | + - SYNCED (uptodate), |
| 311 | + - DONOR (sending information to another node) |
| 312 | + - Joiner (try to reach cluster group) |
| 313 | + - SYNCED state able to read/write |
305 | 314 | - wsrep_cluster_conf_id configuration level must be identical in all nodes |
306 | 315 | - wsrep_slave_thread is between 3 or 4 times number of CPU core. |
307 | 316 | - gcs.limit should be equal to wsrep_slave_threads * 5 |
|
469 | 478 | - **Kubectl**: Supports retrieving logs from Kubernetes pods. |
470 | 479 | - **Systemd**: Supports retrieving logs from the systemd journal using `journalctl`. |
471 | 480 | - **Explicit Container**: Can be specified using `--container <type>:<name>`. |
| 481 | + |
| 482 | +## MySQLTuner Infrastructure Awareness |
| 483 | + |
| 484 | +- **Storage Type**: Detects SSD/NVMe vs HDD by checking /sys/block/*/queue/rotational. |
| 485 | +- **Hardware Architecture**: Detects ARM64/Graviton vs x86_64. |
| 486 | +- tuning Adjustments: Suggestions for innodb_flush_neighbors and innodb_io_capacity based on storage type. |
| 487 | + |
| 488 | +## MySQLTuner Cloud Autodiscovery |
| 489 | + |
| 490 | +- **AWS**: Detects RDS/Aurora via @@version_comment and @@aurora_version. |
| 491 | +- **GCP**: Detects Cloud SQL via @@version_comment and @@cloudsql_instance_id. |
| 492 | +- **Azure**: Detects Flexible Server via @@version_comment. |
| 493 | +- **DigitalOcean**: Detects Managed MySQL via @@version_comment. |
| 494 | + |
| 495 | +## MySQLTuner Query Anti-Pattern Detection |
| 496 | + |
| 497 | +- **Full Scans**: Analyzes events_statements_summary_by_digest for queries with high no_index_used or no_good_index_used. |
| 498 | +- **Disk Temp Tables**: Identifies queries creating excessive internal disk-based temporary tables. |
| 499 | + |
| 500 | +## MySQLTuner Sysbench Integration |
| 501 | + |
| 502 | +- **Metrics**: Parses sysbench output for QPS, TPS, and latency (Avg/95th/Max). |
| 503 | +- **Comparison**: Includes baseline performance metrics in the final report. |
| 504 | + |
| 505 | +## MySQLTuner Historical Trend Analysis |
| 506 | + |
| 507 | +- **JSON Snapshots**: Ingests JSON output from previous runs via --compare-file. |
| 508 | +- **Comparisons**: Provides trends for QPS and Data Growth between snapshots. |
0 commit comments