multi port NICS, and shared IRQ. Advantage or disadvantage

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
I heard from a colleague that multiport NICS aren't as good as many 1 port NICs because the multiport NICs share an IRQ. To me that sounds like an advantage! If you think about it, if both network devices on the card, need to speak to the kernel, they just need to send on interrupt. This results in one context switch instead of two. So if you have both ports heavily loaded (say doing 70Mb), that would result in millions of context switched, correct? If you had 2 nics, you would have twice the number of context switches which will kill CPU performance.

I've also seen server vendors mention that their onboard NICs have unique IRQs. So they market this as an advantage! Does anyone have some insight on this?

Thanks!
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
A context switch happens no matter what because the kernel gets interrupted to run the interrupt handler. A performance problem would occur if the interrupt handler wasn't reentrant, meaning only one instance of it could run at a time because if a fast stream of interrupts came in the handler could get back logged if it wasn't fast enough.

In reality I highly doubt it would make a difference unless the driver was really bad.
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
Wouldn't a dual port NIC take advantage of the one IRQ though? If traffic is going through both ports on the NIC, the kernel can handle both devices with one interrupt (and one context switch).

I'm just curious about this because some server manufacturers list the unique interrupt per onboard NIC as a feature. I can't figure out why this is an advantage.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I'm sure a packet coming in on either port would throw an interrupt, so you still have double the interrupts. I would think traffic coming in one NIC port and out the other would be fairly uncommon, usually multi-port NICs are used for bonding or putting a box on different segments for things like IDS. Even if you were using the box for a router the packet would still have to be copied to main memory so the packet filtering system could examine it to see if it should be routed.

I'm just curious about this because some server manufacturers list the unique interrupt per onboard NIC as a feature. I can't figure out why this is an advantage.

Probably because while 1 interrupt is pending on another on the same level can't be raised, so the interrupt handler has to acknowledge the interrupt before another can happen. If there's multiple IRQs being used multiple IRQs can be raised at the same time.