pipe mode and sendfile?

Martin Blix Grydeland martin at varnish-software.com
Tue Mar 29 15:10:51 CEST 2016

On Tue, 29 Mar 2016 at 10:35 Per Buer <perbu at varnish-software.com> wrote:

> On Fri, Mar 25, 2016 at 5:09 PM, Martin Blix Grydeland <
> martin at varnish-software.com> wrote:
>> On Fri, 25 Mar 2016 at 16:35 Nils Goroll <slink at schokola.de> wrote:
>>> is there a particular reason for pipe mode not using sendfile half the
>>> number of
>>> syscalls required and avoid copying to/from a userspace buffer?
>> sendfile() requires the in_fd to be an fd supporting mmap-like
>> operations, ie no network sockets.
> How about TCP Splicing? Shouldn't we be able to do that? If I'm not
> mistaken HA-Proxy used TCP Splicing for quite some time to avoid read/write
> copying to userspace.

TCP splicing would be an option. I've never played with it, so I'm not sure
about the details. But as I understand it, the number of system calls
wouldn't go down, and the number of fd's used per piped connection would
increase by 4 (2 fd's per pipe, and one pipe per direction). You would
avoid the userspace/kernelspace copying though.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20160329/7ab69a51/attachment.html>

More information about the varnish-dev mailing list