sendfile() and Varnish2.0.2

Dag-Erling Smørgrav des at
Tue Dec 2 16:23:15 CET 2008

Per Buer <perbu at> writes:
> Paras Fadte <plfgoa at> writes:
> > Are there issues associated with using sendfile() in varnish2.0.2 ?
> Yes. sendfile is turned off on Linux and FreeBSD. The performance impact
> is quite minimal.
> > Does varnish 2.0.2 use sendfile() by default ? 
> Only on Solaris.

No.  Neither Linux nor Solaris have a version of sendfile that Varnish
can use.  FreeBSD 8 does (and so would FreeBSD 7 if phk had remembered
to MFC it).  Enabling sendfile on anything other than FreeBSD 8 is a
no-op.  In any case, sendfile only works with file storage, not malloc,
and due to the overhead of setting up the VM mapping for the transfer,
the break-even point is very high - you're not likely to see any
measurable performance improvement unless you're serving very large

Dag-Erling Smørgrav - des at

More information about the varnish-misc mailing list