diff --git a/tools/benchmark.sh b/tools/benchmark.sh index cc9042c23..8aef4bd92 100755 --- a/tools/benchmark.sh +++ b/tools/benchmark.sh @@ -46,6 +46,7 @@ duration=${DURATION:-0} num_keys=${NUM_KEYS:-$((1 * G))} key_size=20 value_size=${VALUE_SIZE:-400} +block_size=${BLOCK_SIZE:-4096} const_params=" --db=$DB_DIR \ @@ -56,12 +57,14 @@ const_params=" --num_levels=6 \ --key_size=$key_size \ --value_size=$value_size \ - --block_size=4096 \ + --block_size=$block_size \ --cache_size=$cache_size \ --cache_numshardbits=6 \ --compression_type=zlib \ --min_level_to_compress=3 \ --compression_ratio=0.5 \ + --level_compaction_dynamic_level_bytes=true \ + --bytes_per_sync=$((2 * M)) \ \ --hard_rate_limit=3 \ --rate_limit_delay_max_milliseconds=1000000 \ @@ -163,10 +166,10 @@ function run_fillseq { --threads=1 \ --memtablerep=vector \ --disable_wal=1 \ - 2>&1 | tee -a $output_dir/benchmark_fillseq.log" - echo $cmd | tee $output_dir/benchmark_fillseq.log + 2>&1 | tee -a $output_dir/benchmark_fillseq.v${value_size}.log" + echo $cmd | tee $output_dir/benchmark_fillseq.v${value_size}.log eval $cmd - summarize_result $output_dir/benchmark_fillseq.log fillseq fillseq + summarize_result $output_dir/benchmark_fillseq.v${value_size}.log fillseq.v${value_size} fillseq } function run_change { diff --git a/tools/run_flash_bench.sh b/tools/run_flash_bench.sh index 6e288c653..558a0fcfa 100755 --- a/tools/run_flash_bench.sh +++ b/tools/run_flash_bench.sh @@ -37,6 +37,7 @@ # You can estimate the size of the test database from this, # NKEYS and the compression rate (--compression_ratio) set # in tools/benchmark.sh +# BLOCK_LENGTH - value for db_bench --block_size # CACHE_BYTES - the size of the RocksDB block cache in bytes # DATA_DIR - directory in which to create database files # LOG_DIR - directory in which to create WAL files, may be the same @@ -61,6 +62,7 @@ duration=${NSECONDS:-$((60 * 60))} nps=${RANGE_LIMIT:-10} vs=${VAL_SIZE:-400} cs=${CACHE_BYTES:-$(( 1 * G ))} +bs=${BLOCK_LENGTH:-4096} # If no command line arguments then run for 24 threads. if [[ $# -eq 0 ]]; then @@ -88,6 +90,7 @@ NUM_KEYS=$num_keys \ DB_DIR=$db_dir \ WAL_DIR=$wal_dir \ VALUE_SIZE=$vs \ +BLOCK_SIZE=$bs \ CACHE_SIZE=$cs" mkdir -p $output_dir @@ -109,7 +112,12 @@ if [[ $do_setup != 0 ]]; then # Test 1: bulk load env $ARGS ./tools/benchmark.sh bulkload - # Test 2: sequential fill + # Test 2a: sequential fill with large values to get peak ingest + # adjust NUM_KEYS given the use of larger values + env $ARGS BLOCK_SIZE=$((1 * M)) VALUE_SIZE=$((32 * K)) NUM_KEYS=$(( num_keys / 64 )) \ + ./tools/benchmark.sh fillseq + + # Test 2b: sequential fill with the configured value size env $ARGS ./tools/benchmark.sh fillseq # Test 3: single-threaded overwrite