Skip to content

Commit

Permalink
Add blob_garbage_collection_force_threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
ltamasi committed Oct 12, 2021
1 parent c5dc17d commit 0288c91
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/run_blob_bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
}
Expand Down Expand Up @@ -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))}
Expand All @@ -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 "================================================================="
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0288c91

Please sign in to comment.