diff --git a/config.toml.sample b/config.toml.sample index faf8622634..c934ced97b 100644 --- a/config.toml.sample +++ b/config.toml.sample @@ -72,7 +72,7 @@ query-shard-buffer-size = 1000 # Maximum mmap open files, this will affect the virtual memory used by # the process -max-open-files = 100 +max-open-files = 40 # These options specify how data is sharded across the cluster. There are two # shard configurations that have the same knobs: short term and long term. diff --git a/src/configuration/config.toml b/src/configuration/config.toml index b60c6d29d2..af60e0e42e 100644 --- a/src/configuration/config.toml +++ b/src/configuration/config.toml @@ -69,7 +69,7 @@ query-shard-buffer-size = 1000 # Maximum mmap open files, this will affect the virtual memory used by # the process -# max-open-files = 100 +max-open-files = 40 # These options specify how data is sharded across the cluster. There are two # shard configurations that have the same knobs: short term and long term. diff --git a/src/datastore/leveldb_shard_datastore.go b/src/datastore/leveldb_shard_datastore.go index 9d02a16cea..1fb8f19ebc 100644 --- a/src/datastore/leveldb_shard_datastore.go +++ b/src/datastore/leveldb_shard_datastore.go @@ -74,6 +74,7 @@ func NewLevelDbShardDatastore(config *configuration.Configuration) (*LevelDbShar opts.SetBlockSize(64 * ONE_KILOBYTE) filter := levigo.NewBloomFilter(SHARD_BLOOM_FILTER_BITS_PER_KEY) opts.SetFilterPolicy(filter) + opts.SetMaxOpenFiles(config.LevelDbMaxOpenFiles) return &LevelDbShardDatastore{ baseDbDir: baseDbDir,