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_ntxqs (here is the manpage). Command to set them would look like
sysctl dev.ixl.1.iflib.override_qs_enable="1" and so on (
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"
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.