What happened?
Website gets very slow when hard drives waiting to write, when using ZFS it can slow it down while txg_sync
What do you expect to happen instead?
I expect the website to be responsive at all times not get slow. Installing Varnish helped to speed up the website
Configure varnish in front of peertube and terminated by SSL (insert this before and after the SNIP HERE marks) Let images and other static resource go through varnish in memory cache to make website faster.
nano /etc/nginx/sites-available/peertube
... SNIP HERE ...
location ^~ '/.well-known/acme-challenge' {
default_type "text/plain";
root /var/www/certbot;
}
location / {
proxy_pass http://127.0.0.1:6081;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header Host $host;
client_max_body_size 12G;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
# Websocket tracker
location /tracker/socket {
# Peers send a message to the tracker every 15 minutes
# Don't close the websocket before this time
proxy_read_timeout 1200s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:9000;
}
location /socket.io {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:9000;
# enable WebSockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
server {
listen 8888;
# Bypass PeerTube for performance reasons. Could be removed
location ~ ^/client/(.*\.(js|css|png|svg|woff2|otf|ttf|woff|eot))$ {
add_header Cache-Control "public, max-age=31536000, immutable";
alias /var/www/peertube/peertube-latest/client/dist/$1;
}
... SNIP HERE ...
Additional information
PeerTube version or URL: 2.1.1
Browser name/version:
NodeJS version:
Link to browser console log if useful:
Link to server log if useful (journalctl or /var/www/peertube/storage/logs/):
What happened? Website gets very slow when hard drives waiting to write, when using ZFS it can slow it down while txg_sync What do you expect to happen instead? I expect the website to be responsive at all times not get slow. Installing Varnish helped to speed up the website
Steps to reproduce: https://github.com/Chocobozzz/PeerTube/pull/2798 https://github.com/Chocobozzz/PeerTube/pull/2799
Install and configure varnish
apt install varnish
Edit Varnish configuration files
nano /etc/default/varnish
nano /etc/varnish/default.vcl
Additional information
PeerTube version or URL: 2.1.1
Browser name/version:
NodeJS version:
Link to browser console log if useful:
Link to server log if useful (journalctl or /var/www/peertube/storage/logs/):