summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorcorrado <corrado@google.com>2016-09-27 04:50:38 -0700
committerChris Mumford <cmumford@chromium.org>2016-09-28 10:52:24 -0700
commita2fb086d07b7dbd9c4a59fe57646bd465841edd5 (patch)
tree0d10491a86c319c65e0989ebad33c16963568e7d /include
parent3080a45b626f8ddb474bc5e860796a48b51b3cf0 (diff)
downloadleveldb-a2fb086d07b7dbd9c4a59fe57646bd465841edd5.tar.gz
Add option for max file size. The currend hard-coded value of 2M is inefficient in colossus.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=134391640
Diffstat (limited to 'include')
-rw-r--r--include/leveldb/options.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/leveldb/options.h b/include/leveldb/options.h
index 83a1ef3..976e381 100644
--- a/include/leveldb/options.h
+++ b/include/leveldb/options.h
@@ -112,6 +112,18 @@ struct Options {
// Default: 16
int block_restart_interval;
+ // Leveldb will write up to this amount of bytes to a file before
+ // switching to a new one.
+ // Most clients should leave this parameter alone. However if your
+ // filesystem is more efficient with larger files, you could
+ // consider increasing the value. The downside will be longer
+ // compactions and hence longer latency/performance hiccups.
+ // Another reason to increase this parameter might be when you are
+ // initially populating a large database.
+ //
+ // Default: 2MB
+ size_t max_file_size;
+
// Compress blocks using the specified compression algorithm. This
// parameter can be changed dynamically.
//