seg: read-ahead implemented as own mmap area + madvise_ (only concept, no erigon changes)#19397
Merged
AskAlexSharov merged 15 commits intomainfrom Feb 24, 2026
Merged
seg: read-ahead implemented as own mmap area + madvise_ (only concept, no erigon changes)#19397AskAlexSharov merged 15 commits intomainfrom
mmap area + madvise_ (only concept, no erigon changes)#19397AskAlexSharov merged 15 commits intomainfrom
Conversation
JkLondon
approved these changes
Feb 22, 2026
mmap regionmmap area + madvise_ (only concept, no erigon changes)
sudeepdino008
pushed a commit
that referenced
this pull request
Mar 4, 2026
…cept, no erigon changes) (#19397) Context: merge is slow becuse it reading large files `mmap'ed` by `MADV_RANDOM`. Idea: It's possible to have 1 `file-descriptor` with N `VMA` (Virtual Memory Area). In another word: `mmap` many time same file. Means each `mmap` can have own `MADVISE_*` hints: - all existing RPC requrests and ChainTip will go to existing `mmap` area (MADV_RANDOM). - merge will go to new temporary `mmap` area (MADV_NORMAL). existing RPC will not hit it. overall 3gb file on raid of 4 nvme: `15s -> 3.7s`. But impact impact on exec perf need to test. Also usually files are warm-enough to make speedup of `merge` less than "read cold file in wacuum". Will see. Also `accessor build` likely will benefit from same thing.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context: merge is slow becuse it reading large files
mmap'edbyMADV_RANDOM.Idea: It's possible to have 1
file-descriptorwith NVMA(Virtual Memory Area). In another word:mmapmany time same file.Means each
mmapcan have ownMADVISE_*hints:mmaparea (MADV_RANDOM).mmaparea (MADV_NORMAL). existing RPC will not hit it.overall 3gb file on raid of 4 nvme:
15s -> 3.7s. But impact impact on exec perf need to test. Also usually files are warm-enough to make speedup ofmergeless than "read cold file in wacuum".Will see. Also
accessor buildlikely will benefit from same thing.