-
-
Notifications
You must be signed in to change notification settings - Fork 997
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
pread-disk-io #7013
base: master
Are you sure you want to change the base?
pread-disk-io #7013
Conversation
Is it something similar to libtorrent 1.2 disk I/O? |
yes, it is similar. This doesn't cache blocks in memory though. It just has a store-buffer while waiting for blocks to be written to disk. |
Failing to build with qBittorrent |
We never previously care about supporting libtorrent master. I'll try to deal with it ASAP since I really interested with this new disk I/O type. |
I thought pausing a session was unusual. Maybe I should add that back. @xavier2k6 is that a build with deprecated functions disabled? |
Do you mean create session in paused state? Of course it is useful! It was even added at our request, if memory serves. |
|
I think this feature got lost in a merge. I'll fix that in master |
I made some nox linux multiarch builds to test using the pr branch. https://github.com/userdocs/qbt_static_test/releases/tag/release-4.4.3.1_pread-disk-io |
It seems that it will not be possible to keep the qBittorrent code compatible with both |
I cannot push directly to this branch so I created PR. I tested it a little with checking a large v2 torrent (30+ GB), but I didn't finish it, because I had a slow computer and little time. BUT nevertheless, I noticed significant hangups of UI during checking, so I believe that we still have some other problems besides the checking speed itself. I'll deal with related issues later. As for the checking speed itself, you should compare it on the same torrent, using both libtorrent-1.2 and libtorrent-2.0 with different disk I/O types. The RAM limit should be set to the highest possible value so as not to be a bottleneck in these tests. |
I noticed this PR always used 16KB block size for reads, which is very inefficient, especially on HDD. I think the block size too small is the root cause for the difference in performance between 1.2 and 2.0. In 1.2 with disk cache enable average size is >256KB, 2.0 mmap average size ~128KB and pread only 16KB. That caused the number of IOs to increase by more than ten times and kill disk performance. |
Doesn't this line should be |
Damn it! You're right. I forgot to change this in a hurry after copy-pasting. |
I believe that increasing the checking speed is not the only expected advantage of this disk I/O type. So we should test other cases where MMap based I/O messes up, for example, using external and especially network drives to download torrents, problems related to I/O on macOS. |
in parallel to this I'm working on modifying the mmap_disk_io in 2.0 to use |
IIRC, another problem of current MMap disk I/O implementation is that you map the entire file, which can still be a stumbling block, even if memory mapping will be used only for reading files. |
@glassez I merged your PR in my branch, build is available below: Is there any Large V2 torrent publicly available that we can all use for testing purposes for consistency? BTW, does |
I used one specially created to test another problem with large torrents. But they must exist in reality, otherwise where would that problem come from? Another thing is since we are interested in comparing libtorrent 1.2 vs 2.0 in the checking speed problem, we will have to use a pure v1 torrent in testing. |
I think the hangups during checking are due to high page faults due to working set limit. It should be disabled if one isn’t using mmap I/O. |
@xavier2k6 There is a torrent https://the-eye.eu/public/Random/torrents/oldversion.com_Sept2019.torrent with the dump of all stuffs from oldversion.com. The torrent file itself is 5.5mb and there is 30k files inside along with as many folders (each version is in its own folder) for a gross total of 472.18gb. Those stuffs are just demo, freeware or shareware... no cracked softwares. The file sizes range from 1mb to hundreds of megabytes. It works flawlessly with qBt 4.4.4 RC_1_2. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@summerqb I have it in my qBt 4.4.4 RC_1_2 and it works just fine. But RC_2_0 was freezing and never starting. That's why it's probably a really good test torrent! |
Tested all 3 branches and RC_1_2 still beats the others. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Wait what ? I agree that 2.0 didn't work as expected, but client like QBT just switched back to 1.2, which is still being patched, and voilà. I get that it's frustrating, but it's not the end of the world... |
A lot of thumbs down... That's a mouthful, of course, but there's truth to it anyway. |
True, but there is a proper way to express it imo. Arvidn is working a lot on 2.1, maybe we can wait to see the results ... |
1.2 doesn't contain a huge amount of features, fixes and changes compared to 2.0, if the branches were developed in parallel there would be a lot less negativity. |
a3080b8
to
3e82f19
Compare
47cdb93
to
264c66a
Compare
add a multi-threaded, pread()-based, disk I/O backend (pread_disk_io)