Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: add microbenchmark demonstrating latchless MVCC GC improvement
This commit adds a couple simple microbenchmarks that demonstrate the improvement in the level of foreground traffic disruption caused by MVCC GC after #83213. Results: ``` > benchdiff --old=beforeLatchlessGC --new=latchlessMVCCGC --post-checkout='make buildshort' ./pkg/kv/kvserver --run=MVCCGCWithForegroundTraffic --count=20; pkg=1/1 iter=10/10 cockroachdb/cockroach/pkg/kv/kvserver - name old time/op new time/op delta MVCCGCWithForegroundTraffic/gc_with_reads-24 1.67ms ±18% 0.02ms ± 6% -98.74% (p=0.000 n=10+10) MVCCGCWithForegroundTraffic/gc_with_reads_and_writes-24 1.10ms ±19% 0.57ms ± 4% -48.45% (p=0.000 n=10+10) MVCCGCWithForegroundTraffic/noop_gc_with_reads-24 12.3µs ± 2% 7.3µs ± 1% -40.33% (p=0.000 n=10+9) name old alloc/op new alloc/op delta MVCCGCWithForegroundTraffic/gc_with_reads-24 17.3kB ±11% 1.7kB ± 4% -90.44% (p=0.000 n=10+10) MVCCGCWithForegroundTraffic/gc_with_reads_and_writes-24 37.5kB ± 5% 24.4kB ± 3% -34.92% (p=0.000 n=10+10) MVCCGCWithForegroundTraffic/noop_gc_with_reads-24 1.26kB ± 0% 1.25kB ± 1% -0.43% (p=0.001 n=10+10) name old allocs/op new allocs/op delta MVCCGCWithForegroundTraffic/gc_with_reads-24 111 ± 1% 32 ± 0% -71.08% (p=0.000 n=9+10) MVCCGCWithForegroundTraffic/gc_with_reads_and_writes-24 190 ± 7% 128 ± 2% -32.37% (p=0.000 n=10+9) MVCCGCWithForegroundTraffic/noop_gc_with_reads-24 15.0 ± 0% 15.0 ± 0% ~ (all equal) ``` Release note: None
- Loading branch information