This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
feat: add point for write using latency_tracer tool #511
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
levy5307
reviewed
Aug 14, 2020
levy5307
reviewed
Aug 14, 2020
levy5307
reviewed
Aug 14, 2020
levy5307
reviewed
Aug 14, 2020
levy5307
reviewed
Aug 14, 2020
neverchanje
reviewed
Aug 24, 2020
neverchanje
reviewed
Aug 24, 2020
acelyc111
reviewed
Aug 24, 2020
14dda57
to
213c7be
Compare
acelyc111
approved these changes
Aug 26, 2020
neverchanje
approved these changes
Aug 26, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
type/config-change
PR that made modification on configs, which should be noted in release note.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
apache/incubator-pegasus#883
Tracing the write-path enables us to further investigate the write-performance issues and understand which stage costs most. The write-path is unusually complicated to trace because by design there're multiple concurrent tasks triggered for each write.
One op first generates 2 prepare RPCs for the 2PC procedure. Simultaneously it appends one log to the WAL on disk. After 2PC and log-write finish, the write put its content into RocksDB memtable. Unless the RocksDB is stalled, a write to RocksDB is always pretty fast given that no disk IO is involved.
The entire write path can be roughly abstracted as:
To optimize the write path, the key stage we need to concern mostly is 2->3.
This PR(depending on #510) adds some stage point for write-operation and set the latency threshold to 1 second. The dumped point as follow:
New Config
[replication] +abnormal_write_trace_latency_threshold = 1000000000