Skip to content

[TieredStorage] Use BufWriter in TieredWritableFile#261

Merged
yhchiang-sol merged 1 commit intoanza-xyz:masterfrom
yhchiang-sol:ts-buf-writer
Mar 18, 2024
Merged

[TieredStorage] Use BufWriter in TieredWritableFile#261
yhchiang-sol merged 1 commit intoanza-xyz:masterfrom
yhchiang-sol:ts-buf-writer

Conversation

@yhchiang-sol
Copy link
Copy Markdown

@yhchiang-sol yhchiang-sol commented Mar 15, 2024

Problem

TieredWritableFile currently uses File instead of BufWriter.
This will introduce more syscall when doing file writes.

Summary of Changes

This PR makes TieredWritableFile uses BufWriter to allow the
write-call to be more optimized to reduce the number of syscalls.

Test Plan

Existing tiered-storage test.
Will run experiments to verify its performance improvement.

Dependency

#260

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 84.28571% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 81.9%. Comparing base (794cb2f) to head (a6941d4).
Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #261   +/-   ##
=======================================
  Coverage    81.9%    81.9%           
=======================================
  Files         836      836           
  Lines      226643   226652    +9     
=======================================
+ Hits       185636   185647   +11     
+ Misses      41007    41005    -2     

@yhchiang-sol yhchiang-sol marked this pull request as ready for review March 15, 2024 06:04
@yhchiang-sol
Copy link
Copy Markdown
Author

The write time improvement for HotStorage is huge! Around 7-8x faster.
(The graph shows the disk write time of HotStorage. The validator restarted at around 9:20 with this PR.)

Screenshot 2024-03-14 at 11 04 14 PM

@yhchiang-sol yhchiang-sol changed the title [TieredStorage] Improve write performance [TieredStorage] Use BufWriter in TieredWritableFile Mar 15, 2024
Copy link
Copy Markdown

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.
I assume that existing tests have already covered the changes in this PR.

@yhchiang-sol
Copy link
Copy Markdown
Author

I assume that existing tests have already covered the changes in this PR.

Yes, existing tests have already covered the changes in this PR. This PR has also run on mnb and pop-net as well.

@yhchiang-sol yhchiang-sol merged commit 7c49b9c into anza-xyz:master Mar 18, 2024
codebender828 pushed a commit to codebender828/agave that referenced this pull request Oct 3, 2024
#### Problem
TieredWritableFile currently uses File instead of BufWriter.
This will introduce more syscall when doing file writes.

#### Summary of Changes
This PR makes TieredWritableFile uses BufWriter to allow the
write-call to be more optimized to reduce the number of syscalls.

#### Test Plan
Existing tiered-storage test.
Will run experiments to verify its performance improvement.

#### Dependency
anza-xyz#260
OliverNChalk pushed a commit to OliverNChalk/agave that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants