Skip to content

Improve file sync in ReplicateV2 - #4201

Merged
roman-khimov merged 1 commit into
masterfrom
put-storage-stream-sync
Sep 29, 2026
Merged

roman-khimov merged 1 commit into
masterfrom
put-storage-stream-sync

Conversation

@cthulhu-rider

Copy link
Copy Markdown
Contributor

No description provided.

@cthulhu-rider
cthulhu-rider force-pushed the put-storage-stream-sync branch from 8be5613 to 1e774e5 Compare September 29, 2026 16:54
8ae3abe made ReplicateV2 server to call
`os.File.Write()` for FSTree's file multiple times. Since the file was
previously opened with `O_DSYNC` flag, each write also made sync. More
writes, more syncs. For example, Put performance tests showed
degradation on mid- and large-size objects (4M and 64M in particular).

This improves Linux server behavior by replacing open sync flag with
deferred sync syscall. Same test runs showed results pretty close (a bit
worse) to Replicate. At the same time, using ReplicateV2 uses less RAM.

Refs #4157.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
@cthulhu-rider
cthulhu-rider force-pushed the put-storage-stream-sync branch from 1e774e5 to 2eae07c Compare September 29, 2026 16:56
@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 31.60%. Comparing base (e08fae1) to head (2eae07c).

Files with missing lines Patch % Lines
...ject_storage/blobstor/fstree/fstree_write_linux.go 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4201      +/-   ##
==========================================
- Coverage   31.61%   31.60%   -0.01%     
==========================================
  Files         677      677              
  Lines       41570    41572       +2     
==========================================
- Hits        13141    13140       -1     
- Misses      28429    28432       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cthulhu-rider
cthulhu-rider marked this pull request as ready for review September 29, 2026 19:07
@roman-khimov
roman-khimov merged commit ea5f566 into master Sep 29, 2026
22 checks passed
@roman-khimov
roman-khimov deleted the put-storage-stream-sync branch September 29, 2026 19:26
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.

2 participants