virtual memory/cache hitrate problem

Loesche, Lukas, scoyo lukas.loesche at
Wed May 20 16:26:45 CEST 2009

> You don't say if your 30GB is 30M 1k objects or 3M 10k object

It's mostly >50kb <2MB SWF, PNG, MP3, FLV files. 360232 of them.

> trim this somewhat down with the obj_workspace paramter), so 50GB
> may not be enough to hold 30GB of objects.

Well my problem is that I don't even hit the 30GB limit. The file is 50GB
but varnish runs out of memory once it has fetched around 2GB (the
'physical' memory limit of the server) from the backends.

My guess is that the problem lies within how Virtuozzo counts memory usage
inside it's virtual containers. When I assign 2GB Memory to the virtual
Server and some process allocates 1GB virtual memory, while only using 200MB
real memory, the Server will have 1 of it's 2 GB memory shown as 'in use'.

You can see this in the two munin charts I liked in my original post. The
server's memory usage is almost identical to varnish's VM allocation.

Basically, what I'd like to know is, am I using varnish correct by assigning
50GB or even more to the cache even if the server only has 2GB physical
The way I understood it is that varnish will map the cache file into it's
own address space and just let the Kernel decide which parts to hold in
memory and which not to. So I would think it's okay to have a cache file
that is several times bigger than the physical memory.

-- Lukas

More information about the varnish-misc mailing list