Skip to content
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

Start UI before loading torrents #12914

Closed
nokti opened this issue May 25, 2020 · 18 comments
Closed

Start UI before loading torrents #12914

nokti opened this issue May 25, 2020 · 18 comments
Labels
GUI GUI-related issues/changes Performance

Comments

@nokti
Copy link

nokti commented May 25, 2020

qBittorrent version and Operating System

qBit 4.2.2 / Windows x64 (i7 3.60 GHz / 16 GB RAM)

What is the problem

I currently have over 3,000 torrents in qBit and when I start it I get a blank screen for several minutes (between 4-5 minutes):

qBit

What is the expected behavior

It would be nice if the UI would start first, then loads the torrents. Atm it just looks like qBit has crashed when it is actually loading all the torrents. The bittorrent client BiglyBT has an option to start the UI before the core initialization for example. That is really neat.

Steps to reproduce

Start any of the recent versions of qBit 4.2.x with hundreds of torrents.

Extra info(if any)

I downgraded from v4.2.5 because of the high ram usage and also because v4.2.5 takes forever to exit (whilst v4.2.2 only takes a couple of seconds).

@xavier2k6
Copy link
Member

@nokti can you change your file pool size in advanced settings from 40 to 4000 please & report back.

@FranciscoPombal FranciscoPombal added GUI GUI-related issues/changes Performance labels May 25, 2020
@ghost
Copy link

ghost commented May 26, 2020

Did you add any of those torrents with skip hash check?

@nokti
Copy link
Author

nokti commented May 26, 2020

@nokti can you change your file pool size in advanced settings from 40 to 4000 please & report back.

I did and this morning it took qBit even longer to start up (about 5 minutes). I also have 20 more torrents since yesterday (total is now at 3,300). My experience is that the more torrents I add, the longer qBit takes to start up. To be fair I had the same problem with µTorrent 2.2.1

Did you add any of those torrents with skip hash check?

No, I never do that.

edit: To give more info about my set up: qBit is installed on my main disk (C:) but the destination folder (default save path) is on a second disk (D:). Both disks are inside the tower plugged to the MB with regular SATA cables.

@xavier2k6
Copy link
Member

xavier2k6 commented May 26, 2020

I currently have over 3,000 torrents in qBit and when I start it I get a blank screen for several minutes (between 4-5 minutes):

I did and this morning it took qBit even longer to start up (about 5 minutes). I also have 20 more torrents since yesterday (total is now at 3,300).

You went from between 4-5 mins to about 5mins, how exactly is that longer??
It could very well be the same amount of time??? an accurate way of getting how long it takes is to look at the logs & it will show the time from when qBittorrent started to when the last torrent was restored.

In any case, it seems like you may be experiencing something similar to #12825 as the users there have alot of torrents too (7,000+) but at least your situation differs in the fact that your drive is in the same machine & not an attached array or nas device on a network.

To be fair I had the same problem with µTorrent 2.2.1
That's interesting.....

@FranciscoPombal thoughts?

@nokti
Copy link
Author

nokti commented May 26, 2020

You went from between 4-5 mins to about 5mins, how exactly is that longer??

Well I used a stopwatch to compare (because it was on my desk after running). But here's what the log says:

yesterday (4:11):
2020-05-25T 08:59:01 - qBittorrent v4.2.2 started
2020-05-25T 09:03:12 (last torrent restored)

today (5:06):
2020-05-26T 08:46:58 - qBittorrent v4.2.2 started
2020-05-26T 08:52:04 (last torrent restored)

@xavier2k6
Copy link
Member

xavier2k6 commented May 26, 2020

You went from between 4-5 mins to about 5mins, how exactly is that longer??

Well I used a stopwatch to compare (because it was on my desk after running). But here's what the log says:

yesterday (4:11):
2020-05-25T 08:59:01 - qBittorrent v4.2.2 started
2020-05-25T 09:03:12 (last torrent restored)

today (5:06):
2020-05-26T 08:46:58 - qBittorrent v4.2.2 started
2020-05-26T 08:52:04 (last torrent restored)

Well - that's more definitive. thank you.

Also, what is your disk cache set to?

Can you try this build below:

Windows test build of 4.2.5 with listed libraries:

libtorrent-rasterbar | 1.2.6 +git 2622792
Qt                   | 5.14.2
OpenSSL              | 1.1.1g
zlib                 | 1.2.11
Boost                | 1.73

Download Link

@ghost
Copy link

ghost commented May 26, 2020

I downgraded from v4.2.5 because of the high ram usage and also because v4.2.5 takes forever to exit (whilst v4.2.2 only takes a couple of seconds).

4.2.5 has some RAM leak issues. But 4.2.2 has even worse issues. You should always use latest version when posting issues. As it’s hard to diagnose an issue which maybe non existent in latest version.

@nokti
Copy link
Author

nokti commented May 26, 2020

Also, what is your disk cache set to?

Auto. With expiry interval 60s and OS cache checked.

Can you try this build below:

Windows test build of 4.2.5 with listed libraries:

libtorrent-rasterbar | 1.2.6 +git 2622792
Qt                   | 5.14.2
OpenSSL              | 1.1.1g
zlib                 | 1.2.11
Boost                | 1.73

Download Link

Ok, will do a backup first, just in case...
What is the .pdb file? Do I need it?

@FranciscoPombal
Copy link
Member

Ok, will do a backup first, just in case...
What is the .pdb file? Do I need it?

Debugging symbols. Useful for stacktraces in case of a crash. Did your regular installation not come with it? It should have.

@xavier2k6
Copy link
Member

xavier2k6 commented May 26, 2020

Auto

Another reason to update to 4.2.5!!!!
Reason - there recently was a bug in libtorrent algorithm discovered that actually set the disk cache to 0 for 16GiB memory like in your system.

ref: #12336 (comment)

What is the .pdb file?

this is essentially a debug file, it contains symbols etc to help developers debug issues.

Do I need it?

qBittorrent needs it, yes.

If you look where you have qBittorrent installed you will actually see these two files (you can make a copy of them & put them elsewhere for safe keeping if you like, another folder on desktop etc & just drop in the two files to your installed folder from my build in their place)

@nokti
Copy link
Author

nokti commented May 26, 2020

I downgraded from v4.2.5 because of the high ram usage and also because v4.2.5 takes forever to exit (whilst v4.2.2 only takes a couple of seconds).

4.2.5 has some RAM leak issues. But 4.2.2 has even worse issues. You should always use latest version when posting issues. As it’s hard to diagnose an issue which maybe non existent in latest version.

You're right of course. Although in this case the slow startup was also present with v4.2.5 (and previous versions).

@nokti
Copy link
Author

nokti commented May 26, 2020

Can you try this build below:

Windows test build of 4.2.5 with listed libraries:

libtorrent-rasterbar | 1.2.6 +git 2622792
Qt                   | 5.14.2
OpenSSL              | 1.1.1g
zlib                 | 1.2.11
Boost                | 1.73

Download Link

Here's the timings from the log with the above build:

1/ I exited v4.2.2, replaced the files with the new build, and restarted qBit:

2020-05-26T 16:34:33 - qBittorrent v4.2.5 started
2020-05-26T 16:37:06 (last torrent loaded)

2/ I exited v4.2.5, restarted my computer, then started v4.2.5:

2020-05-26T 16:53:28 - qBittorrent v4.2.5 started
2020-05-26T 16:58:16 (last torrent loaded)

Restarting the application was faster (2:33) than launching it after a system restart (4:48). v4.2.5 also took between 2-3 mn to exit, against a couple of seconds for v4.2.2

@ghost
Copy link

ghost commented May 26, 2020

Can you set disk cache to 128 MiB and check if your high RAM usage issue is solved?
Auto uses insanely high amount of RAM without any noticeable improvements in performance. The fact that 4.2.2 using less RAM is due to a bug in auto cache algorithm.

@ghost
Copy link

ghost commented May 26, 2020

Auto cache settings should either have a upper limit or qbt shouldn’t be using it as default.
Just because someone has more RAM installed doesn’t mean they want a torrent client to use a huge chunk of it. Most people prefer a low memory footprint for an app running in the background.

@nokti
Copy link
Author

nokti commented May 26, 2020

Can you set disk cache to 128 MiB and check if your high RAM usage issue is solved?
Auto uses insanely high amount of RAM without any noticeable improvements in performance. The fact that 4.2.2 using less RAM is due to a bug in auto cache algorithm.

Well like I explained somewhere else my problem is not so much that qBit uses a lot of RAM but that it doesn't seem to be flushed periodically. Right now it is idle and using 650 MB... This is probably unnecessary.

I've been using this app to clean unused memory, it works really well: https://www.henrypp.org/product/memreduct

edit: more timings from this morning's start up:

2020-05-27T 08:47:51 - qBittorrent v4.2.5 started
2020-05-27T 08:51:47 (last torrent loaded)

3:56, so that's inbetween yesterday's timings. 3 to 4 minutes seems to be the time necessary to load all the torrents. That's a minute faster than with v4.2.2 so I'll stick with this build.

@nokti
Copy link
Author

nokti commented May 28, 2020

If I can add some more info that may help resolve this issue:

  • it's happend that I would inadvertently close qBit and then restart it almost immediately (once it's finished exiting obviously). On rare occasions qBit would be operational in only a couple of seconds. Same thing with µTorrent 2.2.1 actually. But I never understood why, it seemed kind of random.

  • I'm also running another client, BiglyBT, with around 85 torrents. The client first starts the UI then it starts by "allocating" each torrent. I'm not sure what that means. It only takes a fraction of a second (but enough to take a screenshot, see below) but if you have thousands of torrents this could amount to some noticeable time. Could qBit be doing something similar, therefore slowing down the startup process?

BBT

@DiegoFleitas
Copy link

@nokti can you change your file pool size in advanced settings from 40 to 4000 please & report back.

I can confirm I had this very same issue with 4.2.5 and following these instructions seems to have fixed it

@FranciscoPombal
Copy link
Member

This is either a matter of file pool size being set too low or a duplicate of #12825. If the latter is the case, try to reproduce with the build linked in #12825 (comment), which contains a recent enough libtorrent version that fixes the issue. If it's yet a different problem, please open a new issue report with as much detailed profiling information as possible.

@qbittorrent qbittorrent locked as resolved and limited conversation to collaborators Aug 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
GUI GUI-related issues/changes Performance
Projects
None yet
Development

No branches or pull requests

4 participants