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

Performance improvements and test utilities for analyzing system calls #17

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

wykurz
Copy link
Owner

@wykurz wykurz commented Jun 5, 2024

No description provided.

wykurz added 5 commits June 4, 2024 11:42
By using `tokio::fs::copy` we are able to use the `copy_file_range` system call in Linux which dramatically speeds up the copies (at least 5-20x in our tests).

Note the `tokio::io::copy(_buf)` funcitons don't seem to be able to use this syscall reliably in our testing.

Unfortunately, the `tokio::fs::copy` call is path based and that means potentially having to read the destination metadata twice. For this reason, we add `is_fresh` variable to avoid having to check the destination metadata whenever we're sure it doesn't exist.
@wykurz wykurz merged commit 3cd4e0e into main Jun 5, 2024
1 check passed
@wykurz wykurz deleted the too-many-reads branch June 5, 2024 19:43
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.

1 participant