We need to configure NIC for better performance of our application on FreeBSD 12. System is
FreeBSD 12.0-RELEASE-p3 GENERIC amd64
To start, I would like to show our solution for Linux system. For setup 16 RX and 16 TX queues on our multi-queue NIC we apply command ethtool -L ens786f1 combined 16
. We are looking for alternative call for FreeBSD system.
On FreeBSD, our NIC is driven by ixl
driver. I have found some kernel variables that should do the same thing like override_qs_enable
, override_nrxqs
and override_ntxqs
(here is the manpage). Command to set them would look like sysctl dev.ixl.1.iflib.override_qs_enable="1"
and so on (ens786f1
and ixl1
is the same device with different interface on different system).
I would like to set these variables every time on boot. Manpage says that these variables have to be set on boot before the ixl
driver is loaded (using loader), so I added setup lines into /boot/loader.conf
. The file was empty before,
so now it looks like:
#Setup NIC#
dev.ixl.1.iflib.override_qs_enable="1"
dev.ixl.1.iflib.override_nrxqs="16"
dev.ixl.1.iflib.override_ntxqs="16"
/boot/defaults/loader.conf
included /boot/loader.conf
using loader_conf_files
, so my boot file should be running. But when I reboot and look at the variables using sysctl
, these variables are default (0) and when I look at dmesg
, device is not setup the way I wanted (still shows 8 RX and 8 TX queues).
It's possible that /boot/loader.conf is not called; maybe it's just bad approach to replace ethtool
command on FreeBSD.
Some logs: pastebin.com/YGTxqxdx
I have also tried to set up variables using kenv
(save in file also) but it seems that options aren't saved after a reboot.
After few days of research, I have found out that I probably have to set up new / edit old VF of my NIC using iovctl
. When I call iovctl -S -d ixl1
, there is a parameter num-queues
. Does anyone have experience with this configuration?
Problem was with Loader - wrong loader setup in GRUB. Still, if you are looking for help regarding setting up a number of RX/TX queues with same driver, the answer below is a really good set of information.
iovctl
is however for setting SR-IOV. The ixl driver supports this but is for I/O virtualization and allows the card to appear as multiple device. See What is SR-IOV?.sysctl dev.ixl hw.ixl hw.intr_storm_threshold
,sysctl -d dev.ixl hw.ixl
anddmesg | grep ^ixl
to your question. Reading the ixl man page I am not sure that this driver uses iflib. Maybe it ishw.ixl.max_queues
you are looking for? Are you even sure you need to set the queues? The defaults might be OK on FreeBSD as the driver is not the same as on Linux. You conflate 3 problems into 1: a) Fix a (unknown) performance issue b) Finding the correct tunable setting and c) making it persist.iflib
isixl
s driver interface.. There is nohw.ixl.max_queues
variable to setup. In short, I'm looking for solution for adding more rxq/txq descriptors. And yes, I need to find correct tunables and making them persist. But find the currect tunables is the main problem, making them persist should be secondary problem. None fixing of performance issue, just tunning..