<story><title>Userspace isn&apos;t slow, some kernel interfaces are</title><url>https://tailscale.com/blog/throughput-improvements/</url></story><parent_chain></parent_chain><comment><author>majke</author><text>I can chime in with some optimizations (linux).&lt;p&gt;For normal UDP sockets UDP_GRO and UDP_SEGMENT can be even faster than sendmmsg&amp;#x2F;recvmmsg.&lt;p&gt;In Gvisor they decided that read&amp;#x2F;write from tun is slow so they did PACKET_MMAP on raw socket instead. AFAIU they just ignore tap device and run a raw socket on it. Dumping packet from raw socket has faster interface than the device itself.&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;google&amp;#x2F;gvisor&amp;#x2F;blob&amp;#x2F;master&amp;#x2F;pkg&amp;#x2F;tcpip&amp;#x2F;link&amp;#x2F;fdbased&amp;#x2F;mmap_unsafe.go#L50&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;google&amp;#x2F;gvisor&amp;#x2F;blob&amp;#x2F;master&amp;#x2F;pkg&amp;#x2F;tcpip&amp;#x2F;link&amp;#x2F;...&lt;/a&gt;
&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;google&amp;#x2F;gvisor&amp;#x2F;issues&amp;#x2F;210&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;google&amp;#x2F;gvisor&amp;#x2F;issues&amp;#x2F;210&lt;/a&gt;</text></comment>
<story><title>Userspace isn&apos;t slow, some kernel interfaces are</title><url>https://tailscale.com/blog/throughput-improvements/</url></story><parent_chain></parent_chain><comment><author>rwmj</author><text>For something completely different, you might want to look at Unikernel Linux: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;arxiv.org&amp;#x2F;abs&amp;#x2F;2206.00789&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;arxiv.org&amp;#x2F;abs&amp;#x2F;2206.00789&lt;/a&gt;  You could run all the code without switching between userspace and the kernel, and you can call into kernel functions directly (with the usual caveats about kernel ABI not being stable).&lt;p&gt;There is a v1 patch posted on LKML, and I think they&amp;#x27;re hoping to get a v2 patch posted by January.  If you are interested in a chat with the team, email me rjones redhat.com.</text></comment>