Skip to content

Commit fd8f696

Browse files
committed
Revert "Increase maximum read-only mmap()s used from 1000 to 4096 on 64-bit systems"
After bitcoin/bitcoin#30039, the number of ldb files created is 16 times smaller. 1000 files with the new default of 32MB is 32GB of database. If we need more, we can increase the default file size again. This patch seems unnecessary now. This reverts commit 92ae82c.
1 parent 4188247 commit fd8f696

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/env_posix.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ namespace {
4242
// Set by EnvPosixTestHelper::SetReadOnlyMMapLimit() and MaxOpenFiles().
4343
int g_open_read_only_file_limit = -1;
4444

45-
// Up to 4096 mmap regions for 64-bit binaries; none for 32-bit.
46-
constexpr const int kDefaultMmapLimit = (sizeof(void*) >= 8) ? 4096 : 0;
45+
// Up to 1000 mmap regions for 64-bit binaries; none for 32-bit.
46+
constexpr const int kDefaultMmapLimit = (sizeof(void*) >= 8) ? 1000 : 0;
4747

4848
// Can be set using EnvPosixTestHelper::SetReadOnlyMMapLimit().
4949
int g_mmap_limit = kDefaultMmapLimit;

0 commit comments

Comments
 (0)