Re: How multithreaded is networking in FreeBSD 15.1?
Adrian Chadd <[email protected]>
| Newsgroups | gmane.os.freebsd.questions |
|---|---|
| Message-ID | <CAJ-VmomMoTHuZZ7L_Vx8swhV=n3SMTY=dGwFdAP0Pd=nqmGCgg@mail.gmail.com> |
On Sun, 16 Aug 2026 at 18:25, Brett Glass <[email protected]> wrote: > > At 03:00 PM 8/16/2026, David Christensen wrote: > > >My theory for running mixed sequential/ parallel programs is that > >there is a speedup vs. efficiency sweet spot when the number of > >threads is numerically equal to Amdahl's maximum speedup > >value. If I run the program with more threads, I will get more > >speedup but less efficiency. If I run the program with less > >threads, I will get less speedup but more efficiency. > > David, thank you for the ideas. However, what I am asking is which > choice of processors (more simple cores, lower clock speed vs. > fewer fast cores, higher clock speed) will maximize the networking > and routing performance of FreeBSD 15.1, given that we will be > using lagg(4) heavily and IPFW as the firewall. The choice of > hardware will depend on, among other things, how well > multithreading works within the network stack and whether the > threads are likely to get in one another's way. In older versions > of FreeBSD it paid to use fewer, faster CPUs to avoid contention; > I'm not sure if that's still the case with the latest kernel. We should fix any contention issues that you see in 2026. You should likely target something with say 4 to 8 cores for parallel network TX/RX and then some other cores to run control/management plane stuff. Ideally the ethernet input path into lagg should be broken out into parallel RX rings based on 2, 3, 4 tuple (ethernet, ip, tcp/udp header) contents. TX will need a bit more careful analysis because yeah, RSS, lagg and TX queue / NIC selection. But we can fix that. > >All that said, have you considered FreeNAS (now TrueNAS)? > > We're not interested in a "canned" solution. We want to handcraft > these routers for the purpose, building them from the ground up on > standard releases of FreeBSD. If you want to chat offline about it then let me know. It would be good to get a "reference" platform together to explore what the performance issues are and just iterate on fixing them. -adrian