diff --git a/docker-compose.yml b/docker-compose.yml index dfdc531..7be11d5 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -394,18 +394,19 @@ services: invidious-cache: container_name: invidious-cache restart: unless-stopped - cpus: 2 - mem_limit: "512m" - memswap_limit: "512m" - image: varnish:latest - user: 10043:10043 # Put uid/gid of your invidious user here + cpus: 3 + mem_limit: "10240m" + memswap_limit: "10240m" + image: varnish:stable + user: 10043:10043 volumes: + - /srv/invidious/config/malloc.conf:/etc/malloc.conf:ro - /srv/invidious/varnish:/var/lib/varnish - command: "-a :6081 -T localhost:6082 -f /var/lib/varnish/default.vcl -s file,/var/lib/varnish/varnish_storage.bin,32G -s Transient=malloc,128m -p cli_timeout=15" + command: "-a :6081 -T localhost:6082 -f /var/lib/varnish/default.vcl -s default=malloc,8G -s Transient=malloc,64m" ulimits: memlock: - soft: 536870912 - hard: 536870912 + soft: -1 + hard: -1 networks: invidious_proxy: ipv4_address: 192.42.6.3 diff --git a/etc/malloc.conf b/etc/malloc.conf new file mode 100644 index 0000000..30ed30c --- /dev/null +++ b/etc/malloc.conf @@ -0,0 +1 @@ +lg_dirty_mult:8,lg_chunk:18