mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-05 21:59:21 +00:00
Accounted for Systemd PITA
+4
-2
@@ -230,7 +230,11 @@ To use higher settings for couple of the above settings the system wide limit sh
|
||||
username soft nofile 10240
|
||||
username hard nofile 10240
|
||||
```
|
||||
## Limits under Systemd
|
||||
|
||||
When tuning for large footprint installs, a large numbers for settings like slots, maximum file identifiers, and maximum sockets may cause issues (unexpected pausing and queuing of torrents) when using systemd. This is the case even when system wide limits (ulimit) have been changed to account for the added resource usage.
|
||||
|
||||
Systemd has implicit resource limits (4096) which don't obviously state their override of ulimit values. You will need to add LimitNOFILE=xxxx to either the rtorrent systemd definition or to /etc/systemd/system.conf to address this.
|
||||
### Networking tweaks
|
||||
|
||||
`network.receive_buffer.size`, `network.send_buffer.size` are limited to `sysctl -a | grep -i rmem` and `sysctl -a | grep -i wmem`. You have to change `net.core.rmem_max`, `net.ipv4.tcp_rmem`, `net.core.wmem_max`, `net.ipv4.tcp_wmem` in `/etc/sysctl.conf` to the desired values along with some other tweaks:
|
||||
@@ -268,9 +272,7 @@ net.ipv4.tcp_fin_timeout = 30
|
||||
|
||||
In addition to the above, it's strongly advised to use DNS caching either locally or for your whole network (e.g. on a OpenWRT powered router). [Here](https://help.ubuntu.com/community/Dnsmasq#Local_DNS_Cache) you can find instructions how to set it up on Ubuntu.
|
||||
|
||||
### Resources under Systemd
|
||||
|
||||
When tuning for large footprint installs, a large numbers for settings like slots, maximum file identifiers, and maximum sockets may cause issues (unexpected pausing and queuing of torrents) when using systemd. This is the case even when system wide limits (ulimit) have been changed to account for the added resource usage. Systemd has implicit resource limits (4096) which don't obviously state their override of ulimit values. You will need to add LimitNOFILE=xxxx to either the rtorrent systemd definition or to /etc/systemd/system.conf to address this.
|
||||
## References
|
||||
|
||||
- [libtorrent manual](http://www.libtorrent.org/tuning.html) (NB: This is not the rakshasa libtorrent, but still contains useful information)
|
||||
|
||||
Reference in New Issue
Block a user