Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Misc

The grace config eat the memory greatly

 

 

Varnish misc RSS feed   Index | Next | Previous | View Threaded


nbubingo at gmail

Mar 30, 2012, 2:05 AM

Post #1 of 3 (287 views)
Permalink
The grace config eat the memory greatly

Hello, folks,

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
file,/home/admin/varnish/cache/varnish_storage.bin,1G".

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
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


perbu at varnish-software

Mar 30, 2012, 2:50 AM

Post #2 of 3 (271 views)
Permalink
Re: The grace config eat the memory greatly [In reply to]

Hi,

On Fri, Mar 30, 2012 at 11:05 AM, 姚伟斌 <nbubingo [at] gmail> wrote:

> (..)
> Half an hour later, the total resident memory is about 3.7 G. It's 3
> times more than the configured size.
>

This is a know weakness. DocWilco has provided a patch that I think is is
accepted in master. Hopefully it will be out in a future release. I'm
guessing it should not be to hard to backport the patch if you need to.


--
Per Buer, CEO
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer
*Varnish makes websites fly!*
Whitepapers <http://www.varnish-software.com/whitepapers> |
Video<http://www.youtube.com/watch?v=x7t2Sp174eI> |
Twitter <https://twitter.com/varnishsoftware>


apj at mutt

Apr 23, 2012, 11:30 AM

Post #3 of 3 (215 views)
Permalink
Re: The grace config eat the memory greatly [In reply to]

On Fri, Mar 30, 2012 at 11:50:34AM +0200, Per Buer wrote:
>
> > (..)
> > Half an hour later, the total resident memory is about 3.7 G. It's 3
> > times more than the configured size.
>
> This is a know weakness. DocWilco has provided a patch that I think is is
> accepted in master. Hopefully it will be out in a future release. I'm
> guessing it should not be to hard to backport the patch if you need to.

I don't believe that's what's at play here. I think it's a case of TTL below
the shortlived parameter, and ending up in the Transient store, which is
unbounded by default.

Also, remember that you're configuring the size of the store, not the size of
varnishd. There will be some overhead for threads and housekeeping.

--
Andreas

_______________________________________________
varnish-misc mailing list
varnish-misc [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Varnish misc RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.