Page 1 of 1

Deluged "internal cron"?

Posted: Sat Feb 14, 2015 5:13 pm
by bhavicp
Hello,

I have several Deluged daemons running (around 7) on my system, and roughly every 20ish minutes (seems to be random, sometimes it'll happen after just 10 minutes), a bunch of the daemons use over 100% CPU and the load spikes up to sometimes over 60-70 for a few seconds and basically freezes the system and affects everything else (webserver etc). Is there some sort of 'internal cron' which Deluge runs? or something else that happens every X minutes, triggered by something? I don't see anything of significance in core.conf, but any suggestions are welcome.

OS: Debian 7.X 64bit (headless)
deluged: 1.3.11
libtorrent: 0.15.10.0
Deluge-web

I do believe this has started happening since I upgrade to 1.3.11 but I can't be completely sure. I've only noticed these spikes recently (but suggests has been happening for a while)

Code: Select all

top - 10:05:26 up 149 days, 17:13, 5 users, load average: 113.74, 39.40, 29.60
Tasks: 1259 total, 38 running, 1221 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.8 us, 90.6 sy, 0.0 ni, 5.3 id, 0.9 wa, 0.0 hi, 0.5 si, 0.0 st

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21218 user1 1 -19 501m 300m 4464 S 201 0.3 3675:26 deluged
2433 user2 1 -19 360m 119m 5048 S 183 0.1 141:56.95 deluged
17071 user3 1 -19 334m 90m 4556 S 161 0.1 162:15.39 deluged

Re: Deluged "internal cron"?

Posted: Sun Feb 22, 2015 12:18 am
by bro
Hi

There are actually a few different such events triggered regularly instances of LoopingCall. You can search through the source to see what they do.

The two most resource hungry LoopingCalls are probably in deluge/core/torrentmanager.py:
  • save_state_timer: saves the state file every 200 seconds. The function it calls creates a list containing the state of each torrent and saves it to disk.
  • save_resume_data_timer: This one is triggered every 190 seconds, and calls the libtorrent function save_resume_data for every torrent in the list.
I don't think there were any changes to this in the last versions, but I may be wrong.