-
-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change implements an initial version of GSO support [1][2][3] for Linux, which improves the effiency of sending data. The approach taken in this change is to create a buffer which contains multiple datagrams in `Connection::poll_transmit`. This was picked over trying to merge packets in the endpoint task, since packets seem to need to be padded to a common segment size in order to make them sendable via GSO. In order to to this in an efficient fashion, the `poll_transmit` method was restructred. Instead of selecting spaces upfront, it will now loop through all possible packet spaces, check if there is pending data to send and create packets and datagrams out of this. The last packet which was written to a datagram buffer is not finalized until it is clear whether follow-up packets need to be written, since we need to know whether this packet should get padded to MTU length or not. This change doesn't enable GSO yet, since it will only produce a single datagram. I will create a separate change for this. Performance measurements: **No GSO:** ``` Sent 1073741824 bytes on 1 streams in 4.31s (237.66 MiB/s) ``` **With GSO (up to 8 packets):** ``` Sent 1073741824 bytes on 1 streams in 3.02s (339.18 MiB/s) ``` [1] http://vger.kernel.org/lpc_net2018_talks/willemdebruijn-lpc2018-udpgso-paper-DRAFT-1.pdf [2] http://vger.kernel.org/lpc_net2018_talks/willemdebruijn-lpc2018-udpgso-presentation-20181104.pdf [3] https://lwn.net/Articles/752956/
- Loading branch information
1 parent
f1628f8
commit f830910
Showing
1 changed file
with
138 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters