From 7a48d7a7a8458b75ff0460f0eb464e6c7a22b9e3 Mon Sep 17 00:00:00 2001 From: Lucas Manning Date: Tue, 16 Apr 2024 16:30:48 -0700 Subject: [PATCH] Switch to using rcvmmsg dispatcher by default. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On average packet_mmap provides less raw throughput than rcvmmsg. We should use the faster dispatcher until this is resolved. Iperf microbenchmark: ``` name old speed new speed delta IperfOneConnection/operation.Upload-16 221GB/s ± 7% 226GB/s ± 1% ~ (p=0.690 n=5+5) IperfOneConnection/operation.Download-16 278GB/s ± 1% 330GB/s ± 3% +18.50% (p=0.008 n=5+5) ``` PiperOrigin-RevId: 625489706 --- runsc/boot/network.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/runsc/boot/network.go b/runsc/boot/network.go index 685ababf9..cc2b8b850 100644 --- a/runsc/boot/network.go +++ b/runsc/boot/network.go @@ -281,9 +281,12 @@ func (n *Network) CreateLinksAndRoutes(args *CreateLinksAndRoutesArgs, _ *struct return err } if version.AtLeast(5, 6) { - dispatchMode = fdbased.PacketMMap + // TODO(b/333120887): Switch back to using the packet mmap dispatcher when + // we have the performance data to justify it. + // dispatchMode = fdbased.PacketMMap + // log.Infof("Host kernel version >= 5.6, using to packet mmap to dispatch") } else { - log.Infof("Host kernel version < 5.6, falling back to RecvMMsg dispatch") + log.Infof("Host kernel version < 5.6, using to RecvMMsg to dispatch") } for _, link := range args.FDBasedLinks {