e93f044d99
Summary: as title Test Plan: ran it Reviewers: yhchiang, igor, sdong, MarkCallaghan Reviewed By: MarkCallaghan Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D25563
53 lines
1.6 KiB
Bash
Executable File
53 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
# REQUIRE: benchmark.sh exists in the current directory
|
|
# After execution of this script, log files are generated in $output_dir.
|
|
# report.txt provides a high level statistics
|
|
|
|
# Size constants
|
|
K=1024
|
|
M=$((1024 * K))
|
|
G=$((1024 * M))
|
|
|
|
n=$((1 * G))
|
|
wps=$((80 * K))
|
|
duration=$((12 * 60 * 60))
|
|
num_read_threads=24
|
|
|
|
# Update these parameters before execution !!!
|
|
db_dir="/tmp/rocksdb/"
|
|
wal_dir="/tmp/rocksdb/"
|
|
output_dir="/tmp/output"
|
|
|
|
|
|
# Test 1: bulk load
|
|
OUTPUT_DIR=$output_dir NUM_KEYS=$n DB_DIR=$db_dir WAL_DIR=$wal_dir \
|
|
./benchmark.sh bulkload
|
|
|
|
# Test 2: sequential fill
|
|
OUTPUT_DIR=$output_dir NUM_KEYS=$n DB_DIR=$db_dir WAL_DIR=$wal_dir \
|
|
./benchmark.sh fillseq
|
|
|
|
# Test 3: overwrite
|
|
OUTPUT_DIR=$output_dir NUM_KEYS=$n DB_DIR=$db_dir WAL_DIR=$wal_dir \
|
|
./benchmark.sh overwrite
|
|
|
|
# Prepare: populate DB with random data
|
|
OUTPUT_DIR=$output_dir NUM_KEYS=$n DB_DIR=$db_dir WAL_DIR=$wal_dir \
|
|
./benchmark.sh filluniquerandom
|
|
|
|
# Test 4: random read
|
|
OUTPUT_DIR=$output_dir NUM_KEYS=$n DB_DIR=$db_dir WAL_DIR=$wal_dir \
|
|
DURATION=$duration NUM_READ_THREADS=$num_read_threads \
|
|
./benchmark.sh readrandom
|
|
|
|
# Test 5: random read while writing
|
|
OUTPUT_DIR=$output_dir NUM_KEYS=$n DB_DIR=$db_dir WAL_DIR=$wal_dir \
|
|
DURATION=$duration NUM_READ_THREADS=$num_read_threads WRITES_PER_SECOND=$wps \
|
|
./benchmark.sh readwhilewriting
|
|
|
|
# Test 6: random seek + next()'s while writing
|
|
OUTPUT_DIR=$output_dir NUM_KEYS=$n DB_DIR=$db_dir WAL_DIR=$wal_dir \
|
|
DURATION=$duration NUM_READ_THREADS=$num_read_threads WRITES_PER_SECOND=$wps \
|
|
NUM_NEXTS_PER_SEEK=10 \
|
|
./benchmark.sh rangescanwhilewriting
|