InnoDB buffer pool check
Job details
Name: |
InnoDB buffer pool check |
Platform: |
Mariadb |
Category: |
Performance |
Description: |
Checks the hit rate of the innodb buffer pool using performance_schema.global_status. MariaDB Enterprise Server uses the InnoDB storage engine by default. |
Long description: |
This job checks the hit rate of the innodb buffer pool. MariaDB Enterprise Server uses the InnoDB storage engine by default. InnoDB is a general purpose transactional storage engine that is performant, ACID-compliant, and well-suited for most workloads. |
Version: |
2.22 |
Default schedule: |
2,7,12,17,22,27,32,37,42,47,52,57 * * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & is_mariadb_branch=‘1′]/.[hasengine=‘YES’ & global_status_information_schema = ‘1′ ] |
Parameters
Name |
Default value |
Description |
hit ratio warning threshold |
95 |
If this threshold is reached over a period of time (controlled by parameters “warning/alarm threshold (time)”), a warning is returned. |
hit ratio alarm threshold |
80 |
If this threshold is reached over a period of time (controlled by parameters “warning/alarm threshold (time)”), an alarm is returned. |
history threshold |
7 |
The maximum number of day to kept statistics for in the history table. |
alarm threshold (time) |
30 |
A period of time (in minutes) which must be passed (combined with average values of INNODB_BUFFER_POOL_READ_REQUESTS) before an alarm is returned by the procedure. |
min BUFFER_POOL_READ_REQUESTS |
10000 |
The minimum average value of INNODB_BUFFER_POOL_READ_REQUESTS (over a period of time defined by the “alarm/warning threshold (time)” parameters) before an alarm or a warning is triggered. |
warning threshold (time) |
30 |
A period of time (in minutes) which must be passed (combined with average values of INNODB_BUFFER_POOL_READ_REQUESTS) before a warning is returned by the procedure. |
enable warnings and alarms |
NO |
If set to “NO” (default), the alert will only collect performance statistics without returning status warning or alarm. |
Job Summary
- Purpose: This monitoring job is designed to evaluate the performance of the InnoDB buffer pool within a MariaDB Enterprise Server environment, primarily by checking the hit rate and managing the historical data related to buffer pool utilization.
- Why: The InnoDB buffer pool is crucial for maximizing database efficiency by reducing I/O operations required for data fetching. Effective monitoring helps in maintaining optimal database performance, preventing potential slowdowns or bottlenecks that can affect application responsiveness and user experience.
- Manual checking: You can manually check the status of the InnoDB buffer pool by using the following SQL commands:
SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE VARIABLE_NAME = 'INNODB_BUFFER_POOL_READ_REQUESTS';
SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE VARIABLE_NAME = 'INNODB_BUFFER_POOL_READS';
Detailed Job Description
- Functionality: This job uses performance_schema.global_status to compute the hit rate or effectiveness of the InnoDB buffer pool. It also considers parameters such as warning and alarm thresholds to actively manage the performance health.
- Target: This job specifically targets MariaDB instances configured with InnoDB as the storage engine, filtering only those instances from the control check.
- Alert Mechanism: Depending on the configuration (if enabled), the job can trigger warnings or alarms if the hit ratios drop below specified thresholds, ensuring proactive issue handling.
Implementation Details
- Tables and Procedural Code:
CREATE TABLE dbw_innodb_buffer_pool_check_histr (buffer_reads bigint, buffer_read_requests bigint, ratio float, histr_date datetime, period bigint);
CREATE TABLE dbw_innodb_buffer_pool_check_last (reads_last bigint, read_requests_last bigint, histr_date datetime);
CREATE PROCEDURE dbw_innodb_buffer_pool_check ...
* *Data Cleanup*: Historical data exceeding a defined age is removed to prevent excessive accumulation.
* *Monitoring Cycle*: The procedure updates data on a predefined schedule and recalculates the buffer pool hit rate, managing historical entries for trend analysis.
Dependencies & Cleanup
- Dependencies:
- dbw_innodb_buffer_pool_check: Main procedure.
DROP TABLE dbw_innodb_buffer_pool_check_last;
DROP TABLE dbw_innodb_buffer_pool_check_histr;
DROP PROCEDURE dbw_innodb_buffer_pool_check;
Report Presentation
- Innodb buffer pool check report:
- Tables, charts, and SQL queries are used to present both specific datum points and graphical trends over time related to buffer pool hit rates and usage.
Configuration Options
- Parameters:
- Hit ratio thresholds for warnings and alarms to dynamically manage performance alerts.
This comprehensive setup within dbWatch Control Center ensures that MariaDB servers using InnoDB are monitored effectively, with mechanisms in place to alert administrators to potential performance degradation.