-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
server: disable PersistStats
RocksDB task for v2
#14111
Conversation
Signed-off-by: tabokie <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: tabokie <[email protected]>
components/server/src/server2.rs
Outdated
tablet_registry.for_each_opened_tablet(|_, cached| { | ||
if let Some(tablet) = cached.latest() { | ||
// rocksdb::kDefaultFlushInfoLogPeriodSec = 10. | ||
let _ = tablet |
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.
Why need to be flushed explicitly?
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.
Apparently flushing on certain size limit could cause foreground latency jitter. The periodic background flush is a safety net in case the existing manual flush sites (mostly during compaction and stuff) aren't called for a long time.
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.
Are we talking about info log or flushing memtables? How can it cause foreground latency? And what I mean is isn't log just written to file? Why need to flush?
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.
FWIW, rocksdb's native logger will buffer first before writing to a file. Even for direct pwrite there's the fflush
to flush the OS page buffer.
components/server/src/server2.rs
Outdated
); | ||
// rocksdb::DBOptions::stats_dump_period_sec = 600. | ||
if count % 60 == 0 { | ||
let _ = tablet |
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.
How about making it triggered on demand like an explicit debug request? Seems useless in most case.
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.
Statistics account for a period of time. Printing it on demand is mostly useless because the time span it covers is too large.
Note rocksdb logger should be created for each tablet instead of sharing. And we need to add the |
|
PersistStats
RocksDB task for v2
Signed-off-by: tabokie <[email protected]>
cd589da
to
2420245
Compare
…load-periodic-work Signed-off-by: tabokie <[email protected]>
/merge |
@tabokie: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 52e5c36
|
Signed-off-by: tabokie [email protected]
What is changed and how it works?
Issue Number: Ref #12842
What's Changed:
Disable
PersistStats
task for v2. The task pins private memory buffer for each instance, if not disabled it may easily cause OOM.InfoLog
task, on the other hand, is a no-op (for our logger implementation) so it's fine to let them run.Related changes
stats_persist_period_sec
anddisable_manual_compaction
rust-rocksdb#735Check List
Tests
Release note