Maximizing the performance of the built-in Transmission torrent client

To get the best performance with the built-in Download Station, you need quality peers at the distribution, a fast controller at the drive, as little fragmented storage as possible and a minimum of simultaneously loaded and running userspace applications.

By default, the KeeneticOS operating system releases set the maximum download and upload speed limit depending on the router model. You can find these values in the Transmission BitTorrent client interface manual.

2023-06-30_09-18-49.png

This limitation is set based on the laboratory research of the BitTorrent client Transmission in KeeneticOS, relying on a quality line, a large number of peers, servers (nodes), disabled uTP protocol, disabled Peer Exchange (PEX) extension and Local Peer Discovery (LPD).

At these values, there is no effect on the router's CPU since it is not a NAS server but above all, a router that runs various services and is intended primarily for connecting network devices to the Internet and forwarding packets between different network segments based on routing rules and tables. Therefore, you should not allow such a resource-intensive application as Transmission to 'monopolize' all router memory and CPU resources. For these purposes, there are upload/download limits that are not recommended to change.

To get the maximum upload/download speed, you need to consider the following factors:

  • The storage media on which the file is written — SSD or HDD (5400 rpm, 7200 rpm are common standards for spindle speed);
  • The presence of 'good' peers, who participate in the distribution of the file while exchanging it (the file) 'pieces', segments of equal length;
  • How your Internet channel (ISP) interacts, using the peer-to-peer BitTorrent protocol via a torrent client, with the host infrastructure (tracker, server);
  • How many TCP sessions (stream) are generated when downloading a torrent file;
  • Specified port for Incoming connections (by default 51413, which most trackers do not block);
  • Partition fragmentation and NTFS preallocation (preallocation is previously allocated space, blocks for writing, in the file system for the downloaded file).

Since the ISP's DPI systems may filter most network nodes, downloading/distributing a torrent file can be done in the Distributed HashTable database. But here, too, you should not forget about the "good" peers inside this database, the general DHT network. This protocol is enabled by default in the torrent client Transmission, thus helping to reduce the load on the system's CPU and increase the download bandwidth, as the nearest peer with the 'key' information (file data) is found faster.

For the test, we connect an SSD drive to a Keenetic Titan (KN-1810) and, on default settings, get the following speeds:

2023-06-30_11-41_1.png

In our example WAN port speed is 100 Mbit/s, the tariff is up to 100 Mbit/s too, and the torrent client has a download speed to disk up to 100 Mbit/s = up to 11 Mbytes/s:

2023-06-30_11-42.png

If your ISP gives you a 1 Gbit/s channel and you want to get the best performance and use all the hardware features of the router, you can use third-party BitTorrent clients from OPKG Entware:

NOTE: Important! Limiting the torrent's client uploading/downloading speed is recommended to eliminate the problem with the device at maximum loads!

Use the swap area: How to prepare a USB drive to store data and increase the amount of RAM in the router?

If you plan to write voluminous data, switching to the EXT4 file system is recommended, which does not require preallocation: Using the ext4 file system on USB drives.

In the Keenetic system log, you can see messages like:

[I] transmissiond: Earth (2015) Retrying scrape in 7211 seconds.
[I] transmissiond: Earth (2015) Scrape error: Could not connect to tracker
[I] transmissiond: Earth (2015) Retrying scrape in 7240 seconds.
[I] transmissiond: Earth (2015) Scrape error: Could not connect to tracker
[I] transmissiond: Earth (2015) Retrying scrape in 7220 seconds.
[I] transmissiond: Earth (2015) Scrape error: Could not connect to tracker

or after adding a torrent file, you see a yellow triangle with an exclamation mark next to the name of the added torrent file or errors in the Trackers section of the domain name of the tracker server (resource) from which the file was downloaded. It means that the provider's network is filtering (blocking) at the DPI (Deep Packet Inspection) system, which analyzes transmitted packets at the transport layer of TCP/UDP protocols:

2023-06-30_12-06.png

At the same time, you can notice that the writing of the torrent file to the disk continues because, by default, the torrent client supports the DHT protocol, which forms a shared distributed DHT network between the participants of the file distribution for quick search of peers, which allows you to download the file.

The exclamation mark can also mean technical problems on the tracker server, which is temporarily or permanently unavailable.

If your ISP blocks the main torrent tracker, but you are still uploading and distributing torrent files, the  DHT protocol comes into effect, i.e. the clients form a shared DHT network between them which helps to find seeders (downloaders).

If there are problems with downloading a torrent file, you need to do the following to diagnose further:

1. Connect the USB storage to the router.
2. In the web interface, go to the 'Applications' menu under 'Download Station' and delete the application configuration file by clicking 'Restore settings.json':

2023-06-30_09-55-05.png

3. Go to the torrent client interface (GUI), check 'Enable DHT' and set the 'Enable download queue, max queue number' field to '1':

2023-06-30_09-59-21.png

4. Add a setting for sending DNS queries of domain names over DNS over TLS (DoT):

2023-06-30_12-48-16.png

For more information on Keenetic's Download Station, see the Download Station and Transmission BitTorrent client interface.
There is no need to open or forward the port for Download Station because the NAT system automatically opens it:

== Chain _NDM_IP_PUBLIC ==
src: 0.0.0.0/0, dst: 0.0.0.0/0, in: "*", out: "*", proto: "TCP"; "tcp" match, mask: , cmp: , dport: 51413; ACCEPT

When testing open ports on the router, you will see that the port is closed. Because of the private addressing on the ISP interface, the port check will fail.

Once again, please note that there is no need to open and forward the port for the Download Station because KeeneticOS automatically adds the corresponding entry to NAT when you turn on the client or change the port.

If TCP/51413 was not in NAT and we did not see ASSURED entries in the fastnat table:

Line 9141: UDP 17 src=10.201.58.157 dst=95.37.216.25 sport=51413 dport=56212 packets=2 bytes=211 src=95.37.216.25 dst=10.201.58.157 sport=56212 dport=51413 packets=2 bytes=1258 [ASSURED] [FASTNAT] mark=0x00000000 ndmmark=0x00
Line 9141: UDP 17 src=10.201.58.157 dst=95.37.216.25 sport=51413 dport=56212 packets=2 bytes=211 src=95.37.216.25 dst=10.201.58.157 sport=56212 dport=51413 packets=2 bytes=1258 [ASSURED] [FASTNAT] mark=0x00000000 ndmmark=0x00
Line 9146: UDP 17 src=10.201.58.157 dst=14.117.184.147 sport=51413 dport=9601 packets=2 bytes=250 src=14.117.184.147 dst=10.201.58.157 sport=9601 dport=51413 packets=1 bytes=97 [ASSURED] [FASTNAT] mark=0x00000000 ndmmark=0x00
Line 9146: UDP 17 src=10.201.58.157 dst=14.117.184.147 sport=51413 dport=9601 packets=2 bytes=250 src=14.117.184.147 dst=10.201.58.157 sport=9601 dport=51413 packets=1 bytes=97 [ASSURED] [FASTNAT] mark=0x00000000 ndmmark=0x00

it would mean that there is no connection on this port because the ISP blocks it. Then you need to change this port (TCP/51413) to another port not blocked by the ISP.

Was this article helpful?

61 out of 67 found this helpful