NDB data memory usage check
Job details
Name: |
NDB data memory usage check |
Platform: |
Mysql |
Category: |
Cluster and Replication |
Description: |
NDB data memory usage check |
Long description: |
This checks the usage of data memory in NDB cluster database |
Version: |
0.1 |
Default schedule: |
0,30 * * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & is_mysql_branch=‘1′]/.[hasengine=‘YES’ & global_status_performance_schema = ‘1′ ] |
Parameters
Name |
Default value |
Description |
warning threshold |
80 |
Will give a warning if the data memory usage exceeds this value. (in %) |
alarm threshold |
90 |
Will give an alarm if the data memory usage exceeds this value. (in %) |
give warning or alarm |
YES |
If this check should send warning or alarm. NO or YES |
Job Summary
- Purpose: The purpose of this job is to keep track of data memory usage in the Network Database (NDB) cluster database. It monitors the data memory and throws a warning or an alarm if the usage exceeds predefined thresholds.
- Why: This is crucial as it provides real-time information about memory usage. Failure in monitoring memory usage can lead to inefficient database management and possible database and application breakdowns due to memory overuse.
- Manual checking: There is SQL code included in the job for checking memory usage manually:
BEGIN;
SELECT node_id, round(used/1024/1024,2) used, round(total/1024/1024,2) total, round((total-used)/1024/1024,2) as free, round((used/(total-used))*100,2) as usedpct FROM ndbinfo.memoryusage WHERE MEMORY_TYPE = 'Data memory' order by 1;
END;
Category and Dependencies
- Category: This monitoring job falls under the category “Cluster and Replication”.
- Dependencies: The job has dependencies on two objects:
- dbw_ndb_data_mem_check: The procedure has a dependency on itself, it must be an existing function in the database for operation.
Implementation and Reporting
- Implementation: The job includes SQL code to execute the monitoring check and create a table to log the history of the check.
- Reporting: The job uses dbwatch-report-template to generate a report titled “NDB data memory usage check”. The report includes a chart displaying the memory usage ratio over time, with Node ID as the series and History Date as categories.
>Note: This job is specifically designed for MySQL branch instances with the NDB cluster engine enabled.