Six different deluged processes running

General support for problems installing or using Deluge
Post Reply
Garu94
Member
Member
Posts: 14
Joined: Thu Dec 05, 2019 11:44 am

Six different deluged processes running

Post by Garu94 »

Hi, I have six torrents (I think, I can't scroll deluge-console though unfortunately), some of which are paused, but still when I look at htop I find 7 different processes from deluge daemon, all of which draining 19.2% of RAM (see screenshot). https://imgur.com/a/q7sLJs8
Is it normal? How can I reduce the ram usage?
Could this be the problem for donwload speed being so low? I am downloading at about 10/20 KiB/s average with peak speed at about 500/600 KiB/s, while on PC I can download way faster, up to 2/3 MiB/s.

I also tried limiting the number of torrents downloading per time to one, other than paused some of them, but nothing helped.

EDIT: just noticed a 8th process that use 80% of CPU instead. I am on a Raspberry Pi Zero W, that's why resources are so low. How could I optimize deluged?
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Six different deluged processes running

Post by shamael »

Hi,

So far I know it's not normal, on my system I see only one process so you need to figure out the way you launch Deluge daemon and fix it (manually, systemd, etc...). Kill all processes, start a legit one with your regular procedure and check the behaviour. Restart the RPI and check the number of process again.

On my RPI3 a limit the number of simultaneous download to one to avoid trouble, work way better this way. I set the D/L speed to 6MB/s to not impact too much the upload and I'm able to reach this speed w/o problem. Not the same HW than you of course.

The GTK client uses a lot of CPU when connected so if you use the client/daemon consider not leaving it connected all the time
Garu94
Member
Member
Posts: 14
Joined: Thu Dec 05, 2019 11:44 am

Re: Six different deluged processes running

Post by Garu94 »

Hi,
Are you on a Raspberry Zero W too?
To limit the download to one, is it enough to edit ~/.config/deluge/core.conf ("max_active_downloading" field)?
Would you show me your service? Mine looks like this:

Code: Select all

[Unit]
Description=Deluge Bittorrent Client Daemon
Documentation=man:deluged
After=network-online.target media-usb1.mount
Requires=media-usb1.mount
BindsTo=media-usb1.mount

[Service]
Type=simple
UMask=007

ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L debug

Restart=on-failure

# Time to wait before forcefully stopped.
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target media-usb1.mount

Also, I don't know if they are actual processes (because ps -aux only shows one of them) or other stuff that I don't understand, they are listed when I run htop.
EDIT: As I understood, they are different threads of the process "deluged"
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Six different deluged processes running

Post by shamael »

Mine is a PI 3b.

Yes this should work. I limited the connection per torrent ( 20), total connection (100), and set the queue above 1000 torrents to have all my torrents seeding. I'm able to reach almost 630 loaded torrents before hitting an HW limit and RPC disconnection with GTK client.

My service is similar, I added a dependency to the attached USB disk and a dedicated user/group. All services on my setup is segregated through ACL on group/user level

Code: Select all

[Unit]
Description=Deluge Bittorrent Client Daemon
Documentation=man:deluge
# Start after network and specified mounts are available.
After=network-online.target mnt-element.mount
Requires=mnt-element.mount
# Stops deluged if mount points disconnect
BindsTo=mnt-element.mount

[Service]
Type=simple
User=deluge
Group=deluge
UMask=007
ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L info
Restart=on-failure
# Time to wait before forcefully stopped.
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target mnt-element.mount
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Six different deluged processes running

Post by shamael »

Did you enabled the service for your user (systemctl --user enable xxx?). If so the service will be executed as root when you log on as "pi"
it may explain why you have multiple deluged process, which is not my case. I checked, only one is referenced
Garu94
Member
Member
Posts: 14
Joined: Thu Dec 05, 2019 11:44 am

Re: Six different deluged processes running

Post by Garu94 »

Did you enabled the service for your user (systemctl --user enable xxx?). If so the service will be executed as root when you log on as "pi"
I think I enabled it with "systemctl enable deluged", without the --user option. Is this the problem?
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Six different deluged processes running

Post by shamael »

No this is right, is enable for all user and not only when log on with the user PI. I was considering it may be a problem but forget it
The root cause of all your deluged process is still not clear so?
Post Reply