Re: How multithreaded is networking in FreeBSD 15.1?
Андрей Герасимов <[email protected]>
| Newsgroups | gmane.os.freebsd.questions |
|---|---|
| Message-ID | <CALBL1Yu67VY18e0-6wR1bEJWCumVk-0+3AB5Yc7CCE16B+YH-w@mail.gmail.com> |
For a high-load router, you need to consider the network card. For 1G-10G, Intel performs well, while Mellanox performs well for 40G and higher. The main thing is that the network card supports RSS (distributing interrupts from the network card across processor cores) and the FreeBSD driver is able to handle it. Next, select a processor. The higher the clock speed of each core, the better. Hyperthreading should be disabled. For example, the Intel 82599EB has 2 ports, each port using 8 interrupts. For maximum performance, you need to dedicate 8 processor cores to each network card port. To maximize the use of both ports, you need a processor with 18 cores (Xeon Gold 6150). Reserve 1-2 cores for the OS itself, IPFW, NAT, etc. If only one network card port will be used, 10 cores are fine. You can use a dual-processor server with simpler processors, but it's more difficult to distribute interrupts across the processor cores, and performance will be slightly worse than with a single processor. Choose memory based on the processor's requirements and the required capacity. Properly configured IPfw and NAT work under heavy loads without problems. LACP also offers no performance issues, as long as you use an even number of ports. Three ports will work, but not at full capacity. пн, 17 авг. 2026 г. в 08:39, David Christensen <[email protected]>: > On 8/16/26 18:23, Brett Glass 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. > > > >> 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. > > > > --Brett > > > I lack the detailed knowledge required to answer your processor question > with any degree of certainty. > > > I agree that a network appliance processor should not need advanced > technologies; unless there is a BSD networking library that can make use > of such. I seem to recall seeing barebones NAS appliances with 8 core > Celeron processors with AES-NI. > > > If this is a one-off project, I would buy the biggest, fastest processor > I could afford. > > > If this is a low volume internal product development project, I would > buy/ build a few example systems per what you have outlined, install > FreeBSD, and devise benchmarks to guide selection. > > > AIUI manufacturers have been putting custom ASIC's into networking > equipment for many years. The results are better, faster, and cheaper > than general-purpose computers with network interfaces. But, volume > must be large to amortize the engineering and capital costs. > > > Even if you do not choose a FreeBSD-based FOSS OS network appliance > distribution, I suggest reading their web sites and message boards to > get ideas. > > > David > > >