rocksdb/tools
Zhichao Cao 8ea087ad16 Workload generator (Mixgraph) based on prefix hotness (#5953)
Summary:
In the previous PR https://github.com/facebook/rocksdb/issues/4788, user can use db_bench mix_graph option to generate the workload that is from the social graph. The key is generated based on the key access hotness. In this PR, user can further model the key-range hotness and fit those to two-term-exponential distribution. First, user cuts the whole key space into small key ranges (e.g., key-ranges are the same size and the key-range number is the number of SST files). Then, user calculates the average access count per key of each key-range as the key-range hotness. Next, user fits the key-range hotness to two-term-exponential distribution (f(x) = f(x) = a*exp(b*x) + c*exp(d*x)) and generate the value of a, b, c, and d. They are the parameters in db_bench: prefix_dist_a, prefix_dist_b, prefix_dist_c, and prefix_dist_d. Finally, user can run db_bench by specify the parameters.
For example:
`./db_bench --benchmarks="mixgraph" -use_direct_io_for_flush_and_compaction=true -use_direct_reads=true -cache_size=268435456 -key_dist_a=0.002312 -key_dist_b=0.3467 -keyrange_dist_a=14.18 -keyrange_dist_b=-2.917 -keyrange_dist_c=0.0164 -keyrange_dist_d=-0.08082 -keyrange_num=30 -value_k=0.2615 -value_sigma=25.45 -iter_k=2.517 -iter_sigma=14.236 -mix_get_ratio=0.85 -mix_put_ratio=0.14 -mix_seek_ratio=0.01 -sine_mix_rate_interval_milliseconds=5000 -sine_a=350 -sine_b=0.0105 -sine_d=50000 --perf_level=2 -reads=1000000 -num=5000000 -key_size=48`
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5953

Test Plan: run db_bench with different parameters and checked the results.

Differential Revision: D18053527

Pulled By: zhichao-cao

fbshipit-source-id: 171f8b3142bd76462f1967c58345ad7e4f84bab7
2019-11-06 13:02:20 -08:00
..
advisor Rules Advisor: some fixes to support fetching stats from ODS (#4223) 2018-08-02 15:42:42 -07:00
block_cache_analyzer Fix a compile error (#5864) 2019-09-30 14:02:19 -07:00
dump simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
rdb Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
analyze_txn_stress_test.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
auto_sanity_test.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
benchmark_leveldb.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
benchmark.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
blob_dump.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
check_format_compatible.sh Revert "Disable pre-5.5 versions in the format compatibility test (#5990)" (#5999) 2019-11-01 15:57:15 -07:00
CMakeLists.txt cmake support for linux and osx (#1358) 2016-09-28 11:53:15 -07:00
db_bench_tool_test.cc Refactor trimming logic for immutable memtables (#5022) 2019-08-23 13:55:34 -07:00
db_bench_tool.cc Workload generator (Mixgraph) based on prefix hotness (#5953) 2019-11-06 13:02:20 -08:00
db_bench.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
db_crashtest.py crash_test: disable periodic compaction in FIFO compaction. (#5993) 2019-10-31 17:28:03 -07:00
db_repl_stress.cc Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
db_sanity_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
db_stress_tool.cc Enable write-conflict snapshot in stress tests (#5897) 2019-11-06 11:13:22 -08:00
db_stress.cc Expose db stress tests (#5937) 2019-10-18 09:46:44 -07:00
dbench_monitor Fix /bin/bash shebangs 2017-08-03 15:56:46 -07:00
Dockerfile adding docker build script and dockerfile 2015-05-22 16:03:39 -07:00
generate_random_db.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
ingest_external_sst.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
ldb_cmd_impl.h Support custom env in sst_dump (#5845) 2019-10-08 19:19:12 -07:00
ldb_cmd_test.cc Support custom env in sst_dump (#5845) 2019-10-08 19:19:12 -07:00
ldb_cmd.cc Support decoding blob indexes in sst_dump (#5926) 2019-10-17 19:36:54 -07:00
ldb_test.py Support custom env in sst_dump (#5845) 2019-10-08 19:19:12 -07:00
ldb_tool.cc Support custom env in sst_dump (#5845) 2019-10-08 19:19:12 -07:00
ldb.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
pflag Fix /bin/bash shebangs 2017-08-03 15:56:46 -07:00
reduce_levels_test.cc Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
regression_test.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
report_lite_binary_size.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
rocksdb_dump_test.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
run_flash_bench.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
run_leveldb.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
sample-dump.dmp First version of rocksdb_dump and rocksdb_undump. 2015-06-19 16:24:36 -07:00
sst_dump_test.cc Support custom env in sst_dump (#5845) 2019-10-08 19:19:12 -07:00
sst_dump_tool_imp.h Support decoding blob indexes in sst_dump (#5926) 2019-10-17 19:36:54 -07:00
sst_dump_tool.cc Fix PlainTableReader not to crash sst_dump (#5940) 2019-10-18 14:44:42 -07:00
sst_dump.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
trace_analyzer_test.cc Divide file_reader_writer.h and .cc (#5803) 2019-09-16 10:33:51 -07:00
trace_analyzer_tool.cc Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
trace_analyzer_tool.h Move util/trace_replay.* to trace_replay/ (#5376) 2019-06-03 13:25:26 -07:00
trace_analyzer.cc RocksDB Trace Analyzer (#4091) 2018-08-13 11:44:02 -07:00
verify_random_db.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
write_external_sst.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
write_stress_runner.py Fix interpreter lines for files with python2-only syntax. 2019-07-09 10:51:37 -07:00
write_stress.cc Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00