Cache file on ZFS volume or raw block device

Leif Pedersen bilbo at hobbiton.org
Sun Apr 14 05:33:44 CEST 2013


I just got serious about using ZFS on FreeBSD over the last few weeks. I
got to thinking, why incur the overhead of a filesystem to the Varnish
cache file? I figured I'd try an experiment on my desktop, and created a
ZFS volume for the cache file. Then I set varnishd_storage (/etc/rc.conf)
to "file,/dev/zvol/tank/varnish-cache,8G". But when I tried to start
Varnish, I got the error: "/dev/zvol/tank/varnish-cache" is neither file
nor directory. Searching, I found some easy code about it in
storage/stevedore_utils.c<https://www.varnish-cache.org/trac/browser/bin/varnishd/storage/stevedore_utils.c>,
and naturally the error check makes sense.

What do you guys think? Am I wasting my time, or is it worth the effort to
avoid some filesystem overhead for cache IO? I thought that perhaps
allowing the storage to be a raw block device might also be useful for some
people (maybe my future self) who want to put it on a dedicated SSD.

Thoughts?

- Leif

-- 

As implied by email protocols, the information in this message is
not confidential.  Any middle-man or recipient may inspect, modify,
copy, forward, reply to, delete, or filter email for any purpose unless
said parties are otherwise obligated.  As the sender, I acknowledge that
I have a lower expectation of the control and privacy of this message
than I would a post-card.  Further, nothing in this message is
legally binding without cryptographic evidence of its integrity.

http://bilbo.hobbiton.org/wiki/Eat_My_Sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20130413/4e1dca2c/attachment.html>


More information about the varnish-dev mailing list