From b058a33705293aded94bdc5d3cbdce13328adf27 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Tue, 3 Apr 2018 15:20:30 -0700 Subject: [PATCH] Reduce default --nooverwritepercent in black-box crash tests Summary: Previously `python tools/db_crashtest.py blackbox` would do no useful work as the crash interval (two minutes) was shorter than the preparation phase. The preparation phase is slow because of the ridiculously inefficient way it computes which keys should not be overwritten. It was doing this for 60M keys since default values were `FLAGS_nooverwritepercent == 60` and `FLAGS_max_key == 100000000`. Move the "nooverwritepercent" override from whitebox-specific to the general options so it also applies to blackbox test runs. Now preparation phase takes a few seconds. Closes https://github.com/facebook/rocksdb/pull/3671 Differential Revision: D7457732 Pulled By: ajkr fbshipit-source-id: 601f4461a6a7e49e50449dcf15aebc9b8a98d6f0 --- tools/db_crashtest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 6a7222e5b..ae65904ea 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -32,6 +32,7 @@ default_params = { "max_write_buffer_number": 3, "memtablerep": "prefix_hash", "mmap_read": lambda: random.randint(0, 1), + "nooverwritepercent": 1, "open_files": 500000, "prefix_size": 7, "prefixpercent": 5, @@ -76,7 +77,6 @@ blackbox_default_params = { whitebox_default_params = { "duration": 10000, "log2_keys_per_lock": 10, - "nooverwritepercent": 1, "ops_per_thread": 200000, "test_batches_snapshots": lambda: random.randint(0, 1), "write_buffer_size": 4 * 1024 * 1024, @@ -100,6 +100,7 @@ simple_default_params = { "max_write_buffer_number": 3, "memtablerep": "skip_list", "mmap_read": lambda: random.randint(0, 1), + "nooverwritepercent": 1, "prefix_size": 0, "prefixpercent": 0, "progress_reports": 0, @@ -128,7 +129,6 @@ blackbox_simple_default_params = { whitebox_simple_default_params = { "duration": 10000, "log2_keys_per_lock": 10, - "nooverwritepercent": 1, "open_files": 500000, "ops_per_thread": 200000, "write_buffer_size": 32 * 1024 * 1024,