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

DietPi-Software | Transmission: high RAM usage #6849

Open
quickplaymobile opened this issue Jan 11, 2024 · 14 comments
Open

DietPi-Software | Transmission: high RAM usage #6849

quickplaymobile opened this issue Jan 11, 2024 · 14 comments
Labels
External bug 🐞 For bugs which are not caused by DietPi. Investigating 🤔
Milestone

Comments

@quickplaymobile
Copy link

quickplaymobile commented Jan 11, 2024

Creating a bug report/issue

  • [ Yes ] I have searched the existing open and closed issues

Required Information

  • DietPi version | cat /boot/dietpi/.version

G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=25
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN

bullseye 0

  • Kernel version | uname -a

Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

RPi 4 Model B (aarch64)

  • Power supply used | (EG: 5V 1A RAVpower)

Official RPi 4 charger (Raspberry Pi 15W USB-C Power Supply)

  • SD card used | (EG: SanDisk ultra)

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)

44 Transmission: BitTorrent server with web interface (C)

  • Was the software title installed freshly or updated/migrated?

Not sure, remember seeing an update 2 months ago.

  • Can this issue be replicated on a fresh installation of DietPi?

  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. Download any torrent.
  2. Seed the torrent for a couple of hours.

Expected behaviour

  1. Torrent starts downloading.
  2. Ram usage goes UP.
  3. Torrent finishes downloading.
  4. Ram usage goes back to normal range.

Actual behaviour

  1. Torrent starts downloading.
  2. Ram usage goes UP.
  3. Torrent finishes downloading.
  4. Ram usage gets stuck at 1.5 - 1.6 GB usage.

Extra details

I don't have any logs or anything else I can say about it. More than an anomaly in ram usage and the external HDD remaining active. I also found out that even if I delete the torrent from transmission the ram usage get stuck and HDD stays active.

@quickplaymobile quickplaymobile changed the title Transmission high RAM usage and active HDD after downloading a torrent and seeding for a while. Transmission high RAM usage Jan 11, 2024
@MichaIng MichaIng changed the title Transmission high RAM usage DietPi-Software | Transmission: high RAM usage Jan 11, 2024
@ghost
Copy link

ghost commented Jan 15, 2024

Hi!

Don't know if it's related but I've noticed a similar issue with Plex: start streaming something, ram usage goes up, end streaming and ram usage is stuck.

Regards

@quickplaymobile
Copy link
Author

Problem still persistent after last update
Untitled-1

@MichaIng
Copy link
Owner

@DesignPixelZ
But the torrents are still in place (ready for seeding). Does RAM usage remain high when you remove the torrents completely from the UI?

Of course, if you disabled seeding, then it wouldn't make sense to keep anything of these torrents in RAM/cache, but that is a different topic. AFAIK there is a way to have finished (downloaded) torrents removed automatically.

@quickplaymobile
Copy link
Author

@DesignPixelZ But the torrents are still in place (ready for seeding). Does RAM usage remain high when you remove the torrents completely from the UI?

Yes RAM usage remains high even when removing the torrents completely from the UI.

Of course, if you disabled seeding, then it wouldn't make sense to keep anything of these torrents in RAM/cache, but that is a different topic. AFAIK there is a way to have finished (downloaded) torrents removed automatically.
Seeding wasn't disabled, It didn't had any leaches at the moment.

After restarting transmission and letting it seed for a while everything seems to be normal. The bug seems to occur only after finishing to download a torrent.

Untitled-1

@MichaIng MichaIng added the External bug 🐞 For bugs which are not caused by DietPi. label Jan 21, 2024
@MichaIng
Copy link
Owner

Okay, as others reported something similar even with recent Transmission versions, we should report this to either Debian or upstream. Would be good to replicate the issue with a public and legal test torrent, so we can write down steps to replicate the issue. Not exactly what I was looking for, but one of those might just do the job: https://whirlpool.net.au/wiki/test_torrents

Would be also good to verify on Debian Trixie/Sid. I'll do so when I find time on a VM.

@MichaIng MichaIng added this to the v9.1 milestone Jan 21, 2024
@quickplaymobile
Copy link
Author

Until this gets fixed is there any way to make it reload the service every hour?

I don't have access to reload it manually every time I'm downloading something.

@MichaIng
Copy link
Owner

MichaIng commented Feb 4, 2024

echo -e '#!/bin/sh\nexec systemctl restart transmission-daemon' > /etc/cron.hourly/restart-transmission
chmod +x /etc/cron.hourly/restart-transmission

@Joulinar
Copy link
Collaborator

Joulinar commented Feb 4, 2024

I doubt this is something we can fix for our end. However, you could add a crontab entry to restart the service regularly.

@MichaIng
Copy link
Owner

MichaIng commented Feb 4, 2024

Doing restarts without explicit knowledge of admin/user is problematic IMO and causes other confusion/problems. I am also not sure whether the raising RAM usage is a problem for everyone, probably many do not recognise it, when their systems have sufficient RAM or do downloads only casually. So let's keep this as possible workaround here, for those, who really have issues with it.

But we should test and in case report to to Debian and/or upstream.

@quickplaymobile
Copy link
Author

I have enough RAM to not care about it, but, from what I've seen it also prevents the HDD from sleeping and that may damage it on the long run since is not a SSD.

Thanks for the script! I will probably switch to other torrent client in the future until it gets fixed. And when I have the time I will do a fresh install of dietpi and report if the problem persists.

@MichaIng
Copy link
Owner

MichaIng commented Feb 4, 2024

Do you have a swapfile on that external drive? Or is it then really that Transmission somehow keeps the downloaded files from even removed (GUI-wise) torrents open in a way that keeps that drive busy as well?

@quickplaymobile
Copy link
Author

It's related to this high ram usage after finishing downloading. Usually if there are no leachers on the torrent when seeding the hdd goes to sleep. If I don't restart transmission after finishing a download the hdd will stay active, this applies even if I remove or pause the torrent.

@MichaIng MichaIng modified the milestones: v9.1, v9.2 Feb 20, 2024
@quickplaymobile
Copy link
Author

quickplaymobile commented Feb 23, 2024

Experiencing the same issue with qBittorrent
Screenshot 2024-02-23 173913

I will try a clean install.

@quickplaymobile
Copy link
Author

quickplaymobile commented Feb 23, 2024

I can confirm that I'm having the same issue after a clean install of DietPi.

After finishing downloading.
after download

How it should be... (after reboot).
oups

Edit: I think this may be normal. Downloaded a bigger file and it gets back to 189-ish MB instead of getting stuck at 900+ MB like the image above. So... yeah... I don't know what it was but, it was something.

@MichaIng MichaIng modified the milestones: v9.2, v9.3 Mar 17, 2024
@MichaIng MichaIng modified the milestones: v9.3, v9.4 Apr 16, 2024
@MichaIng MichaIng modified the milestones: v9.4, v9.5 May 13, 2024
@MichaIng MichaIng modified the milestones: v9.5, v9.6 Jun 10, 2024
@MichaIng MichaIng removed this from the v9.6 milestone Jul 10, 2024
@MichaIng MichaIng added this to the v9.7 milestone Jul 10, 2024
@MichaIng MichaIng modified the milestones: v9.7, v9.8 Aug 26, 2024
@MichaIng MichaIng modified the milestones: v9.8, v9.9 Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External bug 🐞 For bugs which are not caused by DietPi. Investigating 🤔
Projects
None yet
Development

No branches or pull requests

3 participants