Skip to content

Instantly share code, notes, and snippets.

@mdcallag
Created April 3, 2022 14:31
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/c614e4d8d3fce7e05504d9408d31c510 to your computer and use it in GitHub Desktop.
Save mdcallag/c614e4d8d3fce7e05504d9408d31c510 to your computer and use it in GitHub Desktop.
Basic fillseq with small write buffer and small L1 to get more levels with less data. Dynamic leveled compaction disabled. All trivial move after L0.
# This is a best case for trivial move
# * writes into L0 (memtable flush) can't use trivial move because you have to write once
# * compaction for all levels (Ln->Ln+1 where n >= 0) is trivial move
#
# In this case dynamic leveled compaction is disabled. Compare the LSM tree shape here with the previous test
# where it was enabled.
M1=$(( 1024 * 1024 )); ./db_bench --benchmarks=fillseq,stats \
--db_write_buffer_size=$(( $M1 * 8 )) \
--target_file_size_base=$(( $M1 * 8 )) \
--max_bytes_for_level_base=$(( $M1 * 32 )) \
--level0_file_num_compaction_trigger=4 \
--level0_slowdown_writes_trigger=20 \
--level0_stop_writes_trigger=30 \
--level_compaction_dynamic_level_bytes=false \
--num=$(( $M1 * 16 ))
Set seed to 1648994660674521 because --seed was 0
Initializing RocksDB Options from the specified file
Initializing RocksDB Options from command-line flags
RocksDB: version 7.1
Date: Sun Apr 3 07:04:20 2022
CPU: 32 * Intel Xeon Processor (Skylake)
CPUCache: 16384 KB
Keys: 16 bytes each (+ 0 bytes user-defined timestamp)
Values: 100 bytes each (50 bytes after compression)
Entries: 16777216
Prefix: 0 bytes
Keys per prefix: 0
RawSize: 1856.0 MB (estimated)
FileSize: 1056.0 MB (estimated)
Write rate: 0 bytes/second
Read rate: 0 ops/second
Compression: Snappy
Compression sampling rate: 0
Memtablerep: SkipListFactory
Perf Level: 1
------------------------------------------------
Initializing RocksDB Options from the specified file
Initializing RocksDB Options from command-line flags
DB path: [/tmp/rocksdbtest-2260/dbbench]
fillseq : 4.049 micros/op 247004 ops/sec; 27.3 MB/s
** Compaction Stats [default] **
Level Files Size Score Read(GB) Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) Moved(GB) W-Amp Rd(MB/s) Wr(MB/s) Comp(sec) CompMergeCPU(sec) Comp(cnt) Avg(sec) KeyIn KeyDrop Rblob(GB) Wblob(GB)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
L0 3/0 8.37 MB 0.8 0.0 0.0 0.0 1.1 1.1 0.0 1.0 0.0 70.4 15.32 9.78 387 0.040 0 0 0.0 0.0
L1 11/0 30.72 MB 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.00 0.00 0 0.000 0 0 0.0 0.0
L2 114/0 318.35 MB 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.00 0.00 0 0.000 0 0 0.0 0.0
L3 259/0 721.87 MB 0.2 0.0 0.0 0.0 0.0 0.0 0.7 0.0 0.0 0.0 0.00 0.00 0 0.000 0 0 0.0 0.0
Sum 387/0 1.05 GB 0.0 0.0 0.0 0.0 1.1 1.1 2.8 1.0 0.0 70.4 15.32 9.78 387 0.040 0 0 0.0 0.0
Int 0/0 0.00 KB 0.0 0.0 0.0 0.0 1.0 1.0 2.7 1.0 0.0 70.7 14.68 9.39 372 0.039 0 0 0.0 0.0
** Compaction Stats [default] **
Priority Files Size Score Read(GB) Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) Moved(GB) W-Amp Rd(MB/s) Wr(MB/s) Comp(sec) CompMergeCPU(sec) Comp(cnt) Avg(sec) KeyIn KeyDrop Rblob(GB) Wblob(GB)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
High 0/0 0.00 KB 0.0 0.0 0.0 0.0 1.1 1.1 0.0 0.0 0.0 70.4 15.32 9.78 387 0.040 0 0 0.0 0.0
Blob file count: 0, total size: 0.0 GB, garbage size: 0.0 GB, space amp: 0.0
Uptime(secs): 67.9 total, 64.9 interval
Flush(GB): cumulative 1.054, interval 1.013
AddFile(GB): cumulative 0.000, interval 0.000
AddFile(Total Files): cumulative 0, interval 0
AddFile(L0 Files): cumulative 0, interval 0
AddFile(Keys): cumulative 0, interval 0
Cumulative compaction: 1.05 GB write, 15.89 MB/s write, 0.00 GB read, 0.00 MB/s read, 15.3 seconds
Interval compaction: 1.01 GB write, 15.98 MB/s write, 0.00 GB read, 0.00 MB/s read, 14.7 seconds
Stalls(count): 0 level0_slowdown, 0 level0_slowdown_with_compaction, 0 level0_numfiles, 0 level0_numfiles_with_compaction, 0 stop for pending_compaction_bytes, 0 slowdown for pending_compaction_bytes, 1 memtable_compaction, 0 memtable_slowdown, interval 1 total count
Block cache LRUCache@0x7fc9f6229290#2325605 capacity: 8.00 MB collections: 1 last_copies: 1 last_secs: 9.5e-05 secs_since: 67
Block cache entry stats(count,size,portion): WriteBuffer(1,256.00 KB,3.125%) Misc(1,0.00 KB,0%)
** File Read Latency Histogram By Level [default] **
** DB Stats **
Uptime(secs): 67.9 total, 64.9 interval
Cumulative writes: 16M writes, 16M keys, 16M commit groups, 1.0 writes per commit group, ingest: 2.05 GB, 30.85 MB/s
Cumulative WAL: 16M writes, 0 syncs, 16777216.00 writes per sync, written: 2.05 GB, 30.85 MB/s
Cumulative stall: 00:00:0.068 H:M:S, 0.1 percent
Interval writes: 16M writes, 16M keys, 16M commit groups, 1.0 writes per commit group, ingest: 2009.86 MB, 30.96 MB/s
Interval WAL: 16M writes, 0 syncs, 16087755.00 writes per sync, written: 1.96 GB, 30.96 MB/s
Interval stall: 00:00:0.068 H:M:S, 0.1 percent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment