What is an Interrupt (Network I/O)?
A network card's interrupt, told as a story about a bell that rings every time a parcel arrives.
A bell rings every time a parcel arrives.The bell flags every arrival, so the clerk needn't keep walking over to check.
A faster truck makes the bell ring nonstop.When parcels pour in nonstop, the bell floods and the clerk can't do anything else.
The bell announces each arrival right away — or, when that's too frequent, rings once for several parcels.A bell ringing too often disrupts the clerk, so several parcels can share one ring.
Ringing every time swamps the clerk; ringing in batches delays the news a little.Coalescing raises overall throughput compared to ringing every time, but each arrival is known a bit later.
Notification latency and overall throughput trade off against each other.Interrupts in general live in the Systems field; here we look only at the network card's bell.
A network I/O interrupt is the bell that announces a parcel (packet) has arrived right away — and when it rings too often, several are coalesced into one ring instead.
A network interface card (NIC) raises a CPU interrupt on every packet arrival so it gets handled right away. Under very heavy traffic, interrupts fire so often the CPU can't do anything else — an 'interrupt storm.' To prevent this, interrupt coalescing batches several packets and raises just one interrupt for the group, trading a bit of latency for better overall throughput. Another approach, as in Linux's NAPI, switches to polling while traffic stays heavy. It builds on the general CPU interrupt that pauses a running program, applied specifically to network I/O.
When grown-ups say it
- Network interrupt
- The bell that announces a parcel's arrival right away. A signal the NIC raises to the CPU.
- Interrupt storm
- The bell ringing nonstop until all other work stalls. Happens under very heavy traffic.
- Interrupt coalescing
- Gathering several parcels and ringing the bell just once. Adds some latency but improves throughput.
- Network Interface Card
- The receiving window that rings the bell. The actual hardware where packets arrive.
- Polling
- Instead of a bell, the clerk walks over to check on their own, repeatedly. The opposite strategy to an interrupt.
- Throughput
- How much got processed overall. What coalescing is designed to improve.
- Latency
- How long it takes for one parcel to be flagged. What coalescing slightly worsens.
- Interrupt (process)
- The general interrupt that pauses a CPU mid-program. Covered from a different angle in the Systems field. → the bell that pauses what you were doing