UDP merging vs VoIP
UDP merging vs VoIP
Posted Oct 31, 2009 18:31 UTC (Sat) by NAR (subscriber, #1313)Parent article: JLS2009: Generic receive offload
Posted Nov 1, 2009 1:02 UTC (Sun)
by intgr (subscriber, #39733)
[Link] (2 responses)
The article partly answers your question:
In a low-throughput setting, the kernel uses the normal interrupt-driven networking mode. Individual packets are processed as quickly as they come in over the wire.
Only when the CPU is too pegged to keep up with the interrupt load, does NAPI revert to the polling mode. At this point, without NAPI, the CPU would already be thrashing -- spending time to receive packets that it has no time to process. GRO merely increases the throughput that can be handled in polling mode.
How many packets are grabbed in each polling cycle can be changed with /proc/sys/net/core/netdev_budget (the default 300 is quite modest IMHO)
Posted Nov 1, 2009 11:00 UTC (Sun)
by NAR (subscriber, #1313)
[Link] (1 responses)
I'm not quite sure where this merging could be done. Only at the endpoints or in routers between?
Posted Nov 1, 2009 16:58 UTC (Sun)
by intgr (subscriber, #39733)
[Link]
Also, VOIP uses UDP simply because TCP would add additional delay when it attempts to retransmit packets that already missed their deadline.
But VOIP is still affected by packet loss. A UDP packet that missed its deadline is never way any worse than a UDP packet that got dropped.
UDP merging vs VoIP
> How does the kernel decide how long to wait for incoming packets before
> merging them? It turns out that there is no real need for any special
> waiting code: the NAPI API already has the driver polling for new packets
> occasionally and processing them in batches. GRO can simply be performed
> at NAPI poll time.
UDP merging vs VoIP
UDP merging vs VoIP
> If a system is serving as a router, it really should not be changing the
> headers on packets as they pass through.