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

chore: use heed for LMDB in benchmark #847

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Conversation

shekhirin
Copy link
Contributor

just bench failed on my machine (M1 Pro, 32GB RAM)

redb git:(master) ✗ just bench
...
lmdb-rkv: Bulk loaded 1000000 items in 1395ms
lmdb-rkv: Wrote 100 individual items in 11ms
lmdb-rkv: Wrote 100 x 1000 items in 3364ms
lmdb-rkv: len() in 0ms
lmdb-rkv: Random read 1000000 items in 1063ms
lmdb-rkv: Random read 1000000 items in 1045ms
error: bench failed, to rerun pass `--bench lmdb_benchmark`

Caused by:
  process didn't exit successfully: `/Users/shekhirin/Projects/redb/target/release/deps/lmdb_benchmark-9bace23009390253 --bench` (signal: 11, SIGSEGV: invalid memory reference)
error: Recipe `bench` failed on line 34 with exit code 101

So I decided to try out heed as an alternative LMDB wrapper library. It's more maintained and subjectively has higher code quality. Also, it works 😄

redb git:(lmdb-heed) ✗ just bench
...
heed: Bulk loaded 1000000 items in 1501ms
heed: Wrote 100 individual items in 7ms
heed: Wrote 100 x 1000 items in 2988ms
heed: len() in 0ms
heed: Random read 1000000 items in 1038ms
heed: Random read 1000000 items in 1008ms
heed: Random range read 10000000 elements in 1544ms
heed: Random range read 10000000 elements in 1548ms
heed: Random read (4 threads) 1000000 items in 263ms
heed: Random read (8 threads) 1000000 items in 144ms
heed: Random read (16 threads) 1000000 items in 145ms
heed: Random read (32 threads) 1000000 items in 122ms
heed: Removed 500000 items in 1460ms
...

@shekhirin shekhirin marked this pull request as ready for review August 20, 2024 07:43
@cberner cberner merged commit c93a74a into cberner:master Aug 21, 2024
3 checks passed
@cberner
Copy link
Owner

cberner commented Aug 21, 2024

Merged. Thanks!

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.

2 participants