Skip to content

Benchmark overhead distorts results in favor of slower databases #5

Description

@kochelmonster

The current benchmark includes a non-trivial amount of benchmark-side work in the measured interval. This can distort comparisons in favor of slower databases.

I profiled fillrandbatch with perf and attributed libc/syscall samples back to the first owning frame in the call stack.

Command shape:

perf record -F 997 -g --call-graph dwarf -- ./dbbench/bin/<backend> --benchmarks=fillrandbatch

Only benchmark-interval samples were considered. Startup, database open, and setup work were excluded.

Results

Database Time in benchmark Time in DB Percentage of benchmark code Measurement error
Leaves ~0.067 s ~0.316 s 17.50% +21.2%
LMDB ~0.116 s ~0.687 s 14.50% +16.9%
LevelDB ~0.047 s ~0.695 s 6.37% +6.8%

Suggested Fix: Add a Null Backend Calibration Run

Add a null database backend that performs all benchmark-side work but does not actually store data. Before running the actual benchmarks, execute a calibration run with the null backend to measure the overhead introduced by the benchmark harness itself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions