AWS AWSEC2 documentation change
Summary
Removed 'Prerequisites for Linux instances' section and restructured 'Tune performance' section to promote a configuration script that validates ENA Express settings instead of manual configuration steps.
Security assessment
The changes focus on simplifying performance tuning by replacing manual commands with a validation script. While network configurations can impact security, there's no evidence of addressing vulnerabilities or security incidents. The script checks performance-related settings like MTU size, queue limits, and buffer sizes without introducing new security features or addressing security flaws.
Diff
diff --git a/AWSEC2/latest/UserGuide/ena-express.md b/AWSEC2/latest/UserGuide/ena-express.md index fee78eefc..c5984fd0a 100644 --- a//AWSEC2/latest/UserGuide/ena-express.md +++ b//AWSEC2/latest/UserGuide/ena-express.md @@ -7 +7 @@ -How ENA Express worksSupported instance types for ENA ExpressPrerequisites for Linux instancesTune performance for ENA Express settings on Linux instances +How ENA Express worksSupported instance types for ENA ExpressTune performance for ENA Express settings on Linux instances @@ -54,2 +53,0 @@ During periods of time when network traffic is light, you might notice a slight - * Prerequisites for Linux instances - @@ -545,7 +543 @@ Instance type | Architecture -## Prerequisites for Linux instances - -To ensure that ENA Express can operate effectively, update the settings for your Linux instance as follows. - - * If your instance uses jumbo frames, run the following command to set your maximum transmission unit (MTU) to `8900`. - - [ec2-user ~]$ sudo ip link set dev eth0 mtu 8900 +## Tune performance for ENA Express settings on Linux instances @@ -553 +545 @@ To ensure that ENA Express can operate effectively, update the settings for your - * Increase the receiver (Rx) ring size, as follows: +To ensure that ENA Express can operate effectively, your Linux instance must meet several network configuration requirements. @@ -555 +547 @@ To ensure that ENA Express can operate effectively, update the settings for your - [ec2-user ~]$ ethtool -G device rx 8192 +Rather than configuring each setting manually, you can download and run the ENA Express settings check script from the Amazon GitHub repository. The script validates your instance against the required and recommended settings for ENA Express, and outputs the exact commands to fix any issues it finds. @@ -557 +549 @@ To ensure that ENA Express can operate effectively, update the settings for your - * To maximize ENA Express bandwidth, configure your TCP queue limits as follows: +[https://github.com/amzn/amzn-ec2-ena-utilities/blob/main/ena-express/check-ena-express-settings.sh](https://github.com/amzn/amzn-ec2-ena-utilities/blob/main/ena-express/check-ena-express-settings.sh) @@ -559 +551 @@ To ensure that ENA Express can operate effectively, update the settings for your - 1. Set the TCP small queue limit to 1MB or higher. This increases the amount of data that's queued for transmission on a socket. +The script checks the following settings and configurations: @@ -561 +553 @@ To ensure that ENA Express can operate effectively, update the settings for your - sudo sh -c 'echo 1048576 > /proc/sys/net/ipv4/tcp_limit_output_bytes' + * **MTU size** – ENA Express requires a lower MTU than the default to accommodate additional AWS SRD headers. Newly established TCP connections automatically clamp the MSS to mitigate this, but UDP traffic still requires a lower MTU. @@ -563 +555 @@ To ensure that ENA Express can operate effectively, update the settings for your - 2. Disable byte queue limits on the eth device if they're enabled for your Linux distribution. This increases data queued for transmission for the device queue. + * **TCP output queue size limit** – Checks that the per-socket in-flight byte limit is sufficient to sustain high throughput. Environments with increased network latency require a higher limit. @@ -565 +557 @@ To ensure that ENA Express can operate effectively, update the settings for your - sudo sh -c 'for txq in /sys/class/net/eth0/queues/tx-*; do echo max > ${txq}/byte_queue_limits/limit_min; done' + * **Byte queue limit** – Confirms that the byte queue limit (BQL) is disabled on the network interface. BQL can restrict the amount of data queued for device-level transmission, which limits ENA Express performance. @@ -571 +563 @@ The ENA driver for the Amazon Linux distribution disables byte queue limits by d - * To minimize ENA Express TCP traffic latency, you can disable the TCP autocorking feature. This might result in a minimal increase in packet overhead: + * **TCP autocorking** – Checks whether TCP autocorking is disabled. Disabling autocorking can reduce latency for certain ENA Express TCP traffic patterns, such as request-response workloads. This might result in a minimal increase in packet processing overhead. @@ -573 +565 @@ The ENA driver for the Amazon Linux distribution disables byte queue limits by d - sudo bash -c 'echo 0 > /proc/sys/net/ipv4/tcp_autocorking' + * **TX queue size and Large LLQ** – Verifies that the transmit queue size for the network interface is large enough for optimal performance. The script also checks whether the ENA module parameter explicitly disables the Large Low Latency Queue (Large LLQ) feature, as it can reduce the available TX queue depth. For more information about Large LLQ and its impact on TX queue size, see [Large Low Latency Queue (Large LLQ)](https://github.com/amzn/amzn-drivers/tree/master/kernel/linux/ena#large-low-latency-queue-large-llq) on GitHub. @@ -574,0 +567 @@ The ENA driver for the Amazon Linux distribution disables byte queue limits by d + * **RX queue size** – Checks that the receive ring buffer for the network interface is large enough to handle incoming traffic efficiently and avoid packet drops under load. @@ -575,0 +569 @@ The ENA driver for the Amazon Linux distribution disables byte queue limits by d + * **TCP and network socket buffer sizes** – Validates that the TCP receive and send buffer maximum sizes, as well as the core network socket buffer defaults and maximums, are large enough to sustain high throughput. These settings are important in environments with increased network latency, where you need larger buffers to fully utilize the connection. @@ -576,0 +571 @@ The ENA driver for the Amazon Linux distribution disables byte queue limits by d + * **TCP congestion control** – Verifies that the TCP congestion control configuration is optimized for use with ENA Express in environments with increased network latency. @@ -578 +572,0 @@ The ENA driver for the Amazon Linux distribution disables byte queue limits by d -## Tune performance for ENA Express settings on Linux instances @@ -580 +573,0 @@ The ENA driver for the Amazon Linux distribution disables byte queue limits by d -To check your Linux instance configuration for optimal ENA Express performance, you can run the following script that's available on the Amazon GitHub repository: @@ -582 +574,0 @@ To check your Linux instance configuration for optimal ENA Express performance, -[https://github.com/amzn/amzn-ec2-ena-utilities/blob/main/ena-express/check-ena-express-settings.sh](https://github.com/amzn/amzn-ec2-ena-utilities/blob/main/ena-express/check-ena-express-settings.sh) @@ -584 +576,3 @@ To check your Linux instance configuration for optimal ENA Express performance, -The script runs a series of tests and suggests both recommended and required configuration changes. +The script also reports additional diagnostic information, including the ENA driver version, ENA SRD statistics, interrupt moderation settings, queue configuration, and socket buffer sizes. This information can be useful for troubleshooting ENA Express performance issues. + +To ensure that your instance network driver is configured for optimum performance, also review the [ENA Linux Driver Best Practices and Performance Optimization Guide](https://github.com/amzn/amzn-drivers/blob/master/kernel/linux/ena/ENA_Linux_Best_Practices.rst) on GitHub.