Skip to content

Instantly share code, notes, and snippets.

View mdcallag's full-sized avatar
🎯
Focusing

Mark Callaghan mdcallag

🎯
Focusing
View GitHub Profile
v6.0.2
16.83% db_bench db_bench.v6.0.2 [.] rocksdb::IndexBlockIter::Seek
14.69% db_bench db_bench.v6.0.2 [.] rocksdb::DataBlockIter::Seek
11.14% db_bench db_bench.v6.0.2 [.] rocksdb::LRUHandleTable::FindPointer
6.67% db_bench libc-2.31.so [.] __memcmp_avx2_movbe
3.98% db_bench db_bench.v6.0.2 [.] rocksdb::Block::NewIterator<rocksdb::DataBlockIter>
3.66% db_bench db_bench.v6.0.2 [.] rocksdb::LRUCacheShard::Lookup
3.51% db_bench db_bench.v6.0.2 [.] rocksdb::(anonymous namespace)::FullFilterBitsReader::MayMatch
3.13% db_bench db_bench.v6.0.2 [.] rocksdb::(anonymous namespace)::BytewiseComparatorImpl::Compare
2.94% db_bench libpthread-2.31.so [.] __pthread_mutex_unlock
diff tools/db_bench_tool.cc db_bench_tool.cc.fillseq
--- tools/db_bench_tool.cc 2022-02-15 10:42:01.071748970 -0800
+++ db_bench_tool.cc.fillseq 2022-02-14 14:33:55.101778301 -0800
@@ -3115,6 +3115,7 @@
if (port::kLittleEndian) {
for (int i = 0; i < bytes_to_fill; ++i) {
pos[i] = (prefix >> ((bytes_to_fill - i - 1) << 3)) & 0xFF;
+ printf("shift %d for i=%d to %ld\n", ((bytes_to_fill - i - 1) << 3), i, (prefix >> ((bytes_to_fill - i - 1) << 3)));
}
} else {
diff --git a/db/version_set.cc b/db/version_set.cc
index 5d9adf4b3..dc7f58695 100644
--- a/db/version_set.cc
+++ b/db/version_set.cc
@@ -3721,11 +3721,40 @@ void VersionStorageInfo::CalculateBaseBytes(const ImmutableOptions& ioptions,
l0_size += f->fd.GetFileSize();
}
- uint64_t base_bytes_max =
- std::max(options.max_bytes_for_level_base, l0_size);
@mdcallag
mdcallag / o3
Created December 17, 2021 20:08
# ops_sec - operations per second
# mb_sec - ops_sec * size-of-operation-in-MB
# db_size - database size
# c_wgb - GB written by compaction
# w_amp - Write-amplification as (bytes written by compaction / bytes written by memtable flush)
# c_mbps - Average write rate for compaction
# c_secs - Wall clock seconds doing compaction
# usec_op - Microseconds per operation
# p50, p99, p99.9, p99.99 - 50th, 99th, 99.9th, 99.99th percentile response time in usecs
# pmax - max response time in usecs
@mdcallag
mdcallag / o.summ.pg
Created December 6, 2021 19:20
400m rows, 1800 secs
point-query.warm.range100.pk1
--- absolute
cpu/o r/o rKB/o wKB/o o/s dbms
0.000362 0.003 0.248 1.33 74892 x.pg124.x5.pk1
0.000343 0.003 0.311 1.22 84139 x.pg134.x5.pk1
0.000326 0.003 0.322 1.223 84370 x.pg140.x5.pk1
--- relative to first result
0.95 1.00 1.25 0.92 1.12 x.pg134.x5.pk1
0.90 1.00 1.30 0.92 1.13 x.pg140.x5.pk1
db_1 = x.pg124.x5.pk1
db_2 = x.pg134.x5.pk1
db_3 = x.pg140.x5.pk1
db_1 db_2 db_3
1.00 1.12 1.13 point-query.warm.range100.pk1
1.00 0.99 1.05 point-query.pre.range100.pk1
1.00 1.00 1.02 random-points.pre.range10.pk1
1.00 1.00 1.02 random-points.pre.range100.pk1
1.00 1.00 1.00 random-points.pre.range1000.pk1
@mdcallag
mdcallag / o.summ.pg
Created December 1, 2021 01:07
r.400mrows.300s.1u.prep0 - o.summ.pg
point-query.warm.range100.pk1
--- absolute
cpu/o r/o rKB/o wKB/o o/s dbms
0.000361 0.003 0.248 1.33 75046 x.pg124.x5.pk1
0.000343 0.003 0.31 1.219 83857 x.pg134.x5.pk1
0.000325 0.003 0.325 1.222 84459 x.pg140.x5.pk1
--- relative to first result
0.95 1.00 1.25 0.92 1.12 x.pg134.x5.pk1
0.90 1.00 1.31 0.92 1.13 x.pg140.x5.pk1
@mdcallag
mdcallag / o.summ.pg
Created December 1, 2021 01:06
r.10mrows.300s.1u.prep1 - o.summ.pg
point-query.warm.range100.pk1
--- absolute
cpu/o r/o rKB/o wKB/o o/s dbms
0.000326 0 0 0.881 84033 x.pg124.x5.pk1
0.000310 0 0 0.868 89285 x.pg134.x5.pk1
0.000295 0 0 0.848 88495 x.pg140.x5.pk1
--- relative to first result
0.95 1 1 0.99 1.06 x.pg134.x5.pk1
0.90 1 1 0.96 1.05 x.pg140.x5.pk1
@mdcallag
mdcallag / o.summ.pg
Created December 1, 2021 01:06
r.10mrows.300s.1u.prep0 - o.summ.pg
point-query.warm.range100.pk1
--- absolute
cpu/o r/o rKB/o wKB/o o/s dbms
0.000327 0 0 0.875 84033 x.pg124.x5.pk1
0.000310 0 0 0.851 89285 x.pg134.x5.pk1
0.000296 0 0 0.848 88495 x.pg140.x5.pk1
--- relative to first result
0.95 1 1 0.97 1.06 x.pg134.x5.pk1
0.91 1 1 0.97 1.05 x.pg140.x5.pk1
@mdcallag
mdcallag / o.summ.my
Created December 1, 2021 01:05
r.400mrows.300s.1u.prep0 - o.summ.my
point-query.warm.range100.pk1
--- absolute
cpu/o r/o rKB/o wKB/o o/s dbms
0.000320 0.013 0.314 1.271 66856 x.my5649.y8.pk1
0.000312 0.013 0.317 1.247 69601 x.my5735.y8.pk1
0.000497 0.013 0.317 1.235 57413 x.my8020.y8.pk1
0.000421 0.013 0.317 1.236 54149 x.my8022.y8.pk1
0.000427 0.013 0.317 1.236 53490 x.my8023.y8.pk1
0.000412 0.013 0.317 1.235 57151 x.my8026.y8.pk1
0.000495 0.014 0.334 1.259 58539 x.my8027.y8.pk1