-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fluctuating speeds with certain torrents (or it seems like that at the speedgraph). #12336
Comments
But is this a clean install or an upgrade? Do you have disk cache set to auto? If not, try setting it to auto, or a relatively high value like 400 MiB. Also: did this start happening with 4.2.2? |
I'm having the same problem, with maybe even more extreme spikes. It's an upgrade, disk cache is set to auto. I tried bumping up the asynchronous IO threads, and it made the problem worse. You can see in this speed graph exactly where I bumped up the IO threads, where the spaces get way longer between the spikes. Then I went all the way the other way and set the threads to 1, which brings the result on the far right, where the spikes are close again (maybe even closer than with 4). |
@arvidn requesting advice please |
Thanks Francisco Pumbal. Its a clean install. Disk cache is on auto (default setting). I thought about the disk cache setting too. Its like maxing out my speed and then drops for few seconds and when the cache is available again it speeds up. This vicious cycle causes the fluctating was my first thought. Interesting find mcmuttons, I will try and set it at 128MB cache too when im at home. I will post my results with the advices, thanks. |
@Nemo-qB @mcmuttons
With these 2 datapoints we can get closer exactly what the problem is with Because 5 GiB > 4 GiB and 5 GiB/40 = 128 MiB, and given that with 128 MiB, performance is good for @mcmuttons, we can deduce that if the spikes have to do with lack of cache, @mcmuttons machine has to have less than 5 GiB RAM. With these assumptions, it's the only scenario where |
I don't have time to do the narrowing down right now, though I can try it tomorrow. However, my machine has 16GB of RAM. |
Big oof. This thickens the plot a bit. When you have the rest of the results let us know. |
Some interesting things have happened while playing with the cache settings. Here are the test results, watch the speedgraphs too: Looks fine, at some point it stayed stable at my max current download speed. RAM usage around 180MB. It took some time to speed up and while with 128MB I maxed my speed with 64MB this wasn't the case. It maxed at around 8.0MiB/s. Didn't go much higher than that. Great results again. RAM usage around 172MB and as seen on the speedgraph the speed was quite stable at some point reaching my max. By the way my system has 16GB DDR4 memory. |
@Nemo-qB Thanks, it sounds increasingly more likely that there could be some problem with |
understanding these kinds of problems is exactly what the session stats / performance counters are for. In an ideal world, the qbt graph would be able to plot all metrics (not just the downloaded and uploaded bytes). Anyway, I would be interested in knowing if this could be an issue in uTP. Could you try disabling uTP and also try disabling TCP, so see if that affects anything. |
@FranciscoPombal @arvidn @sledgehammer999 Another point of note is that when Yet if you set the cache to a So, is the libtorrent Are the spikes from qBittorrent going back & forth trying to figure out the setting? this is the logic to calculate the automatic disk cache size |
@arvidn I debugged the cache size selection code for a while, and the only way I could see this failing would be if Now, I did not look closely at Also, if it returns 0, you might want to change the default cache value to something higher than 16 MIB, say 32 or even 64 MiB. But this still won't be enough for many cases, and it's not a real solution to have the fallback value be very high, so you should probably issue an alert. Something like |
well, I just found a bit of an embarrassing bug. I was truncating the total physical RAM to a signed 32 bit int. So, 16 GiB would become 0. How does this look? arvidn/libtorrent#4506 |
I don't have a machine with 16 GiB or more available to test right now unfortunately. |
will compile a build with arvidn/libtorrent#4506 & run on test system with 32GB Ram. |
@xavier2k6 make sure to test with and without it. Also, if possible, set a breakpoint at the relevant location in the libtorrent source and observe the value that is returned from the function with and without the patch. |
Nice find, hopefully it will be fixed as I think that the most of the speed problems is caused by this behaviour. At the moment im using 128MB cache without issues for now (v4.2.3). |
@xavier2k6 have you managed to test this successfully? |
512 MiB is relatively close to what |
@sledgehammer999 I think it would pay to not wait too long before releasing 1.2.4 as this would be affecting quite a few people. |
friendly ping, any results so far? |
I created a build with that patch - haven't had time to fully test it in detail & post results etc but have noticed cache stats now go to ~867MiB
EDIT: File below: |
800 MiB+ for disk cache is expected for a 32 GiB system with the current libtorrent code. @Nemo-qB @Disco-Chef @mcmuttons can you please test this build? Set the disk cache to
Also screenshots comparing |
I'll install it tonight and see. Sorry about not getting back with results from back earlier, but things got really busy, and it seemed like you guys were already getting a good grip on the issue. |
Thanks, we're pretty certain this should be fixed at this point, but further confirmation from you and the others would be nice. |
@arvidn out of curiosity, I noticed that we use the |
A little strange for the first screenshot to just show 0, but what matters is the patched version seems to be working correctly. |
It varied slightly but maybe it is different for people who have less than 16GiB, since I have 32GiB & the incorrect logic was found from 16GiB+ EDIT:
I can only show what it is showing for me & I don't really have the time to be pulling hardware to test various RAM configs. Hopefully the logic is correct now & in future I will be able to test with |
The tests: Official 4.2.3 set to AUTO (no patch) 4.2.3 set to AUTO with arvidn/4506 As you had mentioned before @FranciscoPombal;
It comes close to it and I can confirm that this patch works perfectly as it should. I think a new release only for this fix is already critical and most of the speed issues here at Github and at the forum will be over, hopefully. EDIT: Maybe a dumb question but I was just wondering; Is it normal that the read cache stays at 100% for like 45sec/1min? Then it dropped slowly to around 15% and lower. The torrent was around 32GB in size, same from the tests before. Speed was fine. |
I think it makes sense, at the start everything can be read from the cache, and as it gets overrun, the hit rate goes down. |
I think that's reasonable. It will include buffers that have just been received from peers and may be queued up to be inserted into the cache as well. It will also include buffers that have been read from disk and are currently waiting in the send-queue to a peer that requested it. in other words, even when the cache size i 0, that gauge is likely not always 0. |
Hmm, then it is not quite what I had in mind - I was actually expecting it to include only the memory related to |
yes, that's correct. |
I have redirected at the forum some of the users to the fixed exe as a temporarly solution: https://qbforums.shiki.hu/viewtopic.php?p=33611#p33611 Can we expect a release soon for everyone (@sledgehammer999) or are we going to wait till libtorrent 1.2.6 is being released first including the fix? |
https://qbforums.shiki.hu/viewtopic.php?f=14&t=8158 Another confirmation which is nice. We can agree and say that the fix works as it should. |
Great, we can concentrate our efforts now on #11735 & help get a new "release" out soon after. |
Closing... Just for the record, it started since this: #11637 For anyone facing the issue, go to Options -> Advanced -> Disk cache and change from |
Just to clarify, this is a workaround for those using 4.2.3, and the exact amount can be even higher than |
qBittorrent version and Operating System
qBittorrent v4.2.2 / W10 64bit (latest).
What is the problem
The speedgraph shows fluctating speeds. Also I see that my speed go up and down (between around 9.0MiB/s and 5.0MiB/s and sometimes jumps to my max for few seconds) so it confirms the speed is going up and down for some reason. My max downloadspeed is around 12MiB/s at the moment.
What is the expected behavior
While this doesn't happen with every torrent with large torrent it seems to happen more often. Especially with big piece sized torrents from my experience. I want it to stay at stable speeds when there is more seeders than leechers available. For some reason it goes up and down which shouldn't be happening. Downloading to HDD and SSD doesn't solve it by the way. My system is doing nothing else on the background.
Steps to reproduce
Its random. But as I said it does happen with large torrents with big piece sizes in general. Thats what I have found for myself.
Extra info (if any)
Advanced settings is all default. I only changed my own settings within speed and connections tabs.
See the screenshot, enough seeders to max out but still seeing the speedgraph from last 5 minutes (if its working right) you can see the speeds go up and down. Not once but it keeps doing it till the download is finished. In this case it was 32GB in size as shown.
The text was updated successfully, but these errors were encountered: