-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(ds): Add a chapter about metrics
- Loading branch information
Showing
4 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Metrics | ||
|
||
This document explains Prometheus metrics relevant to the durable sessions. | ||
|
||
## `emqx_ds_egress_batches` | ||
|
||
This counter is increased every time when a batch of messages is successfully written to the durable storage. | ||
|
||
## `emqx_ds_egress_messages` | ||
|
||
This metric counts messages successfully written to the durable storage. | ||
|
||
## `emqx_ds_egress_bytes` | ||
|
||
This metric counts total volume of payload data successfully written to the durable storage. | ||
Note: this counter only takes message payloads into consideration, so the actual volume of data written to the durable storage may be larger. | ||
|
||
## `emqx_ds_egress_batches_failed` | ||
|
||
This counter is incremented every time when writing data to the durable storage fails for any reason. | ||
|
||
## `emqx_ds_egress_flush_time` | ||
|
||
This is a rolling average of time spent writing batches to the durable storage. | ||
It's a key indicator of the replication speed. | ||
|
||
## `emqx_ds_store_batch_time` | ||
|
||
This is a rolling average of time spent writing batches to the local RocksDB storage. | ||
Unlike `emqx_ds_egress_flush_time`, it does not include network replication costs, so it's the key indicator of the disk IO efficiency. | ||
|
||
## `emqx_ds_builtin_next_time` | ||
|
||
This is a rolling average of time spent consuming a batch of messages from the durable storage. | ||
|
||
## `emqx_ds_storage_bitfield_lts_counter_seek` and `emqx_ds_storage_bitfield_lts_counter_next` | ||
|
||
These counters are specific to the "wildcard optimized" storage layout. | ||
They measure the efficiency of consuming data from the local storage. | ||
|
||
Wildcard optimized layout uses two primitives for looking up data from RocksDB: one that searches for a key (seek), and one that simply jumps to the next key (next). | ||
`seek` primitive is generally slower, so ideally rate of growth of `emqx_ds_storage_bitfield_lts_counter_next` counter must be much greater than the rate of growth of `seek` counter. | ||
|
||
Increasing `durable_storage.messages.layout.epoch_bits` parameter can help to increase this ratio. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# TODO |