-
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
Group SST write in flush, compaction and db open with new stats #11910
Conversation
346a60e
to
d9db355
Compare
} | ||
if (do_flush_ && s.ok()) { | ||
s = dest_->Flush(); | ||
s = dest_->Flush(opts); |
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.
Moving BLOB_DB_BLOB_FILE_WRITE_MICROS from above to WritableFileWriter::Append() will not measure this line. This should only affect stacked/legacy BlobDB, as do_flush is only used there. See 431e8af for more.
d9db355
to
93d6092
Compare
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Requested @ltamasi for review as this PR affects some blob stats - see PR summary for a high-level review. Let me know if there is anything I can do to make the review easier. Thank you! |
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
include/rocksdb/options.h
Outdated
WriteOptions(Env::IOPriority _rate_limiter_priority, | ||
Env::IOActivity _io_activity = Env::IOActivity::kUnknown); |
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.
Needs explicit
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.
Fixed
93d6092
to
55229c3
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. |
55229c3
to
40ed346
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. |
40ed346
to
3b97a64
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. |
3b97a64
to
3aa7cb0
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
Similar to #11288, #11444, categorizing SST/blob file write according to different io activities allows more insight into the activity.
For that, this PR does the following:
Some related code refactory to make implementation cleaner:
This parameter is used for dynamically changing file io priority for flush, see Set Write rate limiter priority dynamically and pass it to FS #9988 for more
Test
db bench
Flush
compaction, db oopen
blob stats - just to make sure they aren't broken by this PR
Rehearsal CI stress test
Trigger 3 full runs of all our CI stress tests
Performance
Flush
Compaction
Put with WAL (in case passing WriteOptions slows down this path even without collecting SST write stats)