make varnish don't start a subprocess
Harald Friessnegger
harald at webmeisterei.com
Tue Mar 24 16:13:55 CET 2009
hi des
Am Freitag, 20. März 2009 19:14:30 schrieb Dag-Erling Smørgrav:
> > the varnishd started by supervisor just needs 5% memory and gets
> > restarted if it grows above a certain limit. the subprocess eats up my
> > RAM and can't be conrolled by supervisor.
>
> The parent will restart it if you kill it (but doing so will flush the
> cache). However, varnishd doesn't "eat memory", unless there is a bug.
> You should read varnishd(1) and figure out how to select the storage
> backend and how to limit the size of the cache.
>
> DES
i'd be happy to make varnish stick to a certain memory limit.
maybe you've got some ideas how to make that happen?
is the file backend i'm using too small?
what other factors could make the varnish process use such a lot of RAM
i try to provide as much information as possible, please let me know if you
need further details:
atm we're using filestorage with a limit of 500M.
whilst the file itself is exactly 500 megabyte in size, varnish
uses 1115M memory - 44% of the total available 2,5GB RAM (1,5GB RAM, 1GB
disk-swap) after 5 days of uptime. see `figure 1` below.
these are the arguments we're starting varnish with:
#!/bin/sh
exec /home/zope/parts/varnish-build/sbin/varnishd \
-f "/home/zope/etc/varnish.vcl" \
-P "/home/zope/parts/varnish/varnish.pid" \
-a localhost:6181 \
-T localhost:6182 \
-s file,"/home/zope/parts/varnish/storage",500M \
-F \
-t 0 "$@"
varnish version: varnish-2.0.2.tar.gz
figure 1: memory consumption of varnish and it's subprocess::
Mem: 1548288k total, 1540604k used, 7684k free, 680k buffers
Swap: 1048568k total, 1048568k used, 0k free, 156252k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4096 nobody 15 0 1921m 666m 81m S 0 44.1 0:42.44 varnishd
13263 zope 15 0 908m 646m 1764 S 0 42.8 252:01.48 python2.4
4090 root 15 0 98196 80m 80m S 0 5.3 0:00.12 varnishd
thanks for your help,
fRiSi
--
Webmeisterei GmbH - Büro für Netzfragen
Tel: +43 5572 908877, Fax: +43 5572 908877-66
Steinebach 18, A-6850 Dornbirn
http://www.webmeisterei.com
More information about the varnish-misc
mailing list