/var/lib/varnish tmpfs recommended size and multiple _.vsm files

Dag Haavi Finstad daghf at varnish-software.com
Thu May 28 14:01:08 CEST 2015


The situation is that some of the tools keep the old VSM file open
(varnishlog, varnishncsa, ...) which will prevent it from getting
cleaned up prior to Varnish creating a new one.

Sizing the tmpfs to fit two full VSM files should do the trick (at least ~170M).


On Wed, May 27, 2015 at 11:54 PM, Richard Guest <R.Guest at gns.cri.nz> wrote:
> Hi,
> I'm afraid I can't help here, but I would like to pipe up and say that I
> have
> noticed this behaviour on some of our varnish hosts also.
> If someone more intimately familiar with the relevant code could chime in
> and
> shed some light on this, then I'm sure we could figure out a sane number
> fairly quickly.
> My best guess (and I stress guess here, because I've done literally zero
> investigation) is it's related to a client still reading from the SHM log,
> so
> it's politely moved to one side, rather than just being destroyed.
> Does that sound plausible? Anyone...?
> Cheers,
> Rich
>> Hi,
>> Any suggestions on size of /var/lib/varnish while mounted as tmpfs? We
>> only have one instance, therefore we thought it would be enough to set
>> it slightly bigger than 82MB, but while restarting Varnish, some other
>> shmlog file named _.vsm.4311 got created and Varnish failed to start
>> because of full disk. Therefore we could not be sure about size of
>> tmpfs.
>> Thanks
>> On Mon, May 25, 2015 at 6:12 PM, Web Teknik <webteknik.tcmb at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > After reading Varnish Book and Varnish wiki, we decided to put
>> > /var/lib/varnish directory to tmpfs with following line in /etc/fstab
>> >
>> > tmpfs                   /var/lib/varnish        tmpfs
>> > defaults,noatime,size=128M        0 0
>> >
>> >
>> > However, while trying restarting varnish, another shmlog file which is
>> > named _.vsm.4311 is also stored under /var/lib/varnish/<host> whose
>> > size is 42MB. As a result Varnish refused to start since disk is full.
>> > We couldn't reproduce the issue that _.vsm.somenumber (PID?) is
>> > created. Under which conditions multiple _.vsm files are created and
>> > in order to prevent failure, what is the recommended size for
>> > /var/lib/varnish directory?
>> >
>> > Thanks in advance.
> Notice: This email and any attachments are confidential. If received in
> error please destroy and immediately notify us. Do not copy or disclose the
> contents.
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Dag Haavi Finstad
Software Developer | Varnish Software
Mobile: +47 476 64 134
We Make Websites Fly!

More information about the varnish-misc mailing list