zhaohaidao opened a new pull request, #3565:
URL: https://github.com/apache/bookkeeper/pull/3565

   Try to optimize tail latency caused by forceWrite calls during journal 
creation
   
   ### Motivation
   
   During the performance test of bookkeeper, it was observed that there was a 
serious queue backlog in journal, and then the flush time did not increase 
significantly, maintaining at the normal 100 millisecond level (experience 
value), but the sync time increased to the second level. Through the analysis 
of the indicators, it is known that this part of the time-consuming is caused 
by the creation of the journal. Then, it is found that there is a forceWrite 
call in the journal creation process. It is well known that forceWrite can 
cause write blocking.
   If I understand correctly, the forceWrite call is not necessary if syncData 
is turned off. If this call is removed, it is expected to optimize the long 
tail delay caused by journal creation blocking.
   
   The following are the changes before and after removing forceWrite. It can 
be seen that the journal creation time is maintained at a relatively low level
   BEFORE
   <img width="706" alt="image" 
src="https://user-images.githubusercontent.com/6216286/197179884-9d947cb3-9f88-4b51-b5f6-20e7420b5685.png";>
   
   AFTER
   <img width="697" alt="image" 
src="https://user-images.githubusercontent.com/6216286/197180246-49fee021-facd-4ca2-9e76-71b478eaf6ca.png";>
   
   
   ### Changes
   
   Do not call forceWrite if syncData is disabled during Journal Creation
   
   Master Issue: #3564
   
   > ---
   > In order to uphold a high standard for quality for code contributions, 
Apache BookKeeper runs various precommit
   > checks for pull requests. A pull request can only be merged when it passes 
precommit checks.
   >
   > ---
   > Be sure to do all of the following to help us incorporate your contribution
   > quickly and easily:
   >
   > If this PR is a BookKeeper Proposal (BP):
   >
   > - [ ] Make sure the PR title is formatted like:
   >     `<BP-#>: Description of bookkeeper proposal`
   >     `e.g. BP-1: 64 bits ledger is support`
   > - [ ] Attach the master issue link in the description of this PR.
   > - [ ] Attach the google doc link if the BP is written in Google Doc.
   >
   > Otherwise:
   > 
   > - [ ] Make sure the PR title is formatted like:
   >     `<Issue #>: Description of pull request`
   >     `e.g. Issue 123: Description ...`
   > - [ ] Make sure tests pass via `mvn clean apache-rat:check install 
spotbugs:check`.
   > - [ ] Replace `<Issue #>` in the title with the actual Issue number.
   > 
   > ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to