Increase maximum read-only mmap()s used from 1000 to 4096 on 64-bit systems#1265
Draft
l0rinc wants to merge 1 commit intogoogle:mainfrom
Draft
Increase maximum read-only mmap()s used from 1000 to 4096 on 64-bit systems#1265l0rinc wants to merge 1 commit intogoogle:mainfrom
l0rinc wants to merge 1 commit intogoogle:mainfrom
Conversation
…ystems By default LevelDB will only mmap() up to 1000 ldb files for reading and then fall back to using file desciptors. The typical linux system has a 'vm.max_map_count = 65530', so mapping only 1000 files seems arbitarily small. Increase this value to another arbitrarily small value, 4096. Original change by Clem Taylor. Ported to LevelDB 1.22 by Wladimir J. van der Laan.
|
i'm confused, maybe there is value in changing the default, but why do we patch leveldb here when it could be set from client code: |
Author
|
Are you suggesting we revert it in Bitcoin instead? |
|
Ideally yes, looking into it. Sure, upstream leveldb might still want to change this default but i find it hard to argue "why 4096". Hah i like the commit message: |
laanwj
added a commit
to laanwj/bitcoin
that referenced
this pull request
May 8, 2025
Set the default leveldb mmap limit to 4096 from dbwrapper, before creating the first leveldb context. The motivation here is to remove the need for a leveldb patch, see google/leveldb#1265.
|
Okay this turned out so much worse than i hoped, on the upside, maybe we can just drop this patch: bitcoin/bitcoin#32447 |
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.
Cherry-picking bitcoin-core@92ae82c and revives #613