Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
UDP merging vs VoIP
Posted Nov 1, 2009 1:02 UTC (Sun) by intgr (subscriber, #39733)
The article partly answers your question:
> 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.
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)
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)
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.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds