-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Add new stat rocksdb.table.open.prefetch.tail.read.bytes, rocksdb.table.open.prefetch.tail.{miss|hit} #11265
Conversation
4115cf6
to
d847d87
Compare
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
LGTM, thanks!
d847d87
to
dbb4b3d
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
dbb4b3d
to
dc04cbb
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
dc04cbb
to
4f882d4
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@hx235 has updated the pull request. You must reimport the pull request before landing. |
@ajkr - not official review request but just want to let you know that after adding |
7cd4630
to
26a5b2e
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
26a5b2e
to
311455f
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
Making new changes to the PR that worth another review
@ajkr - Hi it's ready for review! Sorry I decided to make changes to previous approved PR, including adding the new stats as they are too related. For that I have to click "dismiss" your previous approval and request a new review on the PR. Let me know if there is any concern/questions. Main change: a cleaner solution to collect rocksdb.table.open.prefetch.tail.*.stats in FilePrefetchBuffer level by distinguishing different usage of FilePrefetchBuffer (extensible for future too if we want to know stat about certain FilePrefetchBuffer); fix a bug I made in the original PR by including system prefetch in the buffer byte; variable renaming and better tests |
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
311455f
to
fda63c9
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
FilePrefetchBuffer side changes LGTM. |
fda63c9
to
4d7b9e7
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
rebase and re-import (cuz I forgot to do that previously :P) |
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.
LGTM, thanks!
4d7b9e7
to
706da85
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
706da85
to
6f66e4d
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
…for non-FilePrefetchBufferUsage::kTableOpenPrefetchTail
6f66e4d
to
4eac8b3
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Context/Summary:
We are adding new stats to measure behavior of prefetched tail size and look up into this buffer
The stat collection is done in FilePrefetchBuffer but only for prefetched tail buffer during table open for now using FilePrefetchBuffer enum. It's cleaner than the alternative of implementing in upper-level call places of FilePrefetchBuffer for table open. It also has the benefit of extensible to other types of FilePrefetchBuffer if needed. See db bench for perf regression concern.
Test:
- Piggyback on existing test
- rocksdb.table.open.prefetch.tail.miss is harder to UT so I manually set prefetch tail read bytes to be small and run db bench.
- No perf regression observed in db_bench
SETUP command: create same db with ~900 files for pre-change/post-change.
TEST command 60 runs or til convergence: as suggested by @anand1976 and @akankshamahajan15, vary
seek_nexts
andasync_io
in testing.async io = 0, direct io read = true
async io = 1, direct io read = true