Simple Patch Lets Amazon's EC2 Linux Network Driver Start ~90x Faster
Written by Michael Larabel in Virtualization on 1 March 2020 at 03:00 AM EST. 14 Comments
VIRTUALIZATION --
With how ubiquitous the Amazon Elastic Compute Cloud (EC2) is, one may have assumed that for years the software stack was already extensively optimized to insane levels, especially as it concerns the boot time for being able to quickly respond to changes in load... But it turns out there still is some low hanging fruit such as with Amazon's "ENA" network driver and a new patch allowing it to initialize 90 times quicker.

The ENA Linux kernel driver is for the "Elastic Network Adapter" that provides the enhanced networking capabilities for Linux running on Amazon EC2. Interestingly, Intel engineer Josh Triplett managed to discover a big optimization out of the ENA driver with a rather trivial patch.

The ENA driver polls for responses on the admin command queue and currently waits five milliseconds between polls, but the hardware generally finishes much quicker. So in turn the Intel open-source developer changed the polling time from five milliseconds to 10 microseconds.

With the much shorter time between polling, the ENA driver initialization time dropped from 173 milliseconds to a mere 1.9 milliseconds, or as Josh noted, an improvement of more than 90x. This allows the EC2 instances to boot quicker and bringing up the network ever so slightly faster.

The patch is now pending review. If accepted this Amazon ENA network driver improvement could be mainlined as soon as Linux 5.7 or also picked up by Amazon Linux and other EC2-optimized distributions/kernels sooner.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week