From fe754fe7e3f4deb6d7406fe88babba16c321fd76 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Wed, 27 Nov 2013 13:33:14 -0800 Subject: [PATCH] Readrandom with small block cache Summary: Added readrandom benchmark with 300MB block cache, while database has 1GB of data Test Plan: Ran it Reviewers: dhruba, MarkCallaghan Reviewed By: dhruba CC: leveldb Differential Revision: https://reviews.facebook.net/D14373 --- build_tools/regression_build_test.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/build_tools/regression_build_test.sh b/build_tools/regression_build_test.sh index 6ede47466..1c44e5ad2 100755 --- a/build_tools/regression_build_test.sh +++ b/build_tools/regression_build_test.sh @@ -65,7 +65,7 @@ OPT=-DNDEBUG make db_bench -j$(nproc) --sync=0 \ --threads=8 > ${STAT_FILE}.overwrite -# fill up the db for readrandom benchmark +# fill up the db for readrandom benchmark (1GB total size) ./db_bench \ --benchmarks=fillseq \ --db=$DATA_DIR \ @@ -83,7 +83,7 @@ OPT=-DNDEBUG make db_bench -j$(nproc) --sync=0 \ --threads=1 > /dev/null -# measure readrandom +# measure readrandom with 6GB block cache ./db_bench \ --benchmarks=readrandom \ --db=$DATA_DIR \ @@ -102,6 +102,25 @@ OPT=-DNDEBUG make db_bench -j$(nproc) --sync=0 \ --threads=32 > ${STAT_FILE}.readrandom +# measure readrandom with 300MB block cache +./db_bench \ + --benchmarks=readrandom \ + --db=$DATA_DIR \ + --use_existing_db=1 \ + --bloom_bits=10 \ + --num=$NUM \ + --reads=$NUM \ + --cache_size=314572800 \ + --cache_numshardbits=8 \ + --open_files=55000 \ + --disable_seek_compaction=1 \ + --statistics=1 \ + --histogram=1 \ + --disable_data_sync=1 \ + --disable_wal=1 \ + --sync=0 \ + --threads=32 > ${STAT_FILE}.readrandomsmallblockcache + # measure memtable performance -- none of the data gets flushed to disk ./db_bench \ --benchmarks=fillrandom,readrandom, \ @@ -154,5 +173,6 @@ function send_benchmark_to_ods { send_benchmark_to_ods overwrite overwrite $STAT_FILE.overwrite send_benchmark_to_ods fillseq fillseq $STAT_FILE.fillseq send_benchmark_to_ods readrandom readrandom $STAT_FILE.readrandom +send_benchmark_to_ods readrandom readrandom_smallblockcache $STAT_FILE.readrandomsmallblockcache send_benchmark_to_ods fillrandom memtablefillrandom $STAT_FILE.memtablefillreadrandom send_benchmark_to_ods readrandom memtablereadrandom $STAT_FILE.memtablefillreadrandom