aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--support/doc/production.md13
-rw-r--r--support/sysctl.d/30-peertube-tcp.conf9
2 files changed, 22 insertions, 0 deletions
diff --git a/support/doc/production.md b/support/doc/production.md
index 3d1be6b45..35c7de3b5 100644
--- a/support/doc/production.md
+++ b/support/doc/production.md
@@ -134,6 +134,19 @@ On FreeBSD you can use [Dehydrated](https://dehydrated.io/) `security/dehydrated
134$ sudo pkg install dehydrated 134$ sudo pkg install dehydrated
135``` 135```
136 136
137### TCP/IP Tuning
138
139**On Linux**
140
141```
142$ sudo cp /var/www/peertube/peertube-latest/support/sysctl.d/30-peertube-tcp.conf /etc/sysctl.d/
143$ sudo sysctl -p /etc/sysctl.d/30-peertube-tcp.conf
144```
145
146Your distro may enable this by default, but at least Debian 9 does not, and the default FIFO
147scheduler is quite prone to "Buffer Bloat" and extreme latency when dealing with slower client
148links as we often encounter in a video server.
149
137### systemd 150### systemd
138 151
139If your OS uses systemd, copy the configuration template: 152If your OS uses systemd, copy the configuration template:
diff --git a/support/sysctl.d/30-peertube-tcp.conf b/support/sysctl.d/30-peertube-tcp.conf
new file mode 100644
index 000000000..09285bb56
--- /dev/null
+++ b/support/sysctl.d/30-peertube-tcp.conf
@@ -0,0 +1,9 @@
1# In a video server, we are often sending files to a client
2# which can't accept it as fast as our local network connection
3# could produce packets. To prevent packet loss and buffer bloat,
4# it's especially important to use a modern CoDel scheduler which
5# knows how to delay outgoing packets to match slower client links.
6
7net.core.default_qdisc = fq_codel
8net.ipv4.tcp_congestion_control = bbr
9