<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 2/7/20 10:51 AM, James Stevens
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:27a4deff-8a89-769d-9a63-f95d485f5fae@jrcs.net">
      <blockquote type="cite" style="color: #999999;">- You would be
        surprised how slow UDP packet processing in kernel can be <span
          class="moz-smiley-s3" title=";-)"><span>;-)</span></span>
        <br>
      </blockquote>
      <br>
      Often UDP slowness is due to the fact that each packet requires a
      context-switch from kernel to user-space, and back for the reply.
      <br>
      <br>
      So the bottleneck on a DNS server is generally how fast the CPU
      can context switch, and this often had a hardwired limit. In that
      you can top out the packet throughput with the CPU still showing
      %idle.
      <br>
      <br>
      I believe there is (or has been) a dev going on in the kernel to
      fix this.
      <br>
      <br>
      I might be behind the curve, I've not looked into it for a bit.
    </blockquote>
    <p>Actually the multi-packet API (sendmmsg + recvmmsg) did not help
      that much in our benchmarks (with Knot DNS and Knot Resolver),
      though it seems worth using.  "Bypassing" the kernel's networking
      stack did help way more - incidentally Libor Peltan is presenting
      about that at tomorrow's OARC :-)</p>
    <p>--Vladimir<br>
    </p>
  </body>
</html>