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

Use MutableByteArray as buffers, add manual keepAlive #8

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

jorisdral
Copy link
Collaborator

@jorisdral jorisdral commented Mar 15, 2024

Before, on d38d85e

Low-level API benchmark
Total I/O ops: 262144
Elapsed time:  1.146791772s
IOPS:          228589

High-level API benchmark
Total I/O ops: 262144
Elapsed time:  1.310599797s
IOPS:          200018

After, on bbeb811

Low-level API benchmark
Total I/O ops: 262144
Elapsed time:  1.157516626s
IOPS:          226471

High-level API benchmark
Total I/O ops: 262144
Elapsed time:  1.315785114s
IOPS:          199230

Virtually the same

@jorisdral jorisdral self-assigned this Mar 15, 2024
@jorisdral jorisdral requested a review from dcoutts as a code owner March 15, 2024 13:05
Copy link
Member

@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.

I suggest we do check the bytearrays are pinned and re-run the benchmark to be sure that doesn't have a significant impact.

System/IO/BlockIO.hs Show resolved Hide resolved
@jorisdral
Copy link
Collaborator Author

jorisdral commented Mar 15, 2024

The latest commit (bb4b65c) added a guard that checks that byte arrays are pinned. There's probably a slight performance decrease, but not a very large one:

Low-level API benchmark
Total I/O ops: 262144
Elapsed time:  1.163442451s
IOPS:          225318

High-level API benchmark
Total I/O ops: 262144
Elapsed time:  1.325703812s
IOPS:          197739

The change only affects the high-level benchmark

@dcoutts dcoutts merged commit a4b63e0 into main Mar 15, 2024
4 checks passed
@dcoutts dcoutts deleted the jdral/keepalive branch March 15, 2024 15:22
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