Skip to content
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

Conversation

jonseymour
Copy link
Contributor

Complementing and extending the changes in #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

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

@jonseymour
Copy link
Contributor Author

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

@jonseymour jonseymour force-pushed the jss-5499-extend-tsm-cache-stats branch 2 times, most recently from b570901 to 7d57f3b Compare February 20, 2016 04:14
// counters - accumulative measures

statCachedBytes = "cachedBytes" // counter: Total number of bytes written into snapshots.
statWALCompactionTime = "WALCompactionTime" // counter: total number of milliseconds spent compacting snapshots
Copy link
Contributor

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.

@mark-rushakoff
Copy link
Contributor

@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.

@jonseymour
Copy link
Contributor Author

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>
@jonseymour jonseymour force-pushed the jss-5499-extend-tsm-cache-stats branch from 7d57f3b to 6697c72 Compare February 20, 2016 11:19
@jonseymour
Copy link
Contributor Author

@mark-rushakoff done. Thanks for the review!

mark-rushakoff added a commit that referenced this pull request Feb 20, 2016
tsm: cache: add cache throughput related statistics.
@mark-rushakoff mark-rushakoff merged commit 0464518 into influxdata:mr-disk-stats Feb 20, 2016
@jonseymour jonseymour deleted the jss-5499-extend-tsm-cache-stats branch February 20, 2016 21:28
@jonseymour jonseymour restored the jss-5499-extend-tsm-cache-stats branch February 20, 2016 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants