Server Tuning

Tuning server configuration for high capacity configurations

Below are the commands that control the web server queue and thread options. These often need to be adjusted for high capacity deployments. The Systemd web server provides security benefits and also allows better monitoring of the pritunl-web server process in the pritunl-web.service unit.

# Enable Web Server Systemd
sudo pritunl set app.web_systemd true

# Low Capacity (1 CPU, 4GB RAM)
sudo pritunl set app.request_queue_size 200
sudo pritunl set app.request_accepted_queue_size 100
sudo pritunl set app.request_thread_count 20
sudo pritunl set app.request_max_thread_count 100

# Standard Capacity (2 CPU, 4GB RAM)
sudo pritunl set app.request_queue_size 600
sudo pritunl set app.request_accepted_queue_size 300
sudo pritunl set app.request_thread_count 50
sudo pritunl set app.request_max_thread_count 300

# High Capacity (4 CPU, 4GB RAM)
sudo pritunl set app.request_queue_size 1200
sudo pritunl set app.request_accepted_queue_size 600
sudo pritunl set app.request_thread_count 100
sudo pritunl set app.request_max_thread_count 600

# Extreme Capacity (8 CPU, 8GB RAM)
sudo pritunl set app.request_queue_size 4000
sudo pritunl set app.request_accepted_queue_size 2000
sudo pritunl set app.request_thread_count 100
sudo pritunl set app.request_max_thread_count 2000

# Restart Server After Changes
sudo systemctl restart pritunl

Last updated