-
Notifications
You must be signed in to change notification settings - Fork 312
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
feat(metrics): Add bloom filter related metrics #521
Conversation
0a5b8d8
to
b0104b9
Compare
7a75f76
to
ee691eb
Compare
Why BLOOM_FILTER_PREFIX_USEFUL was called "seek_negatives"? I prefer what rocksdb called - "useful". "bf_seek_negatives_rate" to "bf_seek_useful_rate" is definitely easier to remember. |
Of course, 'negative' is longer than 'useful', but when 'negative' stand with 'positive', or 'false negative', it's more clear IMO. |
Yes. But if you want to make it clear, you should call the metrics "false_negative" rather than "negative".
These names some have "false" prefixed but some are not. |
|
What problem does this PR solve?
Ref #496
New metrics
replica*app.pegasus*rdb.bf_seek_total@<gpid>
Aka
rocksdb::Tickers::BLOOM_FILTER_PREFIX_CHECKED
. Number of times bloom was checked before creating iterator on a file.replica*app.pegasus*rdb.bf_seek_negatives<gpid>
Aka
rocksdb::Tickers::BLOOM_FILTER_PREFIX_USEFUL
. The number of times the check was useful in avoiding iterator creation (and thus likely IOPs).replica*app.pegasus*rdb.bf_point_positive_true<gpid>
Aka
rocksdb::Tickers::BLOOM_FILTER_FULL_TRUE_POSITIVE
. Of times bloom FullFilter has not avoided the reads and data actually exist.replica*app.pegasus*rdb.bf_point_positive_total<gpid>
Aka
rocksdb::Tickers::BLOOM_FILTER_FULL_POSITIVE
. Of times bloom FullFilter has not avoided the reads.replica*app.pegasus*rdb.bf_point_negatives<gpid>
Aka
rocksdb::Tickers::BLOOM_FILTER_USEFUL
. Of times bloom filter has avoided file reads, i.e., negatives.collector*app.pegasus*app.stat.rdb_bf_seek_negatives_rate#<app_name>
Rate of avoided iterator creations (and thus likely IOPs) after checking prefix bloom filter.
value = SUM(bf_seek_negatives) / SUM(bf_seek_total)
collector*app.pegasus*app.stat.rdb_bf_point_negatives_rate#<app_name>
Rate of avoided point lookups after checking full key bloom filter.
value = SUM(bf_point_negatives) / (SUM(bf_point_negatives) + SUM(point_positive_total))
collector*app.pegasus*app.stat.rdb_bf_point_false_positive_rate#<app_name>
False positive rate of checking full key bloom filter.
value = (SUM(bf_point_positive_total) - SUM(bf_point_positive_true)) / (SUM(bf_point_positive_total) - SUM(bf_point_positive_true) + SUM(bf_point_negatives))
The naming of the above metrics are according to rocksdb document about bloom filter:
What is changed and how it works?
seek_n_rate
,point_n_rate
,point_fp_rate
) in shell commandapp_stat
table level:
partition level:
rdb_bf_point_false_positive_rate
,rdb_bf_point_negatives_rate
,rdb_bf_seek_negatives_rate
) to app level entityCheck List
Tests
Related changes
Yes
Yes
Yes