nbubingo at gmail
Mar 30, 2012, 2:05 AM
Post #1 of 3
The grace config eat the memory greatly
Yesterday, I encountered the similar problem in varnish-3.0.2 with
this ticket: https://www.varnish-cache.org/trac/ticket/546
At first, we just configure the memory to 1G "-s
And we specify the response grace time in VCL to be 30 minutes:
set beresp.grace =30m;
Our object cache time is very short:
set beresp.ttl = 5s;
Half an hour later, the total resident memory is about 3.7 G. It's 3
times more than the configured size.
Then I checked all the responses in my servers. I thought maybe some
responses are too tiny at first time and It just wasted the index
object memory. But most of the HTTP responses are about 100K pages.
After that, I tested with the grace time:
When I remove the grace time, it's about up to 130M.
When I specify the grace time to 5 minutes, it's about up to 1G.
When I specify the grace time to 10 minutes, it's about up to 1.8G.
I think the response grace time greatly impacts the varnish resident
memory size. I don't know if it's a bug or feature. But it do eat too
much memory than the configured size.
Hope this mail can help someone.
varnish-misc mailing list
varnish-misc [at] varnish-cache