varnish consuming too much memory?
Jodok Batlogg
jodok at lovelysystems.com
Thu Mar 13 11:27:32 CET 2008
On 13.03.2008, at 10:56, Poul-Henning Kamp wrote:
> In message <33CD53F7-74C0-447C-8E0C-8F40365B7D7D at lovelysystems.com>,
> 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?
>
> no.
>
>> 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 ?
we're hosting multiple sites on our cluster. the cluster has two load
balanced reverse proxies that handle delivery of static content
(nginx) and caching (varnish).
the different sites are running under different users. i'd like to
share the resources "fair" between them. the sites have different
rules for content expiry, allowed purge hosts,...
some of the static files are beeing delivered from NFS, with netfs
we're using linux cache memory to cache the files as well.
right now (one) varnish eats up all memory, leaves no memory for
caching and the system starts swapping.
>> - 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.
can you elaborate or point me to some documentation?
>> is this cache persistent? when are objects moved from memory to disk?
>
> No.
>
> Whenever the kernel VM subsystem decide it should happen.
so it is a kind of home-made swap memory for varnish?
thanks
jodok
>
>
> --
> 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.
--
"Beautiful is better than ugly."
-- The Zen of Python, by Tim Peters
Jodok Batlogg, Lovely Systems GmbH
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria
mobile: +43 676 5683591, phone: +43 5572 908060
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2454 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20080313/f1cfc89c/attachment-0003.bin>
More information about the varnish-dev
mailing list