mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-09-11 13:37:10 +03:00
Suggest TCP/IP tuning to prevent buffer bloat + latency (#976)
* Suggest TCP/IP CoDel and BBR congestion control in production guide This seems to be helping lots on my server, where the default (Debian 9) was to use FIFO queueing which would cause buffer bloat and huge latency for clients on slower network links.
This commit is contained in:
parent
83b5fe9c55
commit
f74c294a0d
@ -134,6 +134,19 @@ On FreeBSD you can use [Dehydrated](https://dehydrated.io/) `security/dehydrated
|
||||
$ sudo pkg install dehydrated
|
||||
```
|
||||
|
||||
### TCP/IP Tuning
|
||||
|
||||
**On Linux**
|
||||
|
||||
```
|
||||
$ sudo cp /var/www/peertube/peertube-latest/support/sysctl.d/30-peertube-tcp.conf /etc/sysctl.d/
|
||||
$ sudo sysctl -p /etc/sysctl.d/30-peertube-tcp.conf
|
||||
```
|
||||
|
||||
Your distro may enable this by default, but at least Debian 9 does not, and the default FIFO
|
||||
scheduler is quite prone to "Buffer Bloat" and extreme latency when dealing with slower client
|
||||
links as we often encounter in a video server.
|
||||
|
||||
### systemd
|
||||
|
||||
If your OS uses systemd, copy the configuration template:
|
||||
|
9
support/sysctl.d/30-peertube-tcp.conf
Normal file
9
support/sysctl.d/30-peertube-tcp.conf
Normal file
@ -0,0 +1,9 @@
|
||||
# In a video server, we are often sending files to a client
|
||||
# which can't accept it as fast as our local network connection
|
||||
# could produce packets. To prevent packet loss and buffer bloat,
|
||||
# it's especially important to use a modern CoDel scheduler which
|
||||
# knows how to delay outgoing packets to match slower client links.
|
||||
|
||||
net.core.default_qdisc = fq_codel
|
||||
net.ipv4.tcp_congestion_control = bbr
|
||||
|
Loading…
Reference in New Issue
Block a user