Performance issues with Transmission

My YunoHost server

Hardware: Odroid UX4 / Armbian
YunoHost version: 3.6.5.3

Issue

Recently I installed Transmission and was experimenting really poor performance, especially when downloading torrents.

transmission-daemon was using between 50 and 80% CPU and a lot of memory.
In the system log I had the following errors.

swapper/7: page allocation failure: order:0, mode:0x1080020(GFP_ATOMIC), nodemask=(null)
swapper/7 cpuset=/ mems_allowed=0
CPU: 7 PID: 0 Comm: swapper/7 Not tainted 4.14.150-odroidxu4 #2
Hardware name: ODROID-XU4
[<c010b8b9>] (unwind_backtrace) from [<c01087e3>] (show_stack+0xb/0xc)
[<c01087e3>] (show_stack) from [<c06ee9c1>] (dump_stack+0x69/0x78)
[<c06ee9c1>] (dump_stack) from [<c0196c0f>] (warn_alloc+0x87/0x104)
[<c0196c0f>] (warn_alloc) from [<c01976af>] (__alloc_pages_nodemask+0x9bf/0xa6c)
[<c01976af>] (__alloc_pages_nodemask) from [<c019786f>] (page_frag_alloc+0xcb/0xd4)
[<c019786f>] (page_frag_alloc) from [<c063c6f3>] (__napi_alloc_skb+0x43/0xb0)
[<c063c6f3>] (__napi_alloc_skb) from [<c050fdab>] (r8152_poll+0x15f/0xab4)
[<c050fdab>] (r8152_poll) from [<c064ba6d>] (net_rx_action+0xf9/0x25c)
[<c064ba6d>] (net_rx_action) from [<c01013df>] (__do_softirq+0xa7/0x1a8)
[<c01013df>] (__do_softirq) from [<c0121fb3>] (irq_exit+0x93/0xec)
[<c0121fb3>] (irq_exit) from [<c01520ff>] (__handle_domain_irq+0x43/0x80)
[<c01520ff>] (__handle_domain_irq) from [<c0101301>] (gic_handle_irq+0x45/0x78)
[<c0101301>] (gic_handle_irq) from [<c0109065>] (__irq_svc+0x65/0xac)
Exception stack(0xee8b7f78 to 0xee8b7fc0)
7f60:                                                       00000001 00000000
7f80: 00000007 c01116a1 ffffe000 c0b03db8 c0b03d68 c0a735b0 c0b5121d 00000000
7fa0: 00000000 00000000 0020a523 ee8b7fc8 c01067e1 c01067e2 40000033 ffffffff
[<c0109065>] (__irq_svc) from [<c01067e2>] (arch_cpu_idle+0x32/0x34)
[<c01067e2>] (arch_cpu_idle) from [<c014954b>] (do_idle+0x10f/0x168)
[<c014954b>] (do_idle) from [<c0149783>] (cpu_startup_entry+0x13/0x14)
[<c0149783>] (cpu_startup_entry) from [<40101571>] (0x40101571)

Solution

After some digging it seems there is an issue with transmission 2.92 leading to memory issues.

There seems to be two solutions:

  • upgrading to 2.94, which is available on Buster, but Buster is not yet supported by Yunohost.
  • recompiling Transmission using libcurl4-openssl-dev instead of libcurl4-gnutls-dev (which it what Transmission recommends but Debian prefers gnutls for some licensing reasons).

I went for the second solution. Here are the steps I followed, inspired by the building tutorial on Debian Wiki.

I will assume you have deb-src in your /etc/apt/sources.list.

sudo apt-get install build-essential fakeroot devscripts
mkdir sources
cd sources
sudo apt source transmission-daemon
cd transmission-2.92/
sudo apt build-dep transmission
# I suggest you copy the packages installed above to be able to purge them after compilation
sudo apt purge libcurl4-gnutls-dev libssl-dev
sudo apt install libcurl4-openssl-dev libssl1.0-dev
sudo debuild -b -uc -us -d
cd ..
dpkg -i transmission-cli_2.92-2+deb9u1_armhf.deb transmission-common_2.92-2+deb9u1_all.deb transmission-daemon_2.92-2+deb9u1_armhf.deb

That being done, transmission takes less CPU (50% tops) and I no longer have memory issues.

Hope that helps…

1 Like

Before running debuild I suggest you run dch -n and write a comment such as “Recompiling with openssl” in order to make you compilation package different from the original one (it will be compiled as version 2.92-2+deb9u1.1).

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.