Definition

packet coalescing

What is packet coalescing?

Packet coalescing involves using a computer's network interface card (NIC) to reduce the number of generated receive interrupts the adapter issues. An interrupt is a type of signal a device generates that causes the central processing unit to suspend its current work to deal with the signaled event.

A receive interrupt indicates that the NIC has received one or more data packets from the connected network and those packets are ready for processing. Too many receive interrupts can add to the system's processing overhead, affecting application performance and increasing power consumption. Packet coalescing alleviates these issues by caching the packets until they can be processed as a group, reducing interrupt events.

The exact approach used to implement packet coalescing depends on the host system, network adapter and individual settings. Regardless of how it's implemented, packet coalescing requires one or more mechanisms that determine when to issue the interrupts for the cached packets. For example, a timer could delay the interrupt for a specific period, or a counter could specify how many packets to retain before issuing the interrupt.

Although packet coalescing can help reduce processor load and power consumption, it must be carefully implemented to avoid performance issues. Excessive packet coalescing can introduce latency in light workloads that generate relatively few receive interrupts. Applications that rely on real-time data exchange and require minimal latency can suffer with excessive packet coalescing.

Inadequate packet coalescing can also cause applications with higher packet loads to perform inefficiently. The key is to strike a balance that best serves the specific workloads without putting any one type at risk, and do troubleshooting as needed.

Screen capture of the Wireshark interface showing packet information.
As shown in this screen capture, a tool such as Wireshark can capture packet information useful for analysis and troubleshooting.

Packet coalescing in Windows

Packet coalescing is often associated with Windows computers that rely on the Network Driver Interface Specification. Microsoft and 3Com developed NDIS to provide an application programming interface for NICs. The API serves as an abstraction layer between the hardware and network drivers, and facilitates communications between network devices.

Support for packet coalescing emerged in NDIS version 6.30 and has been included in every version since. On Windows computers, packet coalescing is used to group both random and multicast traffic to increase host system efficiency overall.

To implement NDIS packet coalescing, a network driver must define receive filters that specify how to screen broadcast and multicast packets. Each filter contains a set of specific fields in the packet's protocol headers. For example, a filter might include information such as the destination port of a User Datagram Protocol header or the destination address of a media access control header.

The network driver downloads the receive filters to the underlying miniport driver, which initializes the network adapter. As part of this process, the miniport driver registers the adapter's coalescing capabilities and which of those, including the adapter's filtering capabilities, are currently enabled.

The miniport driver also configures the NIC with the appropriate filter settings. As one of numerous settings, the receive filter specifies the maximum amount of time the NIC should cache packets matching the filter's criteria. The adapter uses this value to set the hardware timer, which determines when to issue an interrupt for the cached packets.

When the NIC receives data packets, it caches those that match the filter criteria. It releases the packets as a single interrupt when any one of these events occurs:

  • The cache fills up.
  • The hardware timer expires because it has reached the maximum delay value.
  • The adapter receives a packet that does not meet the filter criteria.
  • The space available in the device's coalescing buffer reaches its low-water mark.
  • Another interrupt event occurs, such as a send completion event.

When one of these events occurs, the adapter issues an interrupt, causing the miniport driver to process the cached packets. NDIS packet coalescing can occur only when the data packets are received on port 0, the default NDIS port. The feature cannot be used for NDIS ports assigned to virtual network adapters.

Network protocols are key for communication and connection across the internet. Learn about common network protocols and their functions.

This was last updated in June 2024

Continue Reading About packet coalescing