[Feature Request] Aggressive Rechecking
Part1) In DiskManagerRecheckScheduler.java, when a torrent is scheduled for rechecking, arbitrary delay is added based on the piece size (lines 151-155). The range is 12ms to 409ms corresponding to the 128KB, and 4MB piece size in bittorrent (or so it seems). While the comments indicate we're trying to do this checking without much taxing on the system. The variable delay here based on piece size doesn't make much sense. I'll be honest i don't know how much the other machinery in Azureus/BBT works behind the scenes. But a 5400RPM HDD is only going to take 13-20ms to fetch that data (whether it's 32KB or 4MB or 32MB). An SSD would only take 10-50us. (i'm ignoring NAS/Network scenarios because i don't expect those to perform well no matter what is done) Still, up to 400ms on top of those base access times seems completely unnecessary. So my request is, fix this delay length to something small (20ms), or give an option checkbox to turn rechecking performance "up to 11", or just provide a user editable option field (advanced) to set this value manually. Part2) Rechecking can only process one torrent at a time???? If 2 or 10 torrents finish around the same time, 1 or 9 torrents are queued waiting for rechecking and not seeding, then ~8 etc. I'm not sure why all recently finished torrents can't be in the checking state, so it'd be nice to see that parallelized.
Don't know about your first point, but I agree checking multiple torrents in parallel would be useful if possible, maybe upto a small user configurable amount.
B14 has two options under Files->Performance to
- set an aggressive hash checking strategy
- control the concurrency of download rechecks
22GB Torrent 2MB piece size 2.0.0.0 -> ~1:28 2.0.0.1_B14 -> ~1:25 (aggressive) 2.0.0.1_B14 -> ~1:24 (normal) 2.0.0.1_B14 -> ~6:01 (CPU Friendly)
Doesn't look like aggressive is much improvement over baseline. Might just need some tuning. As for parallel torrent checking seems to work great.
What's your disk IO sequential read rate out of interest? Also, what's the CPU utilisation like during recheck?
Windows 10 X64 1903 16GB DDR4 2133 i7 6700HQ (2.6GHz) 512GB NVMe PC300 SKHynix SSD (PCIe Gen3x4)
2.0.0.0 BiglyBT Processor Utilization ~35% Sequential IO 250MB-300MB/sec ~22% active time
2.0.0.1_B14 -> Aggressive BiglyBT Processor Utilization ~ 36-40% Sequential IO 250MB-300MB/sec ~22% active time
2.0.0.1_B14 -> Friendly BiglyBT Processor Utilization ~ 12% Sequential IO 50-70MB/sec ~5% active time
2.0.0.1_B14 -> 4 Simultaneous Torrents checking Bigly BT Processor Utilization ~92% (100% overall) Sequential IO ~870-900MB/sec ~50% active time
Looks like I need to increase the concurrency of the piece checking as well as reduce the delay - implications are more memory usage during rechecking due to more pieces in-flight. Check the next beta!
22GB 2MB Piece size 2.0.0.1_B16 -> Aggressive ~32 seconds BiglyBT Processor Utilization ~ 92% (100% overall) Sequential IO 650-800MB/sec ~ 50% active time
4 Simultaneous Aggressive Sequential IO ~1GB/sec ~ 66-70% active time
That seems to be about as aggressive as this system can handle :-D Thanks for the quick implementation.