reth
reth copied to clipboard
Make `mmap` size requested by `libmdbx` configurable
Describe the feature
I would like there to be a configuration for changing the amount of memory requested upfront by libmdbx through mmap. It is 4TB as of now.
Additional context
Currently, reth requests 4TB of memory with mmap, which fails in Linux environments compiled with no4lvl boot argument. I can see why that would be necessary for production, but I only need to run reth in dev mode, and wouldn't require as much memory.
My use case is running reth in a deterministic RISC-V virtual machine. The application name is Bug Buster.
This issue is stale because it has been open for 21 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.
@shekhirin Hey! It would be good if the step was also configurable. From what I understand from the code base, it's at 4 GB. https://github.com/paradigmxyz/reth/blob/756a47e4e2a8ab350cfc12d6621981312e12f715/crates/storage/db/src/implementation/mdbx/mod.rs#L281-L289
I'm running reth in a really constrained environment. In my use case, I would set the total size to something like 8 MB, and the growth step to something like 4 KB.
I think we can make this work, sorry for not bumping prio on this.
need to track a few other things for this first before we can expose via cli
marking this as completed because this can now be configured