High CPU usage

Linux specific questions, problems.
Post Reply
dinjo

High CPU usage

Post by dinjo »

Today onwards i started facing issue of high CPU usage during usage of qbittorrent and this came all of sudden , CPU peaks at 60% and load average reaches around 4 causing severe slowdown in media operations while watching movies via minidlna

Please note similar size torrent was getting downloaded perfectly fine till yesterday , please let me know how can i investigate this further, the memory usage is very low - 30MB
Switeck

Re: High CPU usage

Post by Switeck »

Does CPU usage go down if you increase the refresh delay of qBitTorrent (advanced setting in ms) to 5000 ms and/or change qBT's cache settings to -1 (automatic)?

If not, please give more details about your qBT's settings...such as max connections allowed vs total peers+seeds actually connected and how many total torrents are loaded into qBT.

These issue reports might be related to your problem:
https://github.com/qbittorrent/qBittorrent/issues/7104
https://github.com/qbittorrent/qBittorrent/issues/7881
https://github.com/qbittorrent/qBittorrent/issues/8273
magao

Re: High CPU usage

Post by magao »

I've found that the biggest cause of high CPU usage is having lots of torrents and a low "Save resume data interval". At least when running in a VM on my QNAP qBT uses a lot of CPU to do this, and it can get to the point where the VM is constantly at 100% CPU.

My solution was to increase the interval to 5 minutes - increases the chance of losing resume data, but it's long enough that I only have periods of 100% CPU instead of all the time when I've got a lot of torrents.

Note that this isn't active torrents - torrents in the paused state cause this.
dinjo

Re: High CPU usage

Post by dinjo »

I'll provide the settings in a while I didn't mention the version is 3.3.16 on arm processor and high Cpu usage occurs only when I start downloading in idle state the load average is around 0.02
dinjo

Re: High CPU usage

Post by dinjo »

Below is my config , I'm running it headless with Web UI

Code: Select all

[AutoRun]
enabled=true
program=/root/extract.sh %D %N

[LegalNotice]
Accepted=true

[Network]
Cookies="__cfduid=df03b1461fd9626d1c9893fc7198f050e1488005391; HttpOnly; expires=Sun, 25-Feb-2018 06:49:51 GMT; domain=.maxmind.com; path=/", "__cfduid=da77c9288b913d37ab29fac159a5addd31505551626; HttpOnly; expires=Sun, 16-Sep-2018 08:47
:06 GMT; domain=.torrent.cd; path=/"

[Preferences]
Advanced\AnonymousMode=false
Advanced\IncludeOverhead=false
Bittorrent\AddTrackers=false
Bittorrent\DHT=false
Bittorrent\Encryption=1
Bittorrent\LSD=false
Bittorrent\MaxConnecs=200
Bittorrent\MaxRatioAction=0
Bittorrent\MaxUploads=8
Bittorrent\PeX=false
Bittorrent\uTP=false
Bittorrent\uTP_rate_limited=false
Connection\GlobalDLLimitAlt=0
Connection\GlobalUPLimit=0
Connection\GlobalUPLimitAlt=0
Connection\PortRangeMin=65239
Connection\Proxy\IP=0.0.0.0
Connection\Proxy\Password=
Connection\Proxy\Port=8080
Connection\Proxy\Username=
Connection\ProxyType=-1
Downloads\PreAllocation=false
Downloads\SavePath=/media/usbhd/
Downloads\ScanDirsV2=@Variant(\0\0\0\x1c\0\0\0\0)
DynDNS\DomainName=changeme.dyndns.org
DynDNS\Enabled=false
DynDNS\Password=
DynDNS\Service=0
DynDNS\Username=
General\Locale=
General\UseRandomPort=false
MailNotification\email=
MailNotification\enabled=false
MailNotification\password=
MailNotification\req_auth=false
MailNotification\req_ssl=false
MailNotification\smtp_server=
MailNotification\username=
Queueing\QueueingEnabled=false
WebUI\HTTPS\Enabled=false
WebUI\LocalHostAuth=false
WebUI\Password_ha1=@ByteArray(5ebe2294ecd0e0f08eab7690d2a6ee69)
WebUI\Port=8080
WebUI\ServerDomains=*
WebUI\UseUPnP=true
WebUI\Username=admin
Switeck

Re: High CPU usage

Post by Switeck »

Torrent file preallocate is disabled, so that can be a problem while downloading as opposed to a cpu and disk I/O meltdown at start unless you have a fast line and/or very slow HDD.
DHT, LSD, PeX, and uTP are disabled, so that should mean lower CPU usage.
You haven't gone crazy on max connections limit.
Half open connection limit might be high, it's not mentioned.
qBT's cache may be disabled and/or OS cache disabled as well...which might cause more CPU usage ironically.

Depending on how much you're uploading and how fast your line can upload, a limit of 8 upload slots may be too low...but that shouldn't cause CPU usage to be high at all.
dinjo

Re: High CPU usage

Post by dinjo »

I recompile the package yesterday and now it's failing to start

The Web UI administrator user name is: admin
qbittorrent-nox: symbol lookup error: qbittorrent-nox: undefined symbol: _ZN10libtorrent14create_torrentC1ERKNS_12torrent_infoEb
Switeck

Re: High CPU usage

Post by Switeck »

Hopefully someone who's compiled qBT's Linux versions can help... I can't.
dinjo

Re: High CPU usage

Post by dinjo »

It was failing due to conflicting with libtorrent , recompiled libtorrent and qbittorrent to resolve the issue
Post Reply