Broadcom bce(4) Cards
Several users have noted issues with certain Broadcom network cards, especially those built into Dell hardware. If you find that your bce cards are behaving erratically, dropping packets, or causing system crashes, then you may want to apply the following tweaks, especially on amd64.
In /boot/loader.conf.local – Add the following (or create the file if it does not exist):
kern.ipc.nmbclusters=”131072″
hw.bce.tso_enable=0
hw.pci.enable_msix=0
That will increase the amount of network memory buffers, disable TSO directly, and disable msix.
Packet loss with many (small) UDP packets
If you see a lot of packet loss with UDP on bce cards, you might also try changing the netisr settings. These can be set as system tunables under System > Advanced, on the System Tunables tab. On that page, add two new tunables:
net.isr.direct_force=1
net.isr.direct=1
Broadcom bge(4) Cards
See above, but change “bce” to “bge” in the setting names.
Intel igb(4) and em(4) Cards
Certain intel igb cards, especially multi-port cards, can very easily/quickly exhaust mbufs and cause panics, especially on amd64. The following tweaks should help:
In /boot/loader.conf.local – Add the following (or create the file if it does not exist):
kern.ipc.nmbclusters=”131072″
hw.igb.num_queues=1
That will increase the amount of network memory buffers, and make the card use one queue instead of multiple queues, to reduce the strain on the system.
The same settings can also apply to em(4) cards, just use “em” in place of “igb” in the setting(s) above.
Intel ix(4) Cards
in /boot/loader.conf.local
kern.ipc.nmbclusters=”262144″
kern.ipc.nmbjumbop=”262144″
As a sysctl (system tunable)
hw.intr_storm_threshold=10000
If using VLANs with Intel 10 Gb ix(4) cards, you may need to disable some features of the driver for VLANs to work correctly. For instance, to apply these settings on NIC ix0, run the following.
ifconfig ix0 -vlanhwfilter
That alone should be enough, but in some cases you may also find that you need to disable TSO in addition to VLAN hardware filtering, which can be done like so:
ifconfig ix0 -vlanhwfilter -vlanhwtso -tso
You can place these commands into a shellcmd tag to execute at boot time to make the change persistent.
Flow Control
In some circumstances, you may wish to disable flow control. The exact method of this depends on the hardware involved, but here are a couple examples.
- All of these go in /boot/loader.conf.local
- em (4):
- hw.em.fc_setting = 0
- IGB (4):
- hw.igb.fc_setting = 0
This document comes from here.