-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: add concurrent working threads option to CLI args #760
feat: add concurrent working threads option to CLI args #760
Conversation
639ffbe
to
221084b
Compare
close due to
|
You could call |
yes, that's a workaround. but the problem is, I did not expect the because, when I set the But since the logger may require more concurrent threads, I'm unsure if this will cause problems for it. Is it okay for us to do this? |
maybe we could use async? that way, the async logger wouldn't have to depend on |
Oh, I see your concern, I overlooked the case where parallelism is set to 1. The solution is then to use Setting up an async logger wouldn't help because we'd need at least one thread in the async runtime threadpool, and that would be equivalent (but more complicated) than just having a |
Oops, seems that the UI tests failed |
UI tests fixed |
b50674b
to
d7ebd27
Compare
…d::spawn instead of rayon::spawn in the logger thread
d7ebd27
to
0707403
Compare
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.
Ty, let me know if you think the default shouldn't be all cores.
If the compression algorithm itself is fast enough (and can effectively utilize all cores), I believe we should have all CPU cores focus on processing a single compressed document instead of dividing the CPU cores to handle multiple documents. This way, a single document can be decompressed more quickly. Meanwhile, in this scenario, if we decompress all documents concurrently, the bottleneck will not be the CPU, but rather disk IO, and threads can easily enter the D-state (the state in top or htop, mostly iowait). If the compression algorithm cannot efficiently utilize the CPU (for example, when decompressing with 7z and rar, despite claiming to support multithreading, they cannot fully utilize the CPU, and overall decompression speed is very slow). Then decompressing documents one by one will be relatively slow. Therefore, I feel that both approaches (processing one task at a time vs. concurrently processing multiple compressed documents) do not have absolute pros and cons; it depends on the situation. |
add concurrent working threads option to CLI args