[TRY] perf: spawn (parallelize) io tasks related to tarball#190
Conversation
|
Oops my commits are gone. I'll use |
KSXGitHub
left a comment
There was a problem hiding this comment.
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.
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 <hvksmr1996@gmail.com>
|
@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
rayonto perform actual blocking IO operations. It's done by usingrayon::scopeAPI.Blocked by:
malloc#188