qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.75k stars 3.92k forks source link

Download Speed Capped - Possible Throttling Issue (same as uTorrent) #463

Closed vampire337 closed 11 years ago

vampire337 commented 11 years ago

Windows Server 2008 R2 (64bit) OS with service pack 1, 8GB RAM, Core i5-3570K @ 4.30 GHz CPU. Using qBittorrent v3.0.8. OS boots from an OCZ 60GB SSD. Storage includes 2x 3TB Western Digital disks, 1x 1.5TB Seagate Disk, and 2x 500GB Seagate disks. Symptoms are the same regardless of which disk is being written to.

I am noticing my download speed in qBittorrent never goes above 2.0miB/s, and normally bounces around 1.0MiB/s to 1.6MiB/s. My connection is 50mbit down, and I am normally able to sustain up to 6.0MiB/s download speed using Vuze / Azureus on the same system. In theory I should be able to achieve the same throughput from qBittorrent. I can copy/move files from one drive to another and get over 100MiB/s read and write to the disk without fililng up my cache (verified in Windows Resource Manager), so I am certain that it is not a physical limitation of any of my disks.

The issue here looks very similar to my experience with uTorrent (3.x versions, not 2.x versions). In uTorrent it was a throttling issue which was accompanied by a Disk Overload message at the bottom of the client, indicating that the client believes that my cache is filling up and so needs to stop writing so much to the cache, effectively throttling my download speed. Obviously qBittorrent is not giving me the disk overload message, so I assumed I was free of the limitation, but more recently I've watched and my download speeds are never reaching what they do with the other client on the same OS & hardware, so something is definitely amiss.

I left uTorrent and found both Vuze and qBittorrent because uTorrent was unable / unwilling to address the issue. I don't know what is causing this issue, but I assume it's got something to do with the underlying code that qBittorrent shares with uTorrent. I'm not certain it's a "fixable" problem, but I wanted to document here so someone more familiar with the code could take a look. Please let me know any further information I can provide to help replicate this scenario and perhaps solve the issue. Thanks! :)

sledgehammer999 commented 11 years ago

qBittorrent doesn't share any code with μTorrent.

Furthermore, have you capped your upload speed in qbittorrent? Unlimited upload speed can actually decrease download speed. I assume that you are familiar with correctly configuring a bittorrent client, right? You could also experiment with the Disk cache under Tools->Options...->Advanced->Disk Write Cache Size

vampire337 commented 11 years ago

I actually thought libtorrent may have been a uTorrent component. Noted, no code shared between the two projects.

I also assume I am familiar with correctly configuring a bittorrent client, but that's not to say I think I am incapable of screwing something up. My upload is capped at 50Kib/s or 500KiB/s depending on the time of day, download speed is in the same range regardless of either setting or unlimited. (Fwiw, I'm supposed to be getting 5mbit upload from my ISP; in practice I have seen this up to around 2MiB/s.) My disk write cache size is 256MiB, a setting I believe I did change. I set it to 128MiB and 512MiB, shutting down qBittorrent and restarting each time, and my download is still in the 1.0MiB to 1.6MiB range each time.

Any other thoughts/suggestions?

ihavefleas commented 11 years ago

Have you tried downloading the same torrents in the different clients?

I tried Deluge one time and the speed was half what I normally got with qBT. Transferred the torrents to qBT and the speed was the same. Essentially it wasn't the client, the torrent seeders were just slower or I didn't get many connections.

A problem I also had with qBT was DLs slowed down due to fragmented writing issues. That was completely fixed by turning on pre-allocating, speed was back at my set DL limit when I re-added the torrents.

I usually hit my 2.0 - 2.5 MiB DL limit with UL limit at 90 KiB. (About 75% max)

vampire337 commented 11 years ago

Years ago I learned I should always use pre-allocation because I'd rather find out I just tried to stuff 100GiB of crap into a 90GiB sack, so to speak. It also helps with the fragmentation, like you said. (I also have a defrag scheduled for 4hr a day to keep everything clean, just in case.)

I mostly found Deluge crashed due to the GUI memory leak issue in Windows. Months ago I tried the same torrent in different clients and found my results were not similar, but I haven't performed that test with qBT specifically, so I'll give that a shot and report back.

vampire337 commented 11 years ago

So I've finally done the test as indicated. I downloaded a 1.7GiB torrent, added it to Vuze, watched it stabilize at around 3.0MiB/s - 3.2MiB/s. Then I stopped it and added the same torrent to qBittorrent, watched it top out at 1.0MiB/s - 1.4MiB/s. This was the only file downloading, and it was downloading to the same drive, using each tracker. Drive fragmentation is 7% on that disk, btw.

At this point I feel like I've exposed a bug in qBittorrent, or else i still have a setting wrong that I managed to get right in Vuze. Any more thoughts/suggestions, or is there more information I can somehow provide here, or is it time to give up and find something else?

ihavefleas commented 11 years ago

I grabbed a large torrent with a lot of seeders to test it out. I did get up to my 2+ MiB but it would sometimes drop down to the low 1 MiB area for a second. Mostly it stayed in the 2+ MiB. Could be the tracker.

You can try tampering with the settings. Do you have a port solely for incoming connections? A port solely for DHT? Are your max connections per torrent low? PeX and LPD are enabled? Increased disk write cache? (I increased mine to 400 MiB and a number of problems were solved.) Try to mimic your Vuze settings.

Other than that I don't know what to tell you. I'm just another user. It may not necessarily be an issue with qBT, but one with libtorrent. Though I tested with Deluge too (also uses libtorrent, though an older version) and it held a steady speed. I haven't used Vuze so I can't give input regarding it. I used Azureus back at that time but didn't stay when they re-branded.

vampire337 commented 11 years ago

Understood that you're just another user, and don't think I don't appreciate your input! I wanna think if no one else has a problem then it's just my screwup, or if I've found some obscure bug I can help the devs by reporting, even if they aren't able to fix it for me. One thing to note, I never realized this was a problem until I got faster internet to the house; so I think part of why no one else sees this issue is they may not expect the speed that I now know I can have. When I maxed out at 2MiB, I didn't have a problem with my client throttling me to around 2MiB.

I have ports forwarded from the router to this PC for sharing, one for Vuze and a separate one for qBt. I do not use DHT, PeX, or local peer discovery (private trackers don't support). I don't think my issue is with finding peers, just that the peers I get are unable to transfer to me at a higher speed. Disk write cache size is 512MiB. Max torrent connections per torrent has been 10 and 100; max connections has been different testing values from 200 to 10000.

I'm new to anything but uTorrent, which had a similar throttling issue with an error message (disk overloaded) that I found a lot of people have and the fix is involves manually setting the disk cache to override Windows' caching, which ultimately for me just caused a memory leak to crash uTorrent when it hit around 1.5-1.7GB of RAM. Vuze is amazing overall (I never tried it when it was Azureus), but unfortunately is banned at some private trackers because it's got some extensions that allow cheating ratio which are difficult to track. As much of a hassle as this has been, I'd still rather find something like qBt that will work rather than quitting the trackers.

vampire337 commented 11 years ago

Well, I am happy to report that I think I found the magic bullet; "Apply rate limit to transport overhead". Who knew the fix would be in the category labeled "Speed"?

I made some changes here and there, and something along the way bumped up my download speed. Took me a half hour of undoing one thing and another to determine it was this setting that made things better. It was checked, and seems is normally recommended because it helps with managing your overhead bandwidth, but for some reason it's making my download speed suck. I had choked back my upload speed because I'm giving more bandwidth to a tracker that uses Vuze, but I see that with this setting checked, I can set the upload to 75%, 90%, 150% of my upload speed and still download is choked. Unchecked, it's happy with 50KiB and downloading at around 5.6MiB. What a terrible horrible awful setting!

Thanks for all the pointers and tips. I didn't get this level of support over at uTorrent.