MySQL Wait Events Type Test
MySql wait event types include Lock (waiting for row/table locks), IO (disk or network input/output delays), CPU (waiting for processing time), and Concurrency (threads or connections contention). These types help pinpoint the exact resource causing query delays, enabling efficient performance tuning and system optimization based on where sessions are stuck.
Monitoring MySQL wait event types helps pinpoint resource bottlenecks like locks, I/O delays, or CPU contention. Understanding these wait sources enables targeted performance tuning, improves query efficiency, and ensures the database runs smoothly under load or high concurrency.
The MySQL Wait Event Type Test monitors the session wait events and collects metrics like number of waits, total wait time and average and percentage wait time etc. These metrics help administrators understand the performance implications of wait events and take preventive actions before the database performance drops.
Target of the test : A MySQL Database server
Agent deploying the test : An internal/remote agent
Outputs of the test : One set of results for the MySQL server being monitored
| Parameter | Description |
|---|---|
|
Test Period |
How often should the test be executed. |
|
Host |
The IP address of the MySQL server. |
|
Port |
The port at which the specified host listens. |
|
Database |
Specify the name of a database on the target MySQL database server being monitored |
|
Username and Password |
The eG agent has to be configured with the credentials of a user who has server-wide Process and Select privileges on the monitored MySQL server. To know how to create such a user, refer to Pre-requisites for Monitoring the MySQL Server For the MySQL Bin Log test to run, the user should additionally possess the following privileges. To configure the above-mentioned user with the specific privileges, issue the commands given below: GRANT REPLICATION CLIENT on *.* to '<username>'@'<IP_address_of_eG_agent>'; GRANT REPLICATION SLAVE on *.* to '<username>'@'<IP_address_of_eG_agent>'; GRANT EXECUTE on *.* to '<username>'@'<IP_address_of_eG_agent>'; |
|
Confirm Password |
Confirm the password by retyping it here. |
|
Allow Public Key |
By default, the Allow Public Key flag is set to No. But, if the specified USER is created with caching_sha2_password as the authentication plugin, then the eG agent can connect to the target database cluster using RSA public key. To this effect, you have to set Allow Public Key flag to Yes. |
|
Idle Time |
Specify the time duration (in seconds) above which the processes that are waiting in the database will be regarded as idle. |
|
SSL |
By default, the SSL flag is set to No, indicating that the target MySQL database server is not SSL-enabled by default. To enable the test to connect to an SSL-enabled MySQL database server , set the SSL flag to Yes. |
|
Verify CA |
If the eG agent is required to establish an encrypted connection with the target MySQL database server by authenticating the server's identity through verifying the server CA certificate, set Verify CA flag to Yes. By default, this flag is set to No. |
|
Truststore Password |
This parameter is applicable only if the Verify CA parameter is set to Yes. To verify the target server certificate, provide the password of the truststore file which contains the server CA certificate in the Truststore Password text box. By default, this parameter is set to none. |
|
Confirm Password |
Confirm the Password by retyping it in the Confirm Password text box. |
|
Keystore Password |
This parameter is applicable only if the Verify CA parameter is set to Yes. To establish a connection with the target MySQL database server , the eG agent needs to have access to the client certificate. For this provide the password of the keystore file which contains the client certificate in the Keystore Password text box. By default, this parameter is set to none. |
|
Confirm Password |
Confirm the Password by retyping it in the Confirm Password text box. |
|
Detailed Diagnosis |
To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option. The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:
|
|
Measurement |
Description |
Measurement Unit |
Interpretation |
|---|---|---|---|
|
Number of waits |
Indicates the total number of wait events of different types occurred during the operation of the database server. |
Number |
This is good measure of performance of the database server, if the number of wait sessions is high, it means the queries are waiting on something which help understand the slowness of overall database performance. |
|
Total wait time |
Indicate the total wait time including all wait types. |
Sec |
|
|
Average wait time |
Indicates the average wait time across all wait types and wait events . |
Sec |
If the average waiting time is very high it means that database each session has to wait before getting access to resources. You need to update the resource availability like I/O buses, CPU capacity and system memory etc. |
|
Percentage of wait time |
Indicates the total wait time as a percentage of time of operation of the the database server. |
Percentage |
If the percentage of wait is high it means the performance of the server is sub optimal as it is spending most of its time in waiting state. |