a couple of questions about -spersistent

Marc Fournier marc.fournier at camptocamp.com
Fri Jun 11 14:55:48 CEST 2010


Hello,

I've found a couple of threads on the list where people were trying to
request objects from the cache after a restart, but none of them seem
to have been successful, and the threads ended without any solution.

My question is: what am I missing to be able to:

 - fetch an object from a backend to prime the cache
 - fetch this object a 2nd time to check I get a HIT
 - restart varnish (as in /etc/init.d/varnish restart)
 - fetch the object and get a HIT.

Has someone actually managed to have data persist in the cache across
restarts ?


Another thing I noticed is that when running
"varnishd -spersistent,...", varnishstat always reports:

sm_balloc                   0          .   bytes allocated
sm_bfree                    0          .   bytes free

even when some objects are present in the cache (requests return cache
hits).

Are these values supposed be called something else in persistent mode ?

With "varnishd -sfile,/path/to/file,N", sm_balloc + sm_bfree = N, which
makes sense.

Thanks !
Marc





More information about the varnish-misc mailing list