GUI performance with many thousands of torrents - transfer list, icons, and more #17431
Replies: 41 comments
-
May have some relevance?! |
Beta Was this translation helpful? Give feedback.
-
The only thing I can think that is regularly called and can cause this is transfer list refreshing, you can change the interval in the advance setting. Actually, in 4.2.5, subsequent refresh calls can overlap (fixed in master) when CPU is busy causing more damage, so setting large refresh intervals actually may help. AFAIK you can also disable speed graphs from advance settings if you think that is the problem. Another possible reason can be that libtorrent is posting a large number of alerts for some reason, you can add some logging and take a look. Also, I don't think Qt can be the reason. Qt is very efficient and is used in many other high-end applications So it must be something within qbittorrent itself. |
Beta Was this translation helpful? Give feedback.
-
Is the transfer list all refreshed at the same time? Is it possible to perhaps optimize it by just refreshing the visual representation of the items that are visible at any given time? Or do we already do that? As mentioned in #11822 (comment), could it also be the case that there is room for optimization in the way the status icons are displayed in the list? My suspicion is that a bunch of svg icons frequently being loaded could be a problem, perhaps.
A bit of anecdotal evidence: I have noticed, particularly in low end machines, that qBittorrent's WebUI becomes unusable (unresponsive) under high resource consumption scenarios. I suspect this is due to the fact that all parts of the application are fighting unconstrained for a share of the computing resources. Ideally, computations related to GUI code, WebAPI requests (such as those coming from the WebUI), etc should have much higher priority/precedence than, say, libtorrent piece hashing, so that the user can still control the application, even at the expense of a little transfer performance while doing so. I have no idea how this could be implemented, though.
Indeed. |
Beta Was this translation helpful? Give feedback.
-
Perhaps qBittorrent defaults need to be adjusted again?!
In relation to progress bar would the use of palette colors like the Another thing, that may have an impact is if torrents are checking on start-up....currently if a torrent is checked/re-checked, there is no record of this being carried out in the execution logs. |
Beta Was this translation helpful? Give feedback.
-
They do update at the same time but the real implementation of torrent update in libtorrent is actually asynchronous and shouldn't block GUI, even with 10000 torrent I don't see it causing too much load to block GUI indirectly. I think rather then speculating and wasting time it would be better if someone can replicate and profile the application.
Icons are cached. |
Beta Was this translation helpful? Give feedback.
-
Ok, not a problem then.
Well said. An idea could be comparing two profiling runs, one with transfer list icons, and one with no transfer list icons at all, just to see how much CPU the icon display code eats up. I can probably do that in the next few days, if no one does it before that. |
Beta Was this translation helpful? Give feedback.
-
transfer list icons are cached, they can't be the problem, they are only loaded once, but you can try benchmark over it if you wish. |
Beta Was this translation helpful? Give feedback.
-
This may also help #13316 |
Beta Was this translation helpful? Give feedback.
-
off topic, where does qBittorrent make use of |
Beta Was this translation helpful? Give feedback.
-
https://github.com/qbittorrent/qBittorrent/search?l=C%2B%2B&q=zlib Keep in mind the results preview in GitHub's search GUI only shows the first couple matches in each file. |
Beta Was this translation helpful? Give feedback.
-
I'm very sorry but my problem is very similar and was never fully resolved. I'm seeking help and if anyone wants, I can perform tests or benchmarks etc.
The most serious problem is RAM consumption. Sometimes it can stay adequate (2-3 GB) for weeks, and sometimes it's starting to eat more and more by a minute, and when it reaches >20 GB other apps start crashing. I noticed once again that no matter what, on startup qBT seems to access downloaded files of paused and finished torrents, even though there should be no such need. Another suggestion about GUI performance is about tags (or categories). I noticed that whenever current list holds smaller amount of torrents, it performs much better. By default the GUI loads always in "All" category, so it always forcing the worst scenario of RAM consumption from the very start. As soon as it becomes responsive I switch to another category. My guess is that if it's possible to make qBT start with an empty category, or a category with just a few torrents, the GUI would load much faster. I'm not sure what I should provide if you ask me for "Full qBittorrent logs and settings in plain text". My log files are always huge (several MB) and quite useless. Also unicode torrent names are not properly saved. The settings file include some bits that I'd like to keep private, e.g. cookies and paths. |
Beta Was this translation helpful? Give feedback.
-
Right now it appears to be working well and responsive but RAM usage is constantly increasing. From 3 GB ~3 hours ago to 7.5 GB now. I didn't do any actions with existing torrents and didn't add any new ones. 23 MB downloaded and 5 GB uploaded. |
Beta Was this translation helpful? Give feedback.
-
That's a very old version and a whole lot of torrents indeed. I would suggest backing up all your settings/fastresumes (just in case, see https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#Where_does_qBittorrent_save_its_settings for more info), and trying a build of recent Many important fixes have been deployed since 4.1.9, including fixes that massively improve memory usage and GUI startup time in some circumstances. Recently a user with many torrents reported a massive improvement with recent commits: #12825 |
Beta Was this translation helpful? Give feedback.
-
Some general news: #13348 has been submitted with some improvements to startup code. Furthermore, an issue has been identified with tracker announces that can impact GUI startup time massively. Investigation is still ongoing. |
Beta Was this translation helpful? Give feedback.
-
I will try that but which file should I use? What's the difference?
Also will backing up settings/fastresumes really help to avoid massive rechecking in case I downgrade back? |
Beta Was this translation helpful? Give feedback.
-
So far this endeavour has lead to the fixing of a bug in libtorrent that was causing massive increases in startup time if torrents had trackers with URLs not ending in So please test with the build linked in #13348 (comment). It would be interesting to see whether or not you see an improvement in startup time with these new build, even without having solved the recheck problem as mentioned above. |
Beta Was this translation helpful? Give feedback.
-
I tried this first. Observations vs.
So I identified 2 different torrents.
Should I upload .torrent and .fastresume files related to both torrents into new issue? |
Beta Was this translation helpful? Give feedback.
-
Yes, please. As for the rest of your findings, I would suggest the following: backup the fastresumes of the problematic torrents, and remove them from their original location. The goal is to try to get a clean startup shutdown where no torrents enter an error state/recheck loop. Then we can fairly judge possible advancements made in startup performance. The errored fastresumes are a separate issue most likely, that should be handled separately. |
Beta Was this translation helpful? Give feedback.
-
Done.
Sorry but trying to do anything with that amount of torrents (files) is very problematic. Maybe it would be possible if I could somehow export a list of folder paths from selected torrents. |
Beta Was this translation helpful? Give feedback.
-
No problem I completely understand. Your collaboration and diligence is much appreciated.
It's a bit unclear to me what you have in mind, but if you want to extract paths, you can probably do that with the WebAPI and some scripting: https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1) Look into the torrent list and torrent properties API methods. |
Beta Was this translation helpful? Give feedback.
-
Honestly, I get the GUI to freeze with just a few hundred torrents. This is the #1 issue that needs to be addressed. |
Beta Was this translation helpful? Give feedback.
-
Here is my report after upgrading to 4.3.1 - #13416 (comment)
So, not much change GUI-wise. It's still frozen while starting up. RAM usage seems abnormally small for now, at ~430 MB. |
Beta Was this translation helpful? Give feedback.
-
Would someone performance test this version of web ui with a couple of thousand items too? Read more about the progress here. |
Beta Was this translation helpful? Give feedback.
-
I'm getting a really bad lag issue on macOS on 4.3.2. The UI lags a lot when scrolling. I checked my CPU usage and it jumps up to 100% whenever I scroll. This leads me to believe that the app is doing something extremely inefficient (maybe refreshing the scroll view many times when scrolling) resulting in this high CPU usage and intense lag. This is a little disappointing given that qBit is supposed to be a relatively "lightweight" client but is actually eating up CPU and battery when doing basic scrolling in the app. But I don't blame the developers because I'm sure they would have fixed it if they knew the issue. |
Beta Was this translation helpful? Give feedback.
-
I don't know how similar this issue is to #12900, which is specific to Macs, but I am mentioning it here just in case it is related in any way. I will also copy and paste a comment I made on that issue. The UI will start to lag more the bigger the window size of the torrents. If you decrease the number of torrents that can be seen at one time, for example by clicking on the content pane or by making the window smaller, the lag becomes less harsh. This is likely due to inefficient rendering of the table views which make up the torrent files in the GUI list. I see a CPU spike of 100% when scrolling in qBittorrent [on Mac]. This should not be happening. When I scroll through a list in any other app, it barely breaks 20% CPU usage. I assume this is an issue in qBittorrent simply because it wasn't coded "natively" for the macOS platform. @FranciscoPombal If you would like me to perform any sort of tests, I would be happy to do so. |
Beta Was this translation helpful? Give feedback.
-
@puddingsoda Thanks, but I don't have access to macOS. If you can debug/investigate yourself, if you want. Perhaps your findings would help shine light on other issues for other platforms as well. |
Beta Was this translation helpful? Give feedback.
-
@FranciscoPombal I temporarily unpinned this in favor of the Poll issue. It was a random decision. If you want you can unpin #9849 and re-pin this. |
Beta Was this translation helpful? Give feedback.
-
No problem, understandable. I wish GH allowed a few more pinned issues. Anyway, I've been using the Projects tab to track important/frequent issues. In fact, this one should have been there already. Will add now. |
Beta Was this translation helpful? Give feedback.
-
Disk cache set to '256MiB' |
Beta Was this translation helpful? Give feedback.
-
Well not sure if this is correct place to post but I will say that the qBittorrent web GUI fails on me if I get above like 1200-1300 torrents in the queue. I can add more using the API and it will respond to the add no problem. If I let it fall back down in to the 900-1000 range then the web interface will start working again showing torrents and all the information. If I am above 1200-1300 the web interface comes up but it won't show any torrents or upload/download total speeds. Every thing is just blank. I can still use the search tab. So the web interface isn't totally broken but it just doesn't like to handle a large number of torrents. This is for qBittorrent v4.3.5 Web UI (64-bit) on Linux. |
Beta Was this translation helpful? Give feedback.
-
qBittorrent's GUI performance with many torrents (as in, many thousands of torrents) could probably be better.
I created this issue for the purposes of experimentation/investigation/discussion about this, without having to deal with excessive baggage from previous threads.
Relevant background:
TL;DR: a bug in libtorrent was causing a long-running operation to block everything else. While that has been fixed in libtorrent 1.2.8+ (report confirming: #12825 (comment)), the GUI performance still leaves something to be desired.
TL;DR: On Linux, investigation into the problem showed that inefficient WMs/compositors (or some inefficient way qBittorrent interacts with them!) play a significant role in the perceived lack of performance. Other than that, it was probably part #12825, part #11822 (comment):
This is not a thread for regular bug reports. It is expected that posters have some idea of where the problem might be or have done some preliminary investigation/analysis/benchmarks about the problem with developer/power-user performance profiling tools. This is the place to share such findings.
When posting in this thread and investigating these performance issues, please provide as much information as possible from the get-go, to make it easier for others to understand your setup ad environment..
At least:
callgrind
andmassif
are your friends.The goal is to identify specific points where performance can be improved in relation to the GUI, and particularly in the transfer list. As each specific cause/bug becomes clearer and defined as its own separate matter, discussion about it may move to a dedicated thread about it (this is also useful for having something specific to close when submitting a PR). This one is just for initial investigations/brainstorming, e.g. "What if excessive icon load/unload is slowing down the transfer list?", "How can we test that?" "We could try doing foo..." "I tried <this patch>, and got the following results..."...
Beta Was this translation helpful? Give feedback.
All reactions