Introduce "block_in_place" concurrency limit #521
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to make rqbit work better with slow disks. I'm running it on an OpenWRT router with a USB stick.
Sometimes it just blocks and loses all momentum. The Web UI also isn't responsive at those times. My theory is that the "block_in_place" calls stall the whole runtime because the disk is slow. Disk utilization is 100% when this happens, but SOME work could still be happening e.g. Web UI at least. Streaming is also pretty bad during slow disk occurences.
Also hope that it will help smooth out the download speed as it tanks during these moments. But at least averaged out across all peers should be better.