finding optimal ipfw strategy

Eugene Grosbein eugen at grosbein.net
Tue Aug 27 21:54:22 UTC 2019


28.08.2019 3:20, Victor Gamov wrote:

>>>> hw.igb.max_interrupt_rate=32000
>>>
>>> It's about 5000-7000 per rxq
>>
>> 7000 is quite close considering it is average for quite long period (a second or seconds).
>> It can hit 8000 for some ticks easily in your case.
> 
> Eugene,  can you explain me what max_interrupt_rate means?  Calomel explain it as  "# maximum number of interrupts per second generated by single igb".  So if I increase it then more irq per sec will be generated and more context switch produced.  Why I need to increase it?

Already did in another post.

>> You should raise the limit as soon as possible. I'd advise to double it upto 16000 first
>> but if you cannot afford extra reboot better use 32000 as it's just fine for 1Gbps link.
> # sysctl hw.igb.max_interrupt_rate
> sysctl: unknown oid 'hw.igb.max_interrupt_rate'
> #
> Is it possible to set it at boot time only?

Yes, unless you patched igb(4) sources with a patch as described in by blog:
http://www.grosbein.net/freebsd/patches/igb_sysctl-11.0.diff.gz

It adds per-interface sysctls to change this on-the-fly:

dev.igb.0.max_interrupt_rate=32000
dev.igb.1.max_interrupt_rate=32000

Be warned that you still need to re-initialize the NIC to write changed value to the chip
and this will temporary stop traffic. Easiest way is to bring the interface down/up:
ifconfig igb0 down; ifconfig igb0 up

hw.igb.max_interrupt_rate is used as default value for sysctls so if you raise the limit in loader.conf,
it is used by chip on first "up" of interface at boot time.



More information about the freebsd-net mailing list