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

Attempt to set WCE for raw file backends #665

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

pfmooney
Copy link
Collaborator

When the file-based block backend is running atop a zvol, it will default to synchronous writes unless otherwise toggled by DKIOCSETWCE. Since the backend is already minding flush requests via fsync(), we should enable the write cache on the device for a significant performance gain.

@pfmooney pfmooney requested a review from rcgoodfellow March 17, 2024 04:46
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

My main suggestion is to consider doing away with the two Options around the worker's WCE state --- I think that would make the code a bit easier to understand. Besides that, I had a couple very small comments, but everything looks good overall!

@rcgoodfellow
Copy link
Contributor

I've taken this for a spin in my local environment, and it improves performance by around ~3x!

When the file-based block backend is running atop a zvol, it will
default to synchronous writes unless otherwise toggled by DKIOCSETWCE.
Since the backend is already minding flush requests via fsync(), we
should enable the write cache on the device for a significant
performance gain.
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

Looks good to me --- thanks for adding comments!

@pfmooney pfmooney merged commit 34e3ffe into oxidecomputer:master Mar 22, 2024
10 checks passed
@pfmooney pfmooney deleted the file-wce branch March 22, 2024 22:25
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.

3 participants