Skip to content

Instantly share code, notes, and snippets.

@mdcallag
Last active June 23, 2017 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdcallag/56253a09d8278d582e60e575e1320c91 to your computer and use it in GitHub Desktop.
Save mdcallag/56253a09d8278d582e60e575e1320c91 to your computer and use it in GitHub Desktop.
rw1.sh - to setup database
./db_bench --benchmarks=fillseq --num=$1 --db=./ldb --statistics=$3 --stats_per_interval=0 --stats_interval_seconds=10 --cache_size=10737418240 --disable_wal=1 --compression_type=none --threads=1 --level_compaction_dynamic_level_bytes=1 --max_background_compactions=8 --max_background_flushes=3 --max_write_buffer_number=4 --write_buffer_size=33554432 --bytes_per_sync=4194304 --max_bytes_for_level_base=134217728 --memtablerep=$2
./db_bench --benchmarks=overwrite --num=$1 --db=./ldb --statistics=$3 --stats_per_interval=0 --stats_interval_seconds=10 --cache_size=10737418240 --disable_wal=1 --compression_type=none --threads=1 --level_compaction_dynamic_level_bytes=1 --max_background_compactions=8 --max_background_flushes=3 --max_write_buffer_number=4 --write_buffer_size=33554432 --bytes_per_sync=4194304 --max_bytes_for_level_base=134217728 --memtablerep=$2 --use_existing_db=1 --duration=60
rw2.sh - to run readwhilewriting QPS
./db_bench --benchmarks=readwhilewriting --num=$1 --db=./ldb --statistics=$3 --stats_per_interval=0 --stats_interval_seconds=10 --cache_size=10737418240 --disable_wal=1 --compression_type=none --level_compaction_dynamic_level_bytes=1 --max_background_compactions=8 --max_background_flushes=3 --max_write_buffer_number=4 --write_buffer_size=33554432 --bytes_per_sync=4194304 --max_bytes_for_level_base=134217728 --memtablerep=$2 --use_existing_db=1 --threads=$4 --duration=120 --benchmark_write_rate_limit=5000
rw_all.sh - to run a sequence of rw2.sh tests after rw1.sh has been run
for bin in sse sse-pc ; do
rm -f db_bench
ln -s db_bench.$bin db_bench
for stats in 0 1 ; do
for dop in 1 20 ; do
rm -rf ldb; cp -r ldb.bak ldb; sleep 20
echo run for $bin with stats $stats and dop $dop
bash rw2.sh 100000000 skip_list $stats $dop >& o.${bin}.stats${stats}.dop${dop}
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment