-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tsm: cache: add cache throughput related statistics. #5762
tsm: cache: add cache throughput related statistics. #5762
Conversation
G'day @mark-rushakoff - this pull request against your mr-disk-stats branch extends your work to add some additional cache statistics that I think would be useful. See discussion in #5499 for more details. I submitted the pull request for this against your branch, because my work is necessarily dependent upon your work - feel free to rebase onto the tip of your branch, if you so desire. /cc @jwilder |
b570901
to
7d57f3b
Compare
// counters - accumulative measures | ||
|
||
statCachedBytes = "cachedBytes" // counter: Total number of bytes written into snapshots. | ||
statWALCompactionTime = "WALCompactionTime" // counter: total number of milliseconds spent compacting snapshots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding the units to the stat names? i.e. WALCompactionTimeMs
and cacheAgeMs
.
The comments you've added (and your PR notes as well) are very clear and informative, but having the unit in the name of the stat eliminates some potential guesswork.
@jonseymour One small naming change requested, then I'm happy to accept this PR. I'll work with the database team next week to get this merged. Thanks for the contribution and the detailed notes. |
Sure will update when I am next at keyboard. |
Complementing and extending the changes in influxdata#5758. Add 2 level statistics: * snapshotCount * cacheAgeMs Add 2 counter statistics * cachedBytes * WALCompactionTimeMs snapshotCount can be used to measure transient write errors that are causing snapshots to accumulate cacheAgeMs can be used to guage the level of write activity into the cache The differences between cachedBytes stats sampled at different times can be used to calculate cache throughput rates The ratio (cachedBytes-diskBytes)/WALCompactionTimeMs can be used calculate WAL compaction throughput. The ratio of difference between first and last WAL compaction time over the interval length is an estimate of percentage of cache throughput consumed. Signed-off-by: Jon Seymour <jon@wildducktheories.com>
7d57f3b
to
6697c72
Compare
@mark-rushakoff done. Thanks for the review! |
tsm: cache: add cache throughput related statistics.
Complementing and extending the changes in #5758
Add 2 level statistics:
Add 2 counter statistics
snapshotCount can be used to measure transient write errors that are causing snapshots to accumulate
cacheAgeMs can be used to guage the level of write activity into the cache
differences between cachedBytes stats sampled at different times can be used to calculate cache throughput rates
(cachedBytes-diskBytes)/WALCompactionTimeMs can be used calculate TSM compaction throughput.
ratio of difference between first and last WAL compaction time over the interval
length is an estimate of percentage of cache throughput consumed.
Signed-off-by: Jon Seymour jon@wildducktheories.com