varnish consuming too much memory?

Poul-Henning Kamp phk at
Thu Mar 13 10:56:52 CET 2008

In message <33CD53F7-74C0-447C-8E0C-8F40365B7D7D at>, Jodok Batl
ogg writes:

>>> i'm wondering how varnish determines how much memory it should
>>> consume...
>> It uses all memory it can for caching.
>- is there a way to limit it?


>i'd like to assign the 4 varnishes running on this box 3 GB each and  
>leave 4GB for linux disk/nfs cache

Why are you running multiple varnishes on the same box ?

>- what effect has the size of the VARNISH_STORAGE_SIZE?

That sets the size of the file varnish maps for storage, and in a sort
of way limits the amount of memory varnish can use, but also severely
limits your hit-rate when it runs full.

>is this cache persistent? when are objects moved from memory to disk?


Whenever the kernel VM subsystem decide it should happen.

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-dev mailing list