Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mark Callaghan mdcallag

🎯
Focusing
View GitHub Profile
View gist:702854976ffaf15d424343f30426b1e9
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
View gist:0b3cffc10f01b345e244a44ada0f09a2
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 {
View gist:4d35272769a199fc52598b55e11cae8d
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);
View o3
# 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 Dec 6, 2021
400m rows, 1800 secs
View o.summ.pg
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
View gist:1a805405533a8068ab7e37d52cbcd3f0
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 Dec 1, 2021
r.400mrows.300s.1u.prep0 - o.summ.pg
View 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 Dec 1, 2021
r.10mrows.300s.1u.prep1 - o.summ.pg
View 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 Dec 1, 2021
r.10mrows.300s.1u.prep0 - o.summ.pg
View 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 Dec 1, 2021
r.400mrows.300s.1u.prep0 - o.summ.my
View 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