linuxserver / docker-qbittorrent

GNU General Public License v3.0
1.03k stars 148 forks source link

Abnormal CPU usage after update (4.4.5-r0-ls213) #188

Closed jojolll closed 1 year ago

jojolll commented 2 years ago

linuxserver.io


Expected Behavior

CPU usage 0-3% when IDLE, no active downloads or uploads

Current Behavior

The CPU usage is out of control since the update this morning. We are at about 15% of CPU on my raspberry pi 4, in IDLE (without any download or upload). Before the update, it was bewteen 0 and 1%. No worrying logs. Everything seems normal except this CPU consumption

I reinstalled the software completely (default config), the problem persists, and other users seem to be impacted : https://github.com/alexbelgium/hassio-addons/issues/458

I also tried to use each of the 4 available UIs in the config, no difference on CPU consumption.

Steps to Reproduce

I've just updated, since that my CPU is 15° hotter than usual

Environment

OS: Home Assistant OS CPU architecture: arm64 How docker service was installed: I use alexbelgium addon, based on your image and without any problems in the previous versions

Docker logs

I cannot issue this command, so here is my addon logs :

[custom-init] no custom services found, skipping...
cont-init: info: running /etc/cont-init.d/00-aaa_dockerfile_backup.sh
[migrations] started
[migrations] no migrations found
cont-init: info: /etc/cont-init.d/00-aaa_dockerfile_backup.sh exited 0
cont-init: info: running /etc/cont-init.d/00-banner.sh
-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/
Brought to you by linuxserver.io
-------------------------------------
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    0
User gid:    0
-------------------------------------
-----------------------------------------------------------
 Add-on: Qbittorrent
 qBittorrent is a bittorrent client
-----------------------------------------------------------
 Add-on version: 4.4.5-r0-ls213
 You are running the latest version of this add-on.
 System: Home Assistant OS 8.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2022.8.7
 Home Assistant Supervisor: 2022.08.5
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
 https://github.com/alexbelgium/hassio-addons
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/00-folders.sh
cont-init: info: /etc/cont-init.d/00-folders.sh exited 0
cont-init: info: running /etc/cont-init.d/30-nginx.sh
cont-init: info: /etc/cont-init.d/30-nginx.sh exited 0
cont-init: info: running /etc/cont-init.d/90-dns_set.sh
[16:23:16] INFO: DNS SERVERS set to 1.1.1.1 8.8.8.8 
cont-init: info: /etc/cont-init.d/90-dns_set.sh exited 0
cont-init: info: running /etc/cont-init.d/91-qbittorrent_configuration.sh
[16:23:17] INFO: Downloads can be found in /share/Films BL
[16:23:18] INFO: Whitelisted subsets will not require a password : localhost,127.0.0.1,172.30.0.0/16,192.168.0.0/16
[16:23:18] INFO: WEBUI username set to admin
[16:23:18] INFO: Alternate UI enabled : vuetorrent. If webui don't work, disable this option
[16:23:20] INFO: Default username/password : admin/adminadmin
[16:23:20] INFO: Configuration can be found in /config/qBittorrent
cont-init: info: /etc/cont-init.d/91-qbittorrent_configuration.sh exited 0
cont-init: info: running /etc/cont-init.d/92-local_mounts.sh
cont-init: info: /etc/cont-init.d/92-local_mounts.sh exited 0
cont-init: info: running /etc/cont-init.d/92-smb_mounts.sh
cont-init: info: /etc/cont-init.d/92-smb_mounts.sh exited 0
cont-init: info: running /etc/cont-init.d/93-openvpn.sh
[16:23:21] INFO: Direct connection without VPN enabled
cont-init: info: /etc/cont-init.d/93-openvpn.sh exited 0
[custom-init] no custom files found, skipping...
******** Information ********
To control qBittorrent, access the WebUI at: http://localhost:8080
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun qbittorrent (no readiness notification)
[ls.io-init] done.
[16:23:22] INFO: Starting NGinx...
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET / HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /css/chunk-vendors.7301e792.css HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /css/app.759eceb8.css HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /css/490.e7aa005a.css HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /js/490.b31a1a66.js HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /api/v2/app/version HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /api/v2/sync/maindata HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /api/v2/torrents/categories HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /service-worker.js HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:36 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /api/v2/torrents/info?reverse=true&hashes= HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:38 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /api/v2/sync/maindata?rid=1 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
[01/Sep/2022:16:24:38 +0200] 200 192.168.1.102, 172.30.32.1(172.30.32.2) GET /api/v2/torrents/info?reverse=true&hashes= HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36)
github-actions[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

C8opmBM commented 2 years ago

I have the same issue as yours. Even in idle, just seeding, the CPU is at 20%

The problem is not with linuxserver container, it's with the upstream changes since version 4.4.x when they introduced libtorrent 2.0.x replacing 1.2.x. This issue affects some systems, as it seems also yours and mine and a lot of others as it seems.

What is a bit weird, this exact release should have fixed the abnormal cpu usage, since it defaults back to libtorrent 1.2.x (at least this is what I read on the changelog on the official website). However, it doesn't seem to fix it (for me at least).

Can anyone confirm this release uses libtorrent 1.2.x?

For me, while pulling containers, the latest release which has no impact on my cpu is v4.3.9 lscr.io/linuxserver/qbittorrent:version-14.3.9.99202110311443-7435-01519b5e7ubuntu20.04.1

So for the time being, I will be using that, hopefully the next one will finally solve this annoying cpu usage.

_qBittorrent v4.4.5 was released. NOTE: The default builds for all OSs switched to libtorrent 1.2.x (RC_1_2) from 2.0.x (RC_2_0). Builds for libtorrent 2.0.x are also offered and are tagged with RC_2_0. The switch happened due to user demand and perceived performance issues. If until now you didn't experience any performance issue then go ahead and use the RC_20 builds.

Gamertech commented 2 years ago

As above, the problem is most likely libtorrent v2.x. In fact it's likely the cause of most of the currently open issues.

qBittorrent have finally changed back to v1.x as default branch, but the LS image is still currently bundling v2.x with 4.4.5 as it's what's in the Alpine repo upstream, so the images after 14.3.9 are still broken unfortunately.

EsEnZeT commented 2 years ago

Yeah, no point using this version because it's somehow based on shitty libtorrent 2.x, no idea how/why they build like that for alpine edge repo => https://pkgs.alpinelinux.org/packages?name=qbittorrent&branch=edge&repo=&arch=&maintainer=

I think they should consider swapping to some proper builds like this ones: https://github.com/userdocs/qbittorrent-nox-static

Wrykoulaka commented 2 years ago

I just tried this version after reading the changelog and ended up here. Hoping for a new version without libtorrent v2.x...

EsEnZeT commented 2 years ago

Hoping for a new version without libtorrent v2.x... I wouldn't expect that, you can have look on issues and it looks like maintainer(s) pretty much doesn't interact with any of them. I would rather clone that and change some logic to get userdocs static builds.

AdrienPoupa commented 2 years ago

I had the same question, I contacted Alpine's maintainer, hopefully they switch back to Libtorrent 1.2 for the next release :)

Edit: they are not experiencing the issue and will not switch back to 1.2. I guess LinuxServer would need to switch to using the nox static repo.

Arderos commented 2 years ago

Same issue here.

kanedauy commented 2 years ago

Same issue, same platform, going back to 4.3.9

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

thespad commented 1 year ago

A libtorrentv1 tag now exists for those of you experiencing issues with v2.

kovacsgergely83 commented 1 year ago

A libtorrentv1 tag now exists for those of you experiencing issues with v2.

I'd suggest everyone, who had performance issues give the "libtorrent v1" builds a try - it significantly improved web ui responsiveness in my case while downloading huge files at high speed, see issue #175 for more info.

kanedauy commented 1 year ago

Thanks a lot, that tagged version fixed my issue with 4.4.5 Running in Raspberry Pi 4, Linux version 5.15.76-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022