Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbwrapper: Bump LevelDB max file size to 128 MiB to avoid system slowdown from high disk cache flush rate #30039

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dbwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ static leveldb::Options GetOptions(size_t nCacheSize)
// on corruption in later versions.
options.paranoid_checks = true;
}
options.max_file_size = std::max(options.max_file_size, DBWRAPPER_MAX_FILE_SIZE);
SetMaxOpenFiles(&options);
return options;
}
Expand Down
1 change: 1 addition & 0 deletions src/dbwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

static const size_t DBWRAPPER_PREALLOC_KEY_SIZE = 64;
static const size_t DBWRAPPER_PREALLOC_VALUE_SIZE = 1024;
static const size_t DBWRAPPER_MAX_FILE_SIZE = 128 << 20; // 128 MiB

//! User-controlled performance and debug options.
struct DBOptions {
Expand Down