From 0288c91d106fba7908b0256e600d5c812653e5fb Mon Sep 17 00:00:00 2001 From: Levi Tamasi Date: Mon, 11 Oct 2021 20:37:43 -0700 Subject: [PATCH] Add blob_garbage_collection_force_threshold --- tools/run_blob_bench.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/run_blob_bench.sh b/tools/run_blob_bench.sh index 18d82982395..d76766b52c6 100755 --- a/tools/run_blob_bench.sh +++ b/tools/run_blob_bench.sh @@ -52,6 +52,7 @@ function display_usage() { echo -e "\tBLOB_COMPRESSION_TYPE\t\tCompression type for the blob files (default: lz4)" echo -e "\tENABLE_BLOB_GC\t\t\tEnable blob garbage collection (default: 1)" echo -e "\tBLOB_GC_AGE_CUTOFF\t\tBlob garbage collection age cutoff (default: 0.25)" + echo -e "\tBLOB_GC_FORCE_THRESHOLD\t\tThreshold for forcing garbage collection of the oldest blob files (default: 1.0)" echo -e "\tTARGET_FILE_SIZE_BASE\t\tTarget SST file size for compactions (default: write buffer size, scaled down if blob files are enabled)" echo -e "\tMAX_BYTES_FOR_LEVEL_BASE\tMaximum size for the base level (default: 8 * target SST file size)" } @@ -105,6 +106,7 @@ blob_file_size=${BLOB_FILE_SIZE:-$write_buffer_size} blob_compression_type=${BLOB_COMPRESSION_TYPE:-lz4} enable_blob_garbage_collection=${ENABLE_BLOB_GC:-1} blob_garbage_collection_age_cutoff=${BLOB_GC_AGE_CUTOFF:-0.25} +blob_garbage_collection_force_threshold=${BLOB_GC_FORCE_THRESHOLD:-1.0} if [ "$enable_blob_files" == "1" ]; then target_file_size_base=${TARGET_FILE_SIZE_BASE:-$(($write_buffer_size / $value_size * 32))} @@ -131,7 +133,8 @@ echo -e "Blob size threshold:\t\t\t$min_blob_size" echo -e "Blob file size:\t\t\t\t$blob_file_size" echo -e "Compression type for blob files:\t$blob_compression_type" echo -e "Blob GC enabled:\t\t\t$enable_blob_garbage_collection" -echo -e "Blob GC cutoff:\t\t\t\t$blob_garbage_collection_age_cutoff" +echo -e "Blob GC age cutoff:\t\t\t$blob_garbage_collection_age_cutoff" +echo -e "Blob GC force threshold:\t\t$blob_garbage_collection_force_threshold" echo -e "Target SST file size:\t\t\t$target_file_size_base" echo -e "Maximum size of base level:\t\t$max_bytes_for_level_base" echo "=================================================================" @@ -163,7 +166,8 @@ PARAMS="\ PARAMS_GC="$PARAMS \ --enable_blob_garbage_collection=$enable_blob_garbage_collection \ - --blob_garbage_collection_age_cutoff=$blob_garbage_collection_age_cutoff" + --blob_garbage_collection_age_cutoff=$blob_garbage_collection_age_cutoff \ + --blob_garbage_collection_force_threshold=$blob_garbage_collection_force_threshold" # bulk load (using fillrandom) + compact env -u DURATION $ENV_VARS ./tools/benchmark.sh bulkload $PARAMS