rocksdb/tools
Feng Zhu 0af157f9bf Implement full filter for block based table.
Summary:
1. Make filter_block.h a base class. Derive block_based_filter_block and full_filter_block. The previous one is the traditional filter block. The full_filter_block is newly added. It would generate a filter block that contain all the keys in SST file.

2. When querying a key, table would first check if full_filter is available. If not, it would go to the exact data block and check using block_based filter.

3. User could choose to use full_filter or tradional(block_based_filter). They would be stored in SST file with different meta index name. "filter.filter_policy" or "full_filter.filter_policy". Then, Table reader is able to know the fllter block type.

4. Some optimizations have been done for full_filter_block, thus it requires a different interface compared to the original one in filter_policy.h.

5. Actual implementation of filter bits coding/decoding is placed in util/bloom_impl.cc

Benchmark: base commit 1d23b5c470
Command:
db_bench --db=/dev/shm/rocksdb --num_levels=6 --key_size=20 --prefix_size=20 --keys_per_prefix=0 --value_size=100 --write_buffer_size=134217728 --max_write_buffer_number=2 --target_file_size_base=33554432 --max_bytes_for_level_base=1073741824 --verify_checksum=false --max_background_compactions=4 --use_plain_table=0 --memtablerep=prefix_hash --open_files=-1 --mmap_read=1 --mmap_write=0 --bloom_bits=10 --bloom_locality=1 --memtable_bloom_bits=500000 --compression_type=lz4 --num=393216000 --use_hash_search=1 --block_size=1024 --block_restart_interval=16 --use_existing_db=1 --threads=1 --benchmarks=readrandom —disable_auto_compactions=1
Read QPS increase for about 30% from 2230002 to 2991411.

Test Plan:
make all check
valgrind db_test
db_stress --use_block_based_filter = 0
./auto_sanity_test.sh

Reviewers: igor, yhchiang, ljin, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D20979
2014-09-08 10:37:05 -07:00
..
auto_sanity_test.sh Add script auto_sanity_test.sh to perform auto sanity test 2014-04-03 10:21:46 -07:00
blob_store_bench.cc Rename "benchmark" back to "bench". 2014-04-21 13:12:15 -07:00
db_crashtest.py Remove seek compaction 2014-06-20 10:23:02 +02:00
db_crashtest2.py Remove seek compaction 2014-06-20 10:23:02 +02:00
db_repl_stress.cc Make RocksDB work with newer gflags 2014-05-08 17:25:13 -07:00
db_sanity_test.cc Implement full filter for block based table. 2014-09-08 10:37:05 -07:00
db_stress.cc Implement full filter for block based table. 2014-09-08 10:37:05 -07:00
ldb_test.py Consistency Check Function 2014-03-20 13:42:45 -07:00
ldb.cc Revert "Don't compile ldb tool into static library" 2014-04-15 11:29:02 -07:00
reduce_levels_test.cc Fix compile error in reduce_levels_test. 2014-06-23 17:48:20 -06:00
sst_dump.cc introduce ImmutableOptions 2014-09-04 16:18:36 -07:00