Skip to content

storage: MVCC benchmarks unreliable under Bazel #83599

@erikgrinaker

Description

@erikgrinaker

pkg/storage has a set of MVCC benchmarks in bench_pebble_test.go, e.g. BenchmarkMVCCGet_Pebble and BenchmarkMVCCScan_Pebble. These operate on a relatively large dataset, which is pre-created if it does not already exist, but otherwise reused if one is found. This is generated by setupMVCCData, under pkg/storage/mvcc_data_*/.

When running under Bazel, e.g.:

$ dev bench pkg/storage -f "BenchmarkMVCCGet"

I often get highly unreliable results that can vary greatly between each run, especially when switching between two commits (to compare before/after benchmarks). I suspect this is some combination of Bazel reusing a previously created dataset in a working directory dependant on the build commit hash or some such. It may also be related to having cancelled the dataset creation, such that one of the builds uses a partial dataset while the other uses a complete one. I haven't dug into this. I don't see this variability with make, which stores the dataset directly in the Git clone, thus reusing the same dataset each run.

CC @rickystewart

Epic CRDB-17171
Jira issue: CRDB-17163

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-build-systemC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-dev-inf

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions