Skip to content

seg: more usage of bufio#20113

Merged
AskAlexSharov merged 2 commits intorelease/3.4from
alex/buifo_pooled_wr_34
Mar 24, 2026
Merged

seg: more usage of bufio#20113
AskAlexSharov merged 2 commits intorelease/3.4from
alex/buifo_pooled_wr_34

Conversation

@AskAlexSharov
Copy link
Copy Markdown
Collaborator

No description provided.

@AskAlexSharov AskAlexSharov changed the title save seg: more usage of bufio Mar 24, 2026
@AskAlexSharov AskAlexSharov enabled auto-merge (squash) March 24, 2026 01:56
Copy link
Copy Markdown
Contributor

@erigon-copilot erigon-copilot Bot left a comment

Choose a reason for hiding this comment

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

[SharovBot]

LGTM. Three clean changes:

  1. dataprovider.goBufIOSize (= 128*4096 = 512 KB) → explicit 512*datasize.KB. Identical value, just more readable. No behavioral change.

  2. compress.go — pool buffers 128 KB → 256 KB. Reasonable uplift for segment read/write throughput.

  3. parallel_compress.goPersistDictionary and ReadSimpleFile now use the package pool instead of allocating ad-hoc. Defer/cleanup ordering is correct: w.Flush() and df.Sync()/df.Close() run before putBufioWriter fires.

Minor note: PersistDictionary's writer buffer shrinks from 2×BufIOSize = 1 MB → 256 KB (pool size). Dictionary building is infrequent so this is unlikely to matter in practice, but worth being aware of.

@AskAlexSharov AskAlexSharov merged commit a91e560 into release/3.4 Mar 24, 2026
21 of 22 checks passed
@AskAlexSharov AskAlexSharov deleted the alex/buifo_pooled_wr_34 branch March 24, 2026 09:09
AskAlexSharov added a commit that referenced this pull request Apr 12, 2026
github-merge-queue Bot pushed a commit that referenced this pull request Apr 13, 2026
Cherry-pick from `release/3.4` to `main`:

- #19677 agg: workers presets. ressplit workers
- #19919 Revert "flush: use etl.IdentityLoadFunc instead custom. part2"
- #19780 etl: zero-copy memDataProvider
- #19941 d_lru: disable for commitment
- #19942 TemporalMemBatch: re-use vals-slice when can
- #19996 etl: pool of bufwriter
- #19995 collate: replace bitmap by array
- #20002 skill creator review results
- #20033 seg: revert global limiter
- #20046 Caplin: prevent calling `glob` per file in
`BuildMissingIndices`
- #20113 seg: more usage of bufio
- #20194 execution/state: revert CodeSizePath in codeChange journal
entry
- #20431 remove `flush complete` log line
- #20440 etl: munmap temp files in Dispose to prevent disk space leak

93 commits skipped due to conflicts (branches diverged significantly).

---------

Co-authored-by: lystopad <oleksandr.lystopad@erigon.tech>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: moskud <sudeepdino008@gmail.com>
Co-authored-by: info@weblogix.biz <admin@10gbps.weblogix.it>
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.

1 participant