Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: add gc benchmark with multiple range tombstones #87417

Closed
aliher1911 opened this issue Sep 6, 2022 · 2 comments · Fixed by #88252
Closed

storage: add gc benchmark with multiple range tombstones #87417

aliher1911 opened this issue Sep 6, 2022 · 2 comments · Fixed by #88252
Assignees
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@aliher1911
Copy link
Contributor

aliher1911 commented Sep 6, 2022

Currently we only have a bench which adds a single range tombstone to minimally measure regression in performance.
We need a better coverage if we want to enable mvcc range keys for everyone.

Benchmark should add N range tombstones and make only some of them cover measured GC requests. For example N keys should be spread across the full range of versions, not only bottom N point keys as that would be non-representative.

Jira issue: CRDB-19336

Epic CRDB-2624

@aliher1911 aliher1911 added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-kv-replication Relating to Raft, consensus, and coordination. T-kv-replication labels Sep 6, 2022
@aliher1911 aliher1911 self-assigned this Sep 6, 2022
@blathers-crl
Copy link

blathers-crl bot commented Sep 6, 2022

cc @cockroachdb/replication

@aliher1911
Copy link
Contributor Author

Bench results for ref:

goos: linux                                                                                                                                                                                                                                                                                                           [0/1825]
goarch: amd64
cpu: AMD Ryzen 7 3700X 8-Core Processor
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=2/deleteVersions=1/numRangeTs=0/updateStats=false-16             233050              4654 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=2/deleteVersions=1/numRangeTs=0/updateStats=true-16              242125              4700 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=2/deleteVersions=1/numRangeTs=1/updateStats=false-16             155952              7410 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=2/deleteVersions=1/numRangeTs=1/updateStats=true-16              125588              8672 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=2/deleteVersions=1/numRangeTs=2/updateStats=false-16             136386              8831 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=2/deleteVersions=1/numRangeTs=2/updateStats=true-16              108091             10727 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1/numRangeTs=0/updateStats=false-16          153039              7596 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1/numRangeTs=0/updateStats=true-16           146179              7605 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1/numRangeTs=1/updateStats=false-16           99537             10239 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1/numRangeTs=1/updateStats=true-16           106516             11737 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1/numRangeTs=100/updateStats=false-16          8266            185973 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1/numRangeTs=100/updateStats=true-16           5904            203182 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=16/numRangeTs=0/updateStats=false-16          98556             11201 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=16/numRangeTs=0/updateStats=true-16           92102             12250 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=16/numRangeTs=1/updateStats=false-16          81354             14559 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=16/numRangeTs=1/updateStats=true-16           72142             17581 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=16/numRangeTs=100/updateStats=false-16         6715            197025 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=16/numRangeTs=100/updateStats=true-16          6355            214635 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=32/numRangeTs=0/updateStats=false-16          80072             15317 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=32/numRangeTs=0/updateStats=true-16           67004             17150 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=32/numRangeTs=1/updateStats=false-16          59774             19655 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=32/numRangeTs=1/updateStats=true-16           51621             22946 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=32/numRangeTs=100/updateStats=false-16         5434            200090 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=32/numRangeTs=100/updateStats=true-16          5278            218285 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=512/numRangeTs=0/updateStats=false-16          9112            129759 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=512/numRangeTs=0/updateStats=true-16           6340            160711 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=512/numRangeTs=1/updateStats=false-16          7755            154350 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=512/numRangeTs=1/updateStats=true-16           6236            194589 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=512/numRangeTs=100/updateStats=false-16        3222            332778 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=512/numRangeTs=100/updateStats=true-16         2660            415851 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1015/numRangeTs=0/updateStats=false-16         4284            251056 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1015/numRangeTs=0/updateStats=true-16          3416            309397 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1015/numRangeTs=1/updateStats=false-16         3543            295926 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1015/numRangeTs=1/updateStats=true-16          3063            373369 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1015/numRangeTs=100/updateStats=false-16       2760            481214 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1015/numRangeTs=100/updateStats=true-16        1845            607121 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1023/numRangeTs=0/updateStats=false-16         4455            254472 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1023/numRangeTs=0/updateStats=true-16          3555            313716 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1023/numRangeTs=1/updateStats=false-16         3924            296678 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1023/numRangeTs=1/updateStats=true-16          3058            379373 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1023/numRangeTs=100/updateStats=false-16       2174            470967 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1/numVersions=1024/deleteVersions=1023/numRangeTs=100/updateStats=true-16        1888            606625 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=2/deleteVersions=1/numRangeTs=0/updateStats=false-16             813           1506461 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=2/deleteVersions=1/numRangeTs=0/updateStats=true-16              770           1522394 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=2/deleteVersions=1/numRangeTs=1/updateStats=false-16             537           2265449 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=2/deleteVersions=1/numRangeTs=1/updateStats=true-16              504           2337548 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=2/deleteVersions=1/numRangeTs=2/updateStats=false-16             549           2244198 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=2/deleteVersions=1/numRangeTs=2/updateStats=true-16              488           2385865 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1/numRangeTs=0/updateStats=false-16          225           5295125 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1/numRangeTs=0/updateStats=true-16           211           5359484 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1/numRangeTs=1/updateStats=false-16          112           9618637 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1/numRangeTs=1/updateStats=true-16           112           9329030 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1/numRangeTs=100/updateStats=false-16         52          20629901 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1/numRangeTs=100/updateStats=true-16          52          20491064 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=16/numRangeTs=0/updateStats=false-16          84          11945835 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=16/numRangeTs=0/updateStats=true-16           94          12337238 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=16/numRangeTs=1/updateStats=false-16          49          22690937 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=16/numRangeTs=1/updateStats=true-16           52          20287205 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=16/numRangeTs=100/updateStats=false-16                51          21243783 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=16/numRangeTs=100/updateStats=true-16                 50          22275431 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=32/numRangeTs=0/updateStats=false-16                  55          18618205 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=32/numRangeTs=0/updateStats=true-16                   36          29267625 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=32/numRangeTs=1/updateStats=false-16                  51          20692155 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=32/numRangeTs=1/updateStats=true-16                   46          23419375 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=32/numRangeTs=100/updateStats=false-16                25          42633915 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=32/numRangeTs=100/updateStats=true-16                 25          43782387 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=512/numRangeTs=0/updateStats=false-16                  5         204615098 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=512/numRangeTs=0/updateStats=true-16                   5         227901014 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=512/numRangeTs=1/updateStats=false-16                  3         354040472 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=512/numRangeTs=1/updateStats=true-16                   3         352881619 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=512/numRangeTs=100/updateStats=false-16                3         358386545 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=512/numRangeTs=100/updateStats=true-16                 2         531854154 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1015/numRangeTs=0/updateStats=false-16                 2         502894634 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1015/numRangeTs=0/updateStats=true-16                  3         452662540 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1015/numRangeTs=1/updateStats=false-16                 2         528988516 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1015/numRangeTs=1/updateStats=true-16                  2         544570712 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1015/numRangeTs=100/updateStats=false-16               2         552682504 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1015/numRangeTs=100/updateStats=true-16                2         561923480 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1023/numRangeTs=0/updateStats=false-16                 2         509793262 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1023/numRangeTs=0/updateStats=true-16                  3         479591207 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1023/numRangeTs=1/updateStats=false-16                 2         585911135 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1023/numRangeTs=1/updateStats=true-16                  2         549366135 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1023/numRangeTs=100/updateStats=false-16               2         541049172 ns/op
BenchmarkMVCCGarbageCollect/pebble/keySize=128/valSize=128/numKeys=1024/numVersions=1024/deleteVersions=1023/numRangeTs=100/updateStats=true-16                2         561122978 ns/op

craig bot pushed a commit that referenced this issue Sep 26, 2022
88252: storage: add gc benchmarks with multiple range tombstones r=erikgrinaker a=aliher1911

Previously we only had tests that verify GC performance with no range tombstones or with a single range tombstone under all the data. This commit extends the benchmark to have many tombstones interleaving data at different keys.

Release note: None

Fixes #87417

88295: sql: add assertion for txn passed to internal executor r=ajwerner a=ZhouXing19

If an internal executor is created with a txn binding to it, it should not be used to execute a statement with a nil txn.

Release note: None

88670: schemachanger/rel: fix race due to failure to clone constraint slots r=ajwerner a=ajwerner

The fundamental race here is that while the slots themselves were being copied by value, the "any" clauses which are a slice were not. The second bug here is that the "inline" values were not being properly reset. That bug could lead to problems when the query was run again in the context of a different element set. We need to reset those inline values too.

Fixes #88628

Release note: None

88716: roachprod: set default cluster settings when starting r=yuzefovich,srosenberg,smg260 a=renatolabs

In #88514, the cluster start logic was refactored to reuse the same code across `init` and `start`, fixing a bug in the former. However, the refactoring overlooked the fact that we previously always set the default cluster settings when there's more than one node in the cluster.

This fixes that by setting the default cluster settings in that case; one particularly important cluster setting is the license key, necessary for some roachtests.

Fixes #88660
Fixes #88665
Fixes #88666
Fixes #88710.

Release note: None

Co-authored-by: Oleg Afanasyev <oleg@cockroachlabs.com>
Co-authored-by: Jane Xing <zhouxing@uchicago.edu>
Co-authored-by: Andrew Werner <awerner32@gmail.com>
Co-authored-by: Renato Costa <renato@cockroachlabs.com>
@craig craig bot closed this as completed in #88252 Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant