-
Notifications
You must be signed in to change notification settings - Fork 21
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
[TRY] perf: spawn (parallelize) io tasks related to tarball #190
Conversation
Oops my commits are gone. I'll use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your works.
I have a few change requests.
let (file_path, file_hash) = store_dir | ||
.write_cas_file(scope, buffer, file_is_executable) | ||
.map_err(TarballError::WriteCasFile)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be the only IO operation in the entire scope. And none of the operations that follow depend on this IO operation being done either. Meaning, we could potentially defer this operation after building the cas_paths
(i.e. do the IO on the created cas_paths
). See if this suggestion can improve the code quality and performance.
A new PR has been merged into |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #190 +/- ##
==========================================
- Coverage 92.65% 92.50% -0.16%
==========================================
Files 57 57
Lines 2847 2881 +34
==========================================
+ Hits 2638 2665 +27
- Misses 209 216 +7 ☔ View full report in Codecov by Sentry. |
@kdy1 |
It's expected because you are using a beast machine and the lockfile is for a very small project. The PR is about limiting the number of threads used for syscalls. |
I added
Is there a mechanism to scale the number of syscalls limit based on number of CPUs? Yesterday, there was a merged PR that scale the concurrent network requests limit based on number of CPUs. Also, is the |
Can you try limiting the number of rayon threads by configuring And the |
Co-authored-by: Khải <[email protected]>
@kdy1 Should the |
It should be lower.
This is partially correct, but this is not related to IO but rather a bug of
The performance graph will look like this because |
@kdy1 Is |
Hmmm... Yeah, it's correct. So we should move syscalls to |
This PR uses the threadpool of
rayon
to perform actual blocking IO operations. It's done by usingrayon::scope
API.Blocked by:
malloc
#188