db_bench

If you are just getting started with db_bench, here are a few things you can try:

  1. Start with a simple benchmark like fillseq (or fillrandom) to create a database and fill it with some data
  1. ./db_bench --benchmarks="fillseq,stats" --statistics
  1. Read the data back

You can also combine multiple benchmarks to the string that is passed to --benchmarks so that they run sequentially. Example:

  1. ./db_bench --benchmarks="fillseq,readrandom,readseq"

Benchmarks List:

  1. $ ./db_bench -help
  2. db_bench:
  3. USAGE:
  4. ./db_bench [OPTIONS]...
  5. Flags from tools/db_bench_tool.cc:
  6. -advise_random_on_open (Advise random access on table file open) type: bool
  7. default: true
  8. -allow_concurrent_memtable_write (Allow multi-writers to update mem tables
  9. in parallel.) type: bool default: true
  10. -base_background_compactions (The base number of concurrent background
  11. compactions to occur in parallel.) type: int32 default: 1
  12. -batch_size (Batch size) type: int64 default: 1
  13. -benchmark_read_rate_limit (If non-zero, db_bench will rate-limit the reads
  14. from RocksDB. This is the global rate in ops/second.) type: uint64
  15. default: 0
  16. -benchmark_write_rate_limit (If non-zero, db_bench will rate-limit the
  17. writes going into RocksDB. This is the global rate in bytes/second.)
  18. type: uint64 default: 0
  19. -benchmarks (Comma-separated list of operations to run in the specified
  20. order. Available benchmarks:
  21. fillseq -- write N values in sequential key order in async mode
  22. fillseqdeterministic -- write N values in the specified key order
  23. and keep the shape of the LSM tree
  24. fillrandom -- write N values in random key order in async mode
  25. filluniquerandomdeterministic -- write N values in a random key
  26. order and keep the shape of the LSM tree
  27. overwrite -- overwrite N values in random key order in async mode
  28. fillsync -- write N/100 values in random key order in sync mode
  29. fill100K -- write N/1000 100K values in random order in async mode
  30. deleteseq -- delete N keys in sequential order
  31. deleterandom -- delete N keys in random order
  32. readseq -- read N times sequentially
  33. readtocache -- 1 thread reading database sequentially
  34. readreverse -- read N times in reverse order
  35. readrandom -- read N times in random order
  36. readmissing -- read N missing keys in random order
  37. readwhilewriting -- 1 writer, N threads doing random reads
  38. readwhilemerging -- 1 merger, N threads doing random reads
  39. readrandomwriterandom -- N threads doing random-read, random-write
  40. prefixscanrandom -- prefix scan N times in random order
  41. updaterandom -- N threads doing read-modify-write for random keys
  42. appendrandom -- N threads doing read-modify-write with growing values
  43. mergerandom -- same as updaterandom/appendrandom using merge operator.
  44. Must be used with merge_operator
  45. readrandommergerandom -- perform N random read-or-merge operations. Must
  46. be used with merge_operator
  47. newiterator -- repeated iterator creation
  48. seekrandom -- N random seeks, call Next seek_nexts times per seek
  49. seekrandomwhilewriting -- seekrandom and 1 thread doing overwrite
  50. seekrandomwhilemerging -- seekrandom and 1 thread doing merge
  51. crc32c -- repeated crc32c of 4K of data
  52. xxhash -- repeated xxHash of 4K of data
  53. acquireload -- load N*1000 times
  54. fillseekseq -- write N values in sequential key, then read them by
  55. seeking to each key
  56. randomtransaction -- execute N random transactions and verify
  57. correctness
  58. randomreplacekeys -- randomly replaces N keys by deleting the old
  59. version and putting the new version
  60. timeseries -- 1 writer generates time series data and
  61. multiple readers doing random reads on id
  62. Meta operations:
  63. compact -- Compact the entire DB
  64. stats -- Print DB stats
  65. resetstats -- Reset DB stats
  66. levelstats -- Print the number of files and bytes per level
  67. sstables -- Print sstable info
  68. heapprofile -- Dump a heap profile (if supported by this port)
  69. ) type: string
  70. default: "fillseq,fillseqdeterministic,fillsync,fillrandom,filluniquerandomdeterministic,overwrite,readrandom,newiterator,newiteratorwhilewriting,seekrandom,seekrandomwhilewriting,seekrandomwhilemerging,readseq,readreverse,compact,readrandom,multireadrandom,readseq,readtocache,readreverse,readwhilewriting,readwhilemerging,readrandomwriterandom,updaterandom,randomwithverify,fill100K,crc32c,xxhash,compress,uncompress,acquireload,fillseekseq,randomtransaction,randomreplacekeys,timeseries"
  71. -block_restart_interval (Number of keys between restart points for delta
  72. encoding of keys in data block.) type: int32 default: 16
  73. -block_size (Number of bytes in a block.) type: int32 default: 4096
  74. -bloom_bits (Bloom filter bits per key. Negative means use default
  75. settings.) type: int32 default: -1
  76. -bloom_locality (Control bloom filter probes locality) type: int32
  77. default: 0
  78. -bytes_per_sync (Allows OS to incrementally sync SST files to disk while
  79. they are being written, in the background. Issue one request for every
  80. bytes_per_sync written. 0 turns it off.) type: uint64 default: 0
  81. -cache_high_pri_pool_ratio (Ratio of block cache reserve for high pri
  82. blocks. If > 0.0, we also enable
  83. cache_index_and_filter_blocks_with_high_priority.) type: double
  84. default: 0
  85. -cache_index_and_filter_blocks (Cache index/filter blocks in block cache.)
  86. type: bool default: false
  87. -cache_numshardbits (Number of shards for the block cache is 2 **
  88. cache_numshardbits. Negative means use default settings. This is applied
  89. only if FLAGS_cache_size is non-negative.) type: int32 default: 6
  90. -cache_size (Number of bytes to use as a cache of uncompressed data)
  91. type: int64 default: 8388608
  92. -compaction_fadvice (Access pattern advice when a file is compacted)
  93. type: string default: "NORMAL"
  94. -compaction_pri (priority of files to compaction: by size or by data age)
  95. type: int32 default: 0
  96. -compaction_readahead_size (Compaction readahead size) type: int32
  97. default: 0
  98. -compaction_style (style of compaction: level-based, universal and fifo)
  99. type: int32 default: 0
  100. -compressed_cache_size (Number of bytes to use as a cache of compressed
  101. data.) type: int64 default: -1
  102. -compression_level (Compression level. For zlib this should be -1 for the
  103. default level, or between 0 and 9.) type: int32 default: -1
  104. -compression_max_dict_bytes (Maximum size of dictionary used to prime the
  105. compression library.) type: int32 default: 0
  106. -compression_ratio (Arrange to generate values that shrink to this fraction
  107. of their original size after compression) type: double default: 0.5
  108. -compression_type (Algorithm to use to compress the database) type: string
  109. default: "snappy"
  110. -cuckoo_hash_ratio (Hash ratio for Cuckoo SST table.) type: double
  111. default: 0.90000000000000002
  112. -db (Use the db with the following name.) type: string default: ""
  113. -db_write_buffer_size (Number of bytes to buffer in all memtables before
  114. compacting) type: int64 default: 0
  115. -delayed_write_rate (Limited bytes allowed to DB when soft_rate_limit or
  116. level0_slowdown_writes_trigger triggers) type: uint64 default: 8388608
  117. -delete_obsolete_files_period_micros (Ignored. Left here for backward
  118. compatibility) type: uint64 default: 0
  119. -deletepercent (Percentage of deletes out of reads/writes/deletes (used in
  120. RandomWithVerify only). RandomWithVerify calculates writepercent as (100
  121. - FLAGS_readwritepercent - deletepercent), so deletepercent must be
  122. smaller than (100 - FLAGS_readwritepercent)) type: int32 default: 2
  123. -deletes (Number of delete operations to do. If negative, do FLAGS_num
  124. deletions.) type: int64 default: -1
  125. -disable_auto_compactions (Do not auto trigger compactions) type: bool
  126. default: false
  127. -disable_seek_compaction (Not used, left here for backwards compatibility)
  128. type: int32 default: 0
  129. -disable_wal (If true, do not write WAL for write.) type: bool
  130. default: false
  131. -dump_malloc_stats (Dump malloc stats in LOG ) type: bool default: true
  132. -duration (Time in seconds for the random-ops tests to run. When 0 then num
  133. & reads determine the test duration) type: int32 default: 0
  134. -enable_io_prio (Lower the background flush/compaction threads' IO
  135. priority) type: bool default: false
  136. -enable_numa (Make operations aware of NUMA architecture and bind memory
  137. and cpus corresponding to nodes together. In NUMA, memory in same node as
  138. CPUs are closer when compared to memory in other nodes. Reads can be
  139. faster when the process is bound to CPU and memory of same node. Use
  140. "$numactl --hardware" command to see NUMA memory architecture.)
  141. type: bool default: false
  142. -enable_pipelined_write (Allow WAL and memtable writes to be pipelined)
  143. type: bool default: true
  144. -enable_write_thread_adaptive_yield (Use a yielding spin loop for brief
  145. writer thread waits.) type: bool default: true
  146. -env_uri (URI for registry Env lookup. Mutually exclusive with --hdfs.)
  147. type: string default: ""
  148. -expand_range_tombstones (Expand range tombstone into sequential regular
  149. tombstones.) type: bool default: false
  150. -expire_style (Style to remove expired time entries. Can be one of the
  151. options below: none (do not expired data), compaction_filter (use a
  152. compaction filter to remove expired data), delete (seek IDs and remove
  153. expired data) (used in TimeSeries only).) type: string default: "none"
  154. type: bool default: true
  155. sizes to trigger FIFO compaction) type: uint64 default: 0
  156. -file_opening_threads (If open_files is set to -1, this option set the
  157. number of threads that will be used to open files during DB::Open())
  158. type: int32 default: 16
  159. -finish_after_writes (Write thread terminates after all writes are
  160. finished) type: bool default: false
  161. -hard_pending_compaction_bytes_limit (Stop writes if pending compaction
  162. bytes exceed this number) type: uint64 default: 137438953472
  163. -hard_rate_limit (DEPRECATED) type: double default: 0
  164. -hash_bucket_count (hash bucket count) type: int64 default: 1048576
  165. -hdfs (Name of hdfs environment. Mutually exclusive with --env_uri.)
  166. type: string default: ""
  167. -histogram (Print histogram of operation timings) type: bool default: false
  168. -identity_as_first_hash (the first hash function of cuckoo table becomes an
  169. identity function. This is only valid when key is 8 bytes) type: bool
  170. default: false
  171. -index_block_restart_interval (Number of keys between restart points for
  172. delta encoding of keys in index block.) type: int32 default: 1
  173. -key_id_range (Range of possible value of key id (used in TimeSeries
  174. only).) type: int32 default: 100000
  175. -key_size (size of each key) type: int32 default: 16
  176. -keys_per_prefix (control average number of keys generated per prefix, 0
  177. means no special handling of the prefix, i.e. use the prefix comes with
  178. the generated random number.) type: int64 default: 0
  179. -level0_file_num_compaction_trigger (Number of files in level-0 when
  180. compactions start) type: int32 default: 4
  181. -level0_slowdown_writes_trigger (Number of files in level-0 that will slow
  182. down writes.) type: int32 default: 20
  183. -level0_stop_writes_trigger (Number of files in level-0 that will trigger
  184. put stop.) type: int32 default: 36
  185. -level_compaction_dynamic_level_bytes (Whether level size base is dynamic)
  186. type: bool default: false
  187. -max_background_compactions (The maximum number of concurrent background
  188. compactions that can occur in parallel.) type: int32 default: 1
  189. -max_background_flushes (The maximum number of concurrent background
  190. flushes that can occur in parallel.) type: int32 default: 1
  191. -max_bytes_for_level_base (Max bytes for level-1) type: uint64
  192. default: 268435456
  193. -max_bytes_for_level_multiplier (A multiplier to compute max bytes for
  194. level-N (N >= 2)) type: double default: 10
  195. -max_bytes_for_level_multiplier_additional (A vector that specifies
  196. additional fanout per level) type: string default: ""
  197. -max_compaction_bytes (Max bytes allowed in one compaction) type: uint64
  198. default: 0
  199. -max_num_range_tombstones (Maximum number of range tombstones to insert.)
  200. type: int64 default: 0
  201. -max_successive_merges (Maximum number of successive merge operations on a
  202. key in the memtable) type: int32 default: 0
  203. -max_total_wal_size (Set total max WAL size) type: uint64 default: 0
  204. -max_write_buffer_number (The number of in-memory memtables. Each memtable
  205. is of sizewrite_buffer_size.) type: int32 default: 2
  206. -max_write_buffer_number_to_maintain (The total maximum number of write
  207. buffers to maintain in memory including copies of buffers that have
  208. already been flushed. Unlike max_write_buffer_number, this parameter does
  209. not affect flushing. This controls the minimum amount of write history
  210. that will be available in memory for conflict checking when Transactions
  211. are used. If this value is too low, some transactions may fail at commit
  212. time due to not being able to determine whether there were any write
  213. conflicts. Setting this value to 0 will cause write buffers to be freed
  214. immediately after they are flushed. If this value is set to -1,
  215. 'max_write_buffer_number' will be used.) type: int32 default: 0
  216. -memtable_bloom_size_ratio (Ratio of memtable size used for bloom filter. 0
  217. means no bloom filter.) type: double default: 0
  218. -memtable_insert_with_hint_prefix_size (If non-zero, enable memtable insert
  219. with hint with the given prefix size.) type: int32 default: 0
  220. -memtable_use_huge_page (Try to use huge page in memtables.) type: bool
  221. default: false
  222. -memtablerep () type: string default: "skip_list"
  223. -merge_keys (Number of distinct keys to use for MergeRandom and
  224. ReadRandomMergeRandom. If negative, there will be FLAGS_num keys.)
  225. type: int64 default: -1
  226. -merge_operator (The merge operator to use with the database.If a new merge
  227. operator is specified, be sure to use fresh database The possible merge
  228. operators are defined in utilities/merge_operators.h) type: string
  229. default: ""
  230. -mergereadpercent (Ratio of merges to merges&reads (expressed as
  231. percentage) for the ReadRandomMergeRandom workload. The default value 70
  232. means 70% out of all read and merge operations are merges. In other
  233. words, 7 merges for every 3 gets.) type: int32 default: 70
  234. -min_level_to_compress (If non-negative, compression starts from this
  235. level. Levels with number < min_level_to_compress are not compressed.
  236. Otherwise, apply compression_type to all levels.) type: int32 default: -1
  237. -min_write_buffer_number_to_merge (The minimum number of write buffers that
  238. will be merged togetherbefore writing to storage. This is cheap because
  239. it is anin-memory merge. If this feature is not enabled, then all
  240. thesewrite buffers are flushed to L0 as separate files and this increases
  241. read amplification because a get request has to check in all of these
  242. files. Also, an in-memory merge may result in writing less data to
  243. storage if there are duplicate records in each of these individual write
  244. buffers.) type: int32 default: 1
  245. -mmap_read (Allow reads to occur via mmap-ing files) type: bool
  246. default: false
  247. -mmap_write (Allow writes to occur via mmap-ing files) type: bool
  248. default: false
  249. -new_table_reader_for_compaction_inputs (If true, uses a separate file
  250. handle for compaction inputs) type: int32 default: 1
  251. -num (Number of key/values to place in database) type: int64
  252. default: 1000000
  253. -num_column_families (Number of Column Families to use.) type: int32
  254. default: 1
  255. -num_deletion_threads (Number of threads to do deletion (used in TimeSeries
  256. and delete expire_style only).) type: int32 default: 1
  257. -num_hot_column_families (Number of Hot Column Families. If more than 0,
  258. only write to this number of column families. After finishing all the
  259. writes to them, create new set of column families and insert to them.
  260. Only used when num_column_families > 1.) type: int32 default: 0
  261. -num_levels (The total number of levels) type: int32 default: 7
  262. -num_multi_db (Number of DBs used in the benchmark. 0 means single DB.)
  263. type: int32 default: 0
  264. -numdistinct (Number of distinct keys to use. Used in RandomWithVerify to
  265. read/write on fewer keys so that gets are more likely to find the key and
  266. puts are more likely to update the same key) type: int64 default: 1000
  267. -open_files (Maximum number of files to keep open at the same time (use
  268. default if == 0)) type: int32 default: -1
  269. -optimistic_transaction_db (Open a OptimisticTransactionDB instance.
  270. Required for randomtransaction benchmark.) type: bool default: false
  271. -optimize_filters_for_hits (Optimizes bloom filters for workloads for most
  272. lookups return a value. For now this doesn't create bloom filters for the
  273. max level of the LSM to reduce metadata that should fit in RAM. )
  274. type: bool default: false
  275. -options_file (The path to a RocksDB options file. If specified, then
  276. db_bench will run with the RocksDB options in the default column family
  277. of the specified options file. Note that with this setting, db_bench will
  278. ONLY accept the following RocksDB options related command-line arguments,
  279. all other arguments that are related to RocksDB options will be ignored:
  280. --use_existing_db
  281. --statistics
  282. --row_cache_size
  283. --row_cache_numshardbits
  284. --enable_io_prio
  285. --dump_malloc_stats
  286. --num_multi_db
  287. ) type: string default: ""
  288. -perf_level (Level of perf collection) type: int32 default: 1
  289. -pin_l0_filter_and_index_blocks_in_cache (Pin index/filter blocks of L0
  290. files in block cache.) type: bool default: false
  291. -pin_slice (use pinnable slice for point lookup) type: bool default: true
  292. -prefix_size (control the prefix size for HashSkipList and plain table)
  293. type: int32 default: 0
  294. -random_access_max_buffer_size (Maximum windows randomaccess buffer size)
  295. type: int32 default: 1048576
  296. -range_tombstone_width (Number of keys in tombstone's range) type: int64
  297. default: 100
  298. -rate_limit_delay_max_milliseconds (When hard_rate_limit is set then this
  299. is the max time a put will be stalled.) type: int32 default: 1000
  300. -rate_limiter_bytes_per_sec (Set options.rate_limiter value.) type: uint64
  301. default: 0
  302. -read_amp_bytes_per_bit (Number of bytes per bit to be used in block
  303. read-amp bitmap) type: int32 default: 0
  304. -read_cache_direct_read (Whether to use Direct IO for reading from read
  305. cache) type: bool default: true
  306. -read_cache_direct_write (Whether to use Direct IO for writing to the read
  307. cache) type: bool default: true
  308. -read_cache_path (If not empty string, a read cache will be used in this
  309. path) type: string default: ""
  310. -read_cache_size (Maximum size of the read cache) type: int64
  311. default: 4294967296
  312. -read_random_exp_range (Read random's key will be generated using
  313. distribution of num * exp(-r) where r is uniform number from 0 to this
  314. value. The larger the number is, the more skewed the reads are. Only used
  315. -reads (Number of read operations to do. If negative, do FLAGS_num reads.)
  316. type: int64 default: -1
  317. -readwritepercent (Ratio of reads to reads/writes (expressed as percentage)
  318. for the ReadRandomWriteRandom workload. The default value 90 means 90%
  319. operations out of all reads and writes operations are reads. In other
  320. words, 9 gets for every 1 put.) type: int32 default: 90
  321. -report_bg_io_stats (Measure times spents on I/Os while in compactions. )
  322. type: bool default: false
  323. -report_file (Filename where some simple stats are reported to (if
  324. --report_interval_seconds is bigger than 0)) type: string
  325. default: "report.csv"
  326. -report_file_operations (if report number of file operations) type: bool
  327. default: false
  328. -report_interval_seconds (If greater than zero, it will write simple stats
  329. in CVS format to --report_file every N seconds) type: int64 default: 0
  330. -reverse_iterator (When true use Prev rather than Next for iterators that
  331. do Seek and then Next) type: bool default: false
  332. -row_cache_size (Number of bytes to use as a cache of individual rows (0 =
  333. disabled).) type: int64 default: 0
  334. -seed (Seed base for random number generators. When 0 it is deterministic.)
  335. type: int64 default: 0
  336. -seek_nexts (How many times to call Next() after Seek() in fillseekseq,
  337. seekrandom, seekrandomwhilewriting and seekrandomwhilemerging)
  338. type: int32 default: 0
  339. -show_table_properties (If true, then per-level table properties will be
  340. printed on every stats-interval when stats_interval is set and
  341. stats_per_interval is on.) type: bool default: false
  342. -simcache_size (Number of bytes to use as a simcache of uncompressed data.
  343. Nagative value disables simcache.) type: int64 default: -1
  344. -skip_list_lookahead (Used with skip_list memtablerep; try linear search
  345. first for this many steps from the previous position) type: int32
  346. default: 0
  347. -soft_pending_compaction_bytes_limit (Slowdown writes if pending compaction
  348. bytes exceed this number) type: uint64 default: 68719476736
  349. -soft_rate_limit (DEPRECATED) type: double default: 0
  350. -statistics (Database statistics) type: bool default: false
  351. -statistics_string (Serialized statistics string) type: string default: ""
  352. -stats_interval (Stats are reported every N operations when this is greater
  353. than zero. When 0 the interval grows over time.) type: int64 default: 0
  354. -stats_interval_seconds (Report stats every N seconds. This overrides
  355. stats_interval when both are > 0.) type: int64 default: 0
  356. -stats_per_interval (Reports additional stats per interval when this is
  357. greater than 0.) type: int32 default: 0
  358. -stddev (Standard deviation of normal distribution used for picking keys
  359. (used in RandomReplaceKeys only).) type: double default: 2000
  360. -subcompactions (Maximum number of subcompactions to divide L0-L1
  361. compactions into.) type: uint64 default: 1
  362. -sync (Sync all writes to disk) type: bool default: false
  363. -table_cache_numshardbits () type: int32 default: 4
  364. -target_file_size_base (Target file size at level-1) type: int64
  365. default: 67108864
  366. -target_file_size_multiplier (A multiplier to compute target level-N file
  367. size (N >= 2)) type: int32 default: 1
  368. -thread_status_per_interval (Takes and report a snapshot of the current
  369. status of each thread when this is greater than 0.) type: int32
  370. default: 0
  371. -threads (Number of concurrent threads to run.) type: int32 default: 1
  372. -time_range (Range of timestamp that store in the database (used in
  373. TimeSeries only).) type: uint64 default: 100000
  374. -transaction_db (Open a TransactionDB instance. Required for
  375. randomtransaction benchmark.) type: bool default: false
  376. -transaction_lock_timeout (If using a transaction_db, specifies the lock
  377. wait timeout in milliseconds before failing a transaction waiting on a
  378. lock) type: uint64 default: 100
  379. -transaction_set_snapshot (Setting to true will have each transaction call
  380. SetSnapshot() upon creation.) type: bool default: false
  381. -transaction_sets (Number of keys each transaction will modify (use in
  382. RandomTransaction only). Max: 9999) type: uint64 default: 2
  383. -transaction_sleep (Max microseconds to sleep in between reading and
  384. writing a value (used in RandomTransaction only). ) type: int32
  385. default: 0
  386. -truth_db (Truth key/values used when using verify) type: string
  387. default: "/dev/shm/truth_db/dbbench"
  388. -universal_allow_trivial_move (Allow trivial move in universal compaction.)
  389. type: bool default: false
  390. -universal_compression_size_percent (The percentage of the database to
  391. compress for universal compaction. -1 means compress everything.)
  392. type: int32 default: -1
  393. -universal_max_merge_width (The max number of files to compact in universal
  394. style compaction) type: int32 default: 0
  395. -universal_max_size_amplification_percent (The max size amplification for
  396. universal style compaction) type: int32 default: 0
  397. -universal_min_merge_width (The minimum number of files in a single
  398. compaction run (for universal compaction only).) type: int32 default: 0
  399. -universal_size_ratio (Percentage flexibility while comparing file size
  400. (for universal compaction only).) type: int32 default: 0
  401. -use_adaptive_mutex (Use adaptive mutex) type: bool default: false
  402. -use_blob_db (Open a BlobDB instance. Required for largevalue benchmark.)
  403. type: bool default: false
  404. -use_block_based_filter (if use kBlockBasedFilter instead of kFullFilter
  405. for filter block. This is valid if only we use BlockTable) type: bool
  406. default: false
  407. -use_clock_cache (Replace default LRU block cache with clock cache.)
  408. type: bool default: false
  409. -use_cuckoo_table (if use cuckoo table format) type: bool default: false
  410. -use_direct_io_for_flush_and_compaction (Use O_DIRECT for background flush
  411. and compaction I/O) type: bool default: false
  412. -use_direct_reads (Use O_DIRECT for reading data) type: bool default: false
  413. -use_existing_db (If true, do not destroy the existing database. If you
  414. set this flag and also specify a benchmark that wants a fresh database,
  415. that benchmark will fail.) type: bool default: false
  416. -use_fsync (If true, issue fsync instead of fdatasync) type: bool
  417. default: false
  418. -use_hash_search (if use kHashSearch instead of kBinarySearch. This is
  419. valid if only we use BlockTable) type: bool default: false
  420. -use_plain_table (if use plain table instead of block-based table format)
  421. type: bool default: false
  422. -use_single_deletes (Use single deletes (used in RandomReplaceKeys only).)
  423. type: bool default: true
  424. -use_stderr_info_logger (Write info logs to stderr instead of to LOG file.
  425. ) type: bool default: false
  426. -use_tailing_iterator (Use tailing iterator to access a series of keys
  427. instead of get) type: bool default: false
  428. -use_uint64_comparator (use Uint64 user comparator) type: bool
  429. default: false
  430. -value_size (Size of each value) type: int32 default: 100
  431. -verify_checksum (Verify checksum for every block read from storage)
  432. type: bool default: false
  433. -wal_bytes_per_sync (Allows OS to incrementally sync WAL files to disk
  434. while they are being written, in the background. Issue one request for
  435. every wal_bytes_per_sync written. 0 turns it off.) type: uint64
  436. default: 0
  437. -wal_dir (If not empty, use the given dir for WAL) type: string default: ""
  438. -wal_size_limit_MB (Set the size limit for the WAL Files in MB.)
  439. type: uint64 default: 0
  440. -wal_ttl_seconds (Set the TTL for the WAL Files in seconds.) type: uint64
  441. default: 0
  442. -writable_file_max_buffer_size (Maximum write buffer for Writable File)
  443. type: int32 default: 1048576
  444. -write_buffer_size (Number of bytes to buffer in memtable before
  445. compacting) type: int64 default: 67108864
  446. -write_thread_max_yield_usec (Maximum microseconds for
  447. enable_write_thread_adaptive_yield operation.) type: uint64 default: 100
  448. -write_thread_slow_yield_usec (The threshold at which a slow yield is
  449. considered a signal that other processes or threads want the core.)
  450. type: uint64 default: 3
  451. -writes (Number of write operations to do. If negative, do --num reads.)
  452. type: int64 default: -1
  453. -writes_per_range_tombstone (Number of writes between range tombstones)
  454. type: int64 default: 0

cache_bench

persistent_cache_bench

  1. $ ./persistent_cache_bench -help
  2. persistent_cache_bench:
  3. USAGE:
  4. ./persistent_cache_bench [OPTIONS]...
  5. ...
  6. Flags from utilities/persistent_cache/persistent_cache_bench.cc:
  7. -benchmark (Benchmark mode) type: bool default: false
  8. -cache_size (Cache size) type: uint64 default: 18446744073709551615
  9. -cache_type (Cache type. (block_cache, volatile, tiered)) type: string
  10. default: "block_cache"
  11. -enable_pipelined_writes (Enable async writes) type: bool default: false
  12. -iosize (Read IO size) type: int32 default: 4096
  13. -log_path (Path for the log file) type: string default: "/tmp/log"
  14. -nsec (nsec) type: int32 default: 10
  15. -nthread_read (Lookup threads) type: int32 default: 1
  16. -nthread_write (Insert threads) type: int32 default: 1
  17. -path (Path for cachefile) type: string default: "/tmp/microbench/blkcache"
  18. -volatile_cache_pct (Percentage of cache in memory tier.) type: int32
  19. default: 10
  20. -writer_iosize (File writer IO size) type: int32 default: 4096
  21. -writer_qdepth (File writer qdepth) type: int32 default: 1