diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-07-04 15:09:38 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-07-04 15:09:38 +1000 |
commit | 44876cbc7ce74cecbc3f7b8b7e41a67c2a846830 (patch) | |
tree | cace7d721ced7bc63345c38196b115efcb90e639 /api | |
parent | 9121d1c67638ddd09c86c9cc83e4979b5a7e5810 (diff) | |
download | mongo-44876cbc7ce74cecbc3f7b8b7e41a67c2a846830.tar.gz |
Some more LevelDB config tweaks: revert to defaults for Bloom filters, move constants into the header file.
Diffstat (limited to 'api')
-rw-r--r-- | api/leveldb/leveldb_wt.cc | 4 | ||||
-rw-r--r-- | api/leveldb/leveldb_wt.h | 13 |
2 files changed, 7 insertions, 10 deletions
diff --git a/api/leveldb/leveldb_wt.cc b/api/leveldb/leveldb_wt.cc index ac2df8c253b..a71cc60aa16 100644 --- a/api/leveldb/leveldb_wt.cc +++ b/api/leveldb/leveldb_wt.cc @@ -206,8 +206,7 @@ wtleveldb_create( s_table << WT_TABLE_CONFIG; s_table << "internal_page_max=" << options.block_size << ","; s_table << "leaf_page_max=" << options.block_size << ","; - // LSM doesn't split, build full pages from the start - s_table << "split_pct=100,"; + s_table << "leaf_item_max=" << options.block_size / 4 << ","; if (options.compression == leveldb::kSnappyCompression) s_table << "block_compressor=snappy,"; s_table << "lsm=("; @@ -254,7 +253,6 @@ leveldb::DB::Open(const Options &options, const std::string &name, leveldb::DB * else cache_size += 100 << 20; s_conn << "cache_size=" << cache_size << ","; - s_conn << "eviction_workers=4,"; std::string conn_config = s_conn.str(); WT_CONNECTION *conn; diff --git a/api/leveldb/leveldb_wt.h b/api/leveldb/leveldb_wt.h index 60390b361c7..54a98a8cb9c 100644 --- a/api/leveldb/leveldb_wt.h +++ b/api/leveldb/leveldb_wt.h @@ -45,13 +45,12 @@ #include "wiredtiger.h" #define WT_URI "table:data" -#define WT_CONN_CONFIG "log=(enabled),checkpoint_sync=false,session_max=8192,"\ - "mmap=false,transaction_sync=(enabled=true,method=none)," -#define WT_TABLE_CONFIG "type=lsm,leaf_page_max=4KB,leaf_item_max=1KB," \ - "internal_page_max=128K,lsm=(chunk_size=100MB," \ - "bloom_config=(leaf_page_max=8MB)," \ - "bloom_bit_count=28,bloom_hash_count=19," \ - "bloom_oldest=true)," +#define WT_CONN_CONFIG "log=(enabled),checkpoint_sync=false," \ + "session_max=8192,mmap=false,eviction_workers=4," \ + "transaction_sync=(enabled=true,method=none)," +// Note: LSM doesn't split, build full pages from the start +#define WT_TABLE_CONFIG "type=lsm,split_pct=100,leaf_item_max=1KB," \ + "lsm=(chunk_size=100MB,bloom_config=(leaf_page_max=8MB))," using leveldb::Cache; using leveldb::FilterPolicy; |