Skip to content

Conversation

@mheinzel
Copy link
Collaborator

@mheinzel mheinzel commented Jan 21, 2025

Some micro benchmarks don't run any more. I fixed two where the benchmark environment code got broken by recent changes.

Fixes #440. (this was one of them)

@jorisdral
Copy link
Collaborator

Related: #440

The minimum length of keys for the compact index increased from 6 to 8
bytes at some point.

Also, releasing a run was changed to remove the files associated with
it. The cleanup code was manually doing the same, which then became
unnecessary and started causing issues.

Merge micro bench: release run during cleanup only
This previously tried creating the wbblobs file with an empty path, so
there was an existing directory (the benchmark's root directory) already
where the file was supposed to go.
With recent changes related to WriteBufferBlobs, flushing a write buffer
started copying its blobs to a new file. This made the setup fail, since
it generated random blob references, but no actual blobs they point at.
This fixes the file paths errors for the write buffer blobs.

It is also generally the right direction to go: If we ever want these
tests to work with a write buffer and blobs, lookups must look at the
original write buffer blobs, not an empty one.
@mheinzel mheinzel force-pushed the mheinzel/fix-benchmarks branch from eb7d34d to a7114d1 Compare January 22, 2025 13:57
@mheinzel mheinzel marked this pull request as ready for review January 22, 2025 14:00
Copy link
Collaborator

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dcoutts dcoutts added this pull request to the merge queue Jan 22, 2025
Merged via the queue into main with commit a320d80 Jan 22, 2025
27 checks passed
@dcoutts dcoutts deleted the mheinzel/fix-benchmarks branch January 22, 2025 15:55
Copy link
Collaborator

@jorisdral jorisdral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

-- We make sure to immediately close resulting runs so we don't run
-- out of file handles or disk space. However, we don't want it to
-- be part of the measurement, as it includes deleting files.
-- Therefore, ... TODO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a dangling TODO here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, that slipped through. Thanks for pointing it out. #547

(20, \g' -> let (!v, !g'') = uniform g' in (Insert v, g''))
, (1, \g' -> let (!v, !g'') = uniform g'
(!b, !g''') = genBlobSpan g''
(!b, !g''') = randomByteStringR (0, 2000) g'' -- < 2kB
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can generate much smaller blobs. It would speed up the benchmark setup, and the performance of the lookups code does not depend on the blob size. But it's maybe also not super important because inserts with blobs are generated only rarely

mheinzel added a commit that referenced this pull request Jan 23, 2025
mheinzel added a commit that referenced this pull request Jan 23, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Benchmark lsm-tree-micro-bench fails with error

4 participants