increase mmap file limit to 1M to match published instructions (#26203)

This commit is contained in:
Jeff Washington (jwash) 2022-06-25 19:04:54 -05:00 committed by GitHub
parent cbefc581c0
commit bf97a99dca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -4218,7 +4218,10 @@ fn adjust_ulimit_nofile(_enforce_ulimit_nofile: bool) -> Result<()> {
fn adjust_ulimit_nofile(enforce_ulimit_nofile: bool) -> Result<()> {
// Rocks DB likes to have many open files. The default open file descriptor limit is
// usually not enough
let desired_nofile = 500000;
// AppendVecs and disk Account Index are also heavy users of mmapped files.
// This should be kept in sync with published validator instructions.
// https://docs.solana.com/running-validator/validator-start#increased-memory-mapped-files-limit
let desired_nofile = 1_000_000;
fn get_nofile() -> libc::rlimit {
let mut nofile = libc::rlimit {