Memory usage

Martin Goldman me at mgoldman.com
Wed Jan 27 04:23:57 CET 2010


Hello all,

I'm running Varnish on a box with 4GB RAM. There are hundreds of thousands
of objects being served, and I'm certain that they don't all fit in that
relatively meager amount of RAM. I understand that Varnish's model dictates
that the kernel will be trusted to use virtual memory as necessary if the
cached objects don't fit in RAM. I have a few questions about this:

1. How can you tell whether your Varnish objects fit in RAM?
2. If I have objects residing in virtual memory, to what extent will my
performance be adversely affected? If I want my site to be fast, do I
basically need to go out and buy as much RAM as it will take so that virtual
memory isn't needed?
3. I noticed tonight that my machine was using a few hundred megs of swap
space, which I've never seen happen before. Varnish is the only non-system
service running on this box. My understanding was that Varnish would get
only as much RAM as was available and then send the overflow into the
file-backed virtual memory. If that's the case, though, then why is swap
space being used? Is this just a side effect of how the kernel allocates
memory, or is something else going on here?

Many thanks,
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100126/9e7f1270/attachment-0001.html>


More information about the varnish-misc mailing list