From 9790b94c924453cea4d230a0f40edf02015f71e8 Mon Sep 17 00:00:00 2001 From: Mark Callaghan Date: Thu, 5 May 2016 07:32:10 -0700 Subject: [PATCH] Add optimize_filters_for_hits option to db_bench Summary: Add optimize_filters_for_hits option to db_bench Task ID: # Blame Rev: Test Plan: run db_bench Revert Plan: Database Impact: Memcache Impact: Other Notes: EImportant: - begin *PUBLIC* platform impact section - Bugzilla: # - end platform impact - Reviewers: sdong Reviewed By: sdong Subscribers: andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D57621 --- tools/db_bench_tool.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index e5ebeaff9..52d572c12 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -487,6 +487,11 @@ DEFINE_int32(deletepercent, 2, "Percentage of deletes out of reads/writes/" "deletepercent), so deletepercent must be smaller than (100 - " "FLAGS_readwritepercent)"); +DEFINE_bool(optimize_filters_for_hits, false, + "Optimizes bloom filters for workloads for most lookups return " + "a value. For now this doesn't create bloom filters for the max " + "level of the LSM to reduce metadata that should fit in RAM. "); + DEFINE_uint64(delete_obsolete_files_period_micros, 0, "Ignored. Left here for backward compatibility"); @@ -2596,6 +2601,7 @@ class Benchmark { FLAGS_max_grandparent_overlap_factor; options.disable_auto_compactions = FLAGS_disable_auto_compactions; options.source_compaction_factor = FLAGS_source_compaction_factor; + options.optimize_filters_for_hits = FLAGS_optimize_filters_for_hits; // fill storage options options.allow_os_buffer = FLAGS_bufferedio;