<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, 29 Mar 2016 at 10:35 Per Buer <<a href="mailto:perbu@varnish-software.com">perbu@varnish-software.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 25, 2016 at 5:09 PM, Martin Blix Grydeland <span dir="ltr"><<a href="mailto:martin@varnish-software.com" target="_blank">martin@varnish-software.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span><div dir="ltr">On Fri, 25 Mar 2016 at 16:35 Nils Goroll <<a href="mailto:slink@schokola.de" target="_blank">slink@schokola.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
is there a particular reason for pipe mode not using sendfile half the number of<br>
syscalls required and avoid copying to/from a userspace buffer?<br></blockquote><div><br></div></span><div>sendfile() requires the in_fd to be an fd supporting mmap-like operations, ie no network sockets.</div></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>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.</div></div></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>Martin</div></div></div>