Service
Service Settings
By default, 512MB of data can be stored in the memory. You should consider increasing the value if you have many sites on the server or sites with many pages.
To give Varnish Cache more memory, do the following:
Login via SSH as root user.
Open the systemd service file:
nano /lib/systemd/system/varnish.service
- Increase the malloc value from 512m e.g. to 2048m:
ExecStart=/usr/sbin/varnishd \
-a :6081 \
-f /etc/varnish/default.vcl \
-P %t/%N/varnishd.pid \
-p feature=+http2 \
-p http_resp_hdr_len=40000 \
-s malloc,512m
- Reload systemd manager configuration:
systemctl daemon-reload
- Restart the Varnish Cache Service:
systemctl restart varnish
Configuration File
The Varnish Cache Configuration File can be found at:
/etc/varnish/default.vcl
After making changes, you need to reload the configuration.
Login via SSH as root user.
Run varnishreload to use the new compiled vlc configuration:
varnishreload