eG Monitoring
 

Measures reported by MySQLCluKeyBuffTest

To minimize disk I/O, the MyISAM storage engine exploits a strategy that is used by many database management systems. It employs a cache mechanism to keep the most frequently accessed table blocks in memory:

  • For index blocks, a special structure called the key cache (or key buffer) is maintained. The structure contains a number of block buffers where the most-used index blocks are placed.

  • For data blocks, MySQL uses no special cache. Instead it relies on the native operating system file system cache.

If the size of the key buffer on each node of the MySQL Cluster database server is inadequate or if the buffer pool is poorly sized, then, more often than not, the requests may not be serviced by the buffer pool. If the required data is not available in the key buffer, requests may have to be serviced directly from the disk which may cause severe overheads. Similarly too many table scans may hamper the request servicing capability of the key buffer to a great extent! To avoid such overheads, it is necessary for the administrators to constantly keep a vigil on the sizing of the key buffer and the read/write requests to the key buffer on each node. The MySQLCluKeyBuffTest helps administrators in this regard!

This test monitors the key buffer of the MyISAM storage engine on each node of the target MySQL Cluster database server and reports the current size of the key buffer and the size that has already been utilized by the key buffer. This test also helps administrators figure out how well read/write requests are serviced by the key buffer. Using this test, administrators can also identify the execution that is frequently performed on the key buffer. The statistics reported by this test help administrators analyze the usage of the key buffer, and provides them with useful pointers to fine-tune the configuration of the key buffer on each node.

Outputs of the test : One set of results for each node in the target cluster being monitored

The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
bufferUsed Indicates the size of the key buffer that had already been utilized on this node. MB A value close to the key_buffer_size variable in MySQL cluster is an indication that the key buffer is currently experiencing size constraints.
currentBuf Indicates the current size of the key buffer on this node. MB  
writeHit Indicates the percentage of requests to write a key block to the key buffer on this node. Percent  
readHit Indicates the percentage of requests to read a key block from the key buffer. Percent Ideally, the value of this measure should be high.

A low value is a cause for concern, as it could indicate a delay in servicing read requests. To avoid such delays, administrators can increase the size of the key buffer.
selectFullJoin Indicates the number of joins that perform table scans because they do not use indexes. Number If this value is not 0, you should carefully check the indexes of your tables.
selectFullRangeJoin Indicates the number of joins that used a range search on a reference table. Number  
setOption Indicates the rate at which set command was executed on the key buffer during the last measurement period. Executions/sec  
changeDb Indicates the rate at which Change database command was executed on the key buffer during the last measurement period. Executions/sec  
showFields Indicates the rate at which SHOW FIELDS command was executed on the key buffer during the last measurement period. Executions/sec