eG Monitoring  

Measures reported by RedisPersisTest

Redis provides a different range of persistence options:

  • RDB (Redis Database): The RDB persistence performs point-in-time snapshots of your dataset at specified intervals. By default Redis saves snapshots of the dataset on disk, in a binary file called dump.rdb. You can configure Redis to have it save the dataset every N seconds if there are at least M changes in the dataset, or you can manually call the SAVE or BGSAVE commands. This strategy is known as snapshotting.

  • AOF (Append Only File): The AOF persistence logs every write operation received by the server, that will be played again at server startup, reconstructing the original dataset. Commands are logged using the same format as the Redis protocol itself, in an append-only fashion. Redis is able to rewrite the log in the background when it gets too big.

  • No persistence: If you wish, you can disable persistence completely, if you want your data to just exist as long as the server is running.

  • RDB + AOF: It is possible to combine both AOF and RDB in the same instance. Notice that, in this case, when Redis restarts the AOF file will be used to reconstruct the original dataset since it is guaranteed to be the most complete.

Where one or a combination of persistence options are at play, administrators may want to closely track the status of related operations, so they can proactively detect deviations from the norm. The RedisPersisTest helps administrators with this!

This test tracks the status of operations related to RDB and AOF persistence options and instantly notifies administrators of real/potential anomalies, so that data durability and integrity are not compromised.

Outputs of the test : One set of results for the target Redis server

The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
loading Indicates whether/not the dump file is being loaded or not.   The values that this measure can report and their corresponding numeric values are listed in the table below:

Measure Value Numeric Value
Yes 1
No 0


Note:

This measure reports the Measure Values listed in the table above to indicate whether/not the dump file is being loaded as part of the snapshotting process. The graph of this measure however, indicates the same using the numeric equivalents only.

rdb_bgsave_in_progress Indicates whether/not RDB file is being saved. Number The values that this measure can report and their corresponding numeric values are listed in the table below:

Measure Value Numeric Value
Yes 1
No 0


Note:

This measure reports the Measure Values listed in the table above to indicate whether/not the RDB file is being saved. The graph of this measure however, indicates the same using the numeric equivalents only.

rdb_changes_since_last_save Indicates the number of changes since the last dump Number You can configure Redis to have it save the dataset every N seconds if there are at least M changes in the dataset, or you can manually call the SAVE or BGSAVE commands.

Track changes to this measure over time to determine whether/not the number of changes configuration is optimal.
rdb_last_save_time Indicates when the last successful RDB save occurred. Date If the gap between the current date and the value of this measure is very wide, it can indicate one of the following:

  • No RDB save has happened since the last time changes were saved, probably because of how snapshotting is configured;
  • RDB saves have happened, but have failed;


  • The latter will need investigation. In case of the former, you may want to change how and when snapshotting should occur, depending upon your data durability needs.
rdb_last_bgsave_time_sec Indicates how long the last RDB save took. Seconds Ideally, the value of this measure should be low.
aof_enabled Indicates whether/not the AOF persistence option is enabled.   The values that this measure can report and their corresponding numeric values are listed in the table below:

Measure Value Numeric Value
Yes 1
No 0


Note:

This measure reports the Measure Values listed in the table above to indicate whether/not AOF is enabled. The graph of this measure however indicates the same using the numeric equivalents only.

aof_rewrite_in_progress Indicates whether/not AOF rewrite is in progress.   If AOF is enabled, every time Redis receives a command that changes the dataset (e.g. SET) it will append it to the AOF. When you restart Redis it will re-play the AOF to rebuild the state.

As you can guess, the AOF gets bigger and bigger as write operations are performed. For example, if you are incrementing a counter 100 times, you will end up with a single key in your dataset containing the final value, but100 entries in your AOF. 99 of those entries are not needed to rebuild the current state.

So Redis supports an interesting feature: it is able to rebuild the AOF in the background without interrupting service to clients. Whenever you issue a BGREWRITEAOF Redis will write the shortest sequence of commands needed to rebuild the current dataset in memory

This measure reports the status of this BGREWRITEAOF operation. The values that this measure can report and their corresponding numeric values are listed in the table below:

Measure Value Numeric Value
Yes 1
No 0


Note:

This measure reports the Measure Values listed in the table above to indicate whether/not the AOD rewrite is in progress. The graph of this measure however, indicates the same using the numeric equivalents only.

aof_rewrite_scheduled Indicates if an AOF rewrite operation is scheduled to occur once the on-going RDB save is complete.   Redis >= 2.4 makes sure to avoid triggering an AOF rewrite when an RDB snapshotting operation is already in progress, or allowing a BGSAVE while the AOF rewrite is in progress. This prevents two Redis background processes from doing heavy disk I/O at the same time.

When snapshotting is in progress and the user explicitly requests a log rewrite operation using BGREWRITEAOF the server will reply with an OK status code telling the user the operation is scheduled, and the rewrite will start once the snapshotting is completed.

The values that this measure can report and their corresponding numeric values are listed in the table below:
Measure Value Numeric Value
Yes 1
No 0


Note:

This measure reports the Measure Values listed in the table above to indicate whether/not AOF rewriting is scheduled. The graph of this measure however, indicates the same using the numeric equivalents only.

aof_current_size Indicates the current size of the AOF file. MB  
aof_buffer_length Indicates the size of the AOF file buffer. MB