Skip to content

Commit 8de151b

Browse files
committed
Add db_bench with lots of column families to regression tests
Summary: That way we can see when this graph goes up and be happy. Couple of changes: 1. title 2. fix db_bench to delete column families before deleting the DB. this was asserting when compiled in debug mode 3. don't sync manifest when disableDataSync. We discussed this offline. I can move it to separate diff if you'd like Test Plan: ran it Reviewers: sdong, yhchiang, ljin Reviewed By: ljin Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D22815
1 parent c9e419c commit 8de151b

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

HISTORY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Rocksdb Change Log
22

3-
### Unreleased
3+
## Unreleased
44

55
----- Past Releases -----
66

build_tools/regression_build_test.sh

+34
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,38 @@ common_in_mem_args="--db=/dev/shm/rocksdb \
344344
--threads=32 \
345345
--writes_per_second=81920 > ${STAT_FILE}.seekwhilewriting_in_ram
346346

347+
# measure fillseq with bunch of column families
348+
./db_bench \
349+
--benchmarks=fillseq \
350+
--num_column_families=500 \
351+
--write_buffer_size=1048576 \
352+
--db=$DATA_DIR \
353+
--use_existing_db=0 \
354+
--num=$NUM \
355+
--writes=$NUM \
356+
--open_files=55000 \
357+
--statistics=1 \
358+
--histogram=1 \
359+
--disable_data_sync=1 \
360+
--disable_wal=1 \
361+
--sync=0 > ${STAT_FILE}.fillseq_lots_column_families
362+
363+
# measure overwrite performance with bunch of column families
364+
./db_bench \
365+
--benchmarks=overwrite \
366+
--num_column_families=500 \
367+
--write_buffer_size=1048576 \
368+
--db=$DATA_DIR \
369+
--use_existing_db=1 \
370+
--num=$NUM \
371+
--writes=$((NUM / 10)) \
372+
--open_files=55000 \
373+
--statistics=1 \
374+
--histogram=1 \
375+
--disable_data_sync=1 \
376+
--disable_wal=1 \
377+
--sync=0 \
378+
--threads=8 > ${STAT_FILE}.overwrite_lots_column_families
347379

348380
# send data to ods
349381
function send_to_ods {
@@ -392,3 +424,5 @@ send_benchmark_to_ods readrandom memtablereadrandom $STAT_FILE.memtablefillreadr
392424
send_benchmark_to_ods readwhilewriting readwhilewriting $STAT_FILE.readwhilewriting
393425
send_benchmark_to_ods readwhilewriting readwhilewriting_in_ram ${STAT_FILE}.readwhilewriting_in_ram
394426
send_benchmark_to_ods seekrandomwhilewriting seekwhilewriting_in_ram ${STAT_FILE}.seekwhilewriting_in_ram
427+
send_benchmark_to_ods fillseq fillseq_lots_column_families ${STAT_FILE}.fillseq_lots_column_families
428+
send_benchmark_to_ods overwrite overwrite_lots_column_families ${STAT_FILE}.overwrite_lots_column_families

db/db_bench.cc

+4
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,8 @@ class Benchmark {
11101110
}
11111111

11121112
~Benchmark() {
1113+
std::for_each(db_.cfh.begin(), db_.cfh.end(),
1114+
[](ColumnFamilyHandle* cfh) { delete cfh; });
11131115
delete db_.db;
11141116
delete prefix_extractor_;
11151117
}
@@ -1334,6 +1336,8 @@ class Benchmark {
13341336
method = nullptr;
13351337
} else {
13361338
if (db_.db != nullptr) {
1339+
std::for_each(db_.cfh.begin(), db_.cfh.end(),
1340+
[](ColumnFamilyHandle* cfh) { delete cfh; });
13371341
delete db_.db;
13381342
db_.db = nullptr;
13391343
db_.cfh.clear();

0 commit comments

Comments
 (0)