Skip to content

Commit

Permalink
Explicitly specify 'max_open_files' to reduce RAM usage
Browse files Browse the repository at this point in the history
  • Loading branch information
romanz committed Jul 26, 2018
1 parent a32f718 commit fcb926a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ impl DBStore {
let mut db_opts = rocksdb::Options::default();
db_opts.create_if_missing(true);
// db_opts.set_keep_log_file_num(10);
db_opts.set_max_open_files(2048);
db_opts.set_compaction_readahead_size(2 << 20);
db_opts.set_compaction_style(rocksdb::DBCompactionStyle::Level);
db_opts.set_compression_type(rocksdb::DBCompressionType::Snappy);
Expand Down

1 comment on commit fcb926a

@romanz
Copy link
Owner Author

@romanz romanz commented on fcb926a Jul 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following #30

Please sign in to comment.