Skip to content

Latest commit

 

History

History
107 lines (80 loc) · 8.5 KB

REFERENCES.md

File metadata and controls

107 lines (80 loc) · 8.5 KB

MySQL, MariaDB, and Percona Reference Library

This document contains a curated list of official documentation, engineering blogs, and expert deep-dives for MySQL, MariaDB, and Percona Server. It serves as a solid baseline for all database performance tuning, security hardening, and SQL modeling practices implemented in MySQLTuner-perl.


🧮 Mathematical Formulations & Tuning Algorithms

MySQLTuner implements standardized sizing algorithms to evaluate memory allocations and risk profiles:

1. Global Server Buffers

Global buffers are allocated once at server startup (or dynamically resized) and shared among all client sessions: $$\text{Global Buffers} = \text{innodb_buffer_pool_size} + \text{innodb_log_buffer_size} + \text{key_buffer_size} + \text{aria_pagecache_buffer_size} + \text{query_cache_size}$$

2. Per-Thread Session Buffers

Per-thread buffers are allocated individually for each connected client whenever a query requires sorting, joins, or table scans: $$\text{Per-Thread Memory} = \text{read_buffer_size} + \text{read_rnd_buffer_size} + \text{sort_buffer_size} + \text{join_buffer_size} + \text{binlog_cache_size} + \text{thread_stack} + \text{tmp_table_size}$$ (Note: As implemented in calculate_per_thread_buffers, $\text{tmp_table_size}$ evaluates to $\min(\text{tmp_table_size}, \text{max_heap_table_size})$ when both are configured).

3. Total Maximum Theoretical vs. Peak Memory

  • Maximum Possible Memory Allocation: $$\text{Max Possible Memory} = \text{Global Buffers} + (\text{max_connections} \times \text{Per-Thread Memory})$$
  • Peak Realized Memory (Historical Peak): $$\text{Peak Memory} = \text{Global Buffers} + (\text{Max_used_connections} \times \text{Per-Thread Memory})$$

4. Memory Safety Ratios & Headroom KPI

  • Physical RAM Utilization: $$\text{RAM Usage Ratio} = \frac{\text{Max Possible Memory}}{\text{Physical RAM}} \times 100$$
    • Safe: $\le 85%$ on dedicated servers ($\le 60%$ on shared/containerized hosts).
    • Risk (OOM Trigger): $> 90%$ triggers immediate warning.
  • Buffer Pool Efficiency: $$\text{Hit Rate} = \left(1 - \frac{\text{Innodb_buffer_pool_reads}}{\text{Innodb_buffer_pool_read_requests}}\right) \times 100$$
    • Target: $\ge 99%$ in OLTP workloads.

🏛️ Official Documentations by Topic

1. Memory Management & Connection Tuning

2. Table Cache & File Descriptors

3. Temporary Tables & Performance Schema

4. Storage Engine Architecture & Metrics

5. SQL Modeling & Schema Design

6. Replication, High Availability & Clustering

7. Security, Authentication & Access Control


🏎️ Engineering & Product Blogs


🔬 Deep Dive Expert Articles

InnoDB Internals & Performance

Advanced Clusters & Galera


👨‍💻 Community Databases & Experts

  • lefred.be - Frédéric Descamps (MySQL Evangelist, InnoDB and backup performance).
  • jfg-mysql.blogspot.com - Jean-François Gagné (Deep dives into replication lag and Performance Schema wait events).
  • dasini.net - Olivier Dasini (MySQL certification roadmap and enterprise setups).