

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 ENA Express 提高 EC2 執行個體之間的網路效能
<a name="ena-express"></a>

ENA Express 採用可擴展可靠資料包 AWS (SRD) 技術。SRD 是一種高效能的網路傳輸通訊協定，其使用動態路由來增加輸送量並將網路流量尾延遲降至最低。使用 ENA Express，您可以在相同可用區域中的兩個 EC2 執行個體之間進行通訊。

**ENA Express 的優勢**
+ 將單一流程在可用區域中可使用的最高頻寬從 5Gbps 增加到最高 25Gbps，最高可達彙總執行個體限制。
+ 減少 EC2 執行個體之間網路流量的尾延遲，特別是在高網路負載期間。
+ 偵測並避免擁塞的網路路徑。
+ 直接在網路層中處理某些任務，例如接收端的封包重新排序，以及大多數需要的重新傳輸。這會釋放應用程式層進行其他工作。

**注意**  
如果應用程式每秒傳送或接收大量封包，而且大部分時間需要最佳化延遲，尤其是在網路上沒有擁塞的期間，則 [增強型網路](enhanced-networking.md) 可能更適合您的網路。
ENA Express 流量無法在本機區域中傳送。

在執行個體上為網路介面附件啟用 ENA Express 之後，傳送執行個體會啟動與接收執行個體的通訊，而 SRD 會偵測 ENA Express 是否同時在傳送執行個體和接收執行個體上運作。如果 ENA Express 正在運作，則通訊可以使用 SRD 傳輸。如果 ENA Express 尚未運作，則通訊會回復為標準 ENA 傳輸。

在網路流量較輕的期間，當封包使用 ENA Express 時，您可能會注意到封包延遲會略有增加 (數十微秒)。在這段時間內，優先考慮特定網路效能特性的應用程式可以從 ENA Express 中受益，如下所示：
+ 程序可以從相同可用區域內最高單一流量頻寬從 5Gbps 增加到最高 25Gbps 中獲益，最高可達彙總執行個體限制。例如，如果特定執行個體類型最高支援 12.5 Gbps，則單一流量頻寬也會限制為 12.5 Gbps。
+ 在網路擁塞期間，執行時間較長的程序會減少尾延遲。
+ 程序可以從更順暢且更標準的網路回應時間分佈中獲益。

**Topics**
+ [ENA Express 的工作原理](#ena-express-how-it-works)
+ [ENA Express 支援的執行個體類型](#ena-express-supported-instance-types)
+ [使用 Linux 執行個體的先決條件](#ena-express-prereq-linux)
+ [調校 Linux 執行個體上 ENA Express 設定的效能](#ena-express-tune)
+ [檢閱 EC2 執行個體的 ENA Express 設定](ena-express-list-view.md)
+ [設定 EC2 執行個體的 ENA Express 設定](ena-express-configure.md)

## ENA Express 的工作原理
<a name="ena-express-how-it-works"></a>

ENA Express 採用可擴展可靠資料包 AWS (SRD) 技術。它會將每個網路流程的封包分配到不同的 AWS 網路路徑，並在偵測到擁塞跡象時動態調整分佈。它還管理接收端的封包重新排序。

若要確保 ENA Express 可以按預期管理網路流量，傳送和接收執行個體及其之間的通訊必須符合下列所有要求：
+ 支援傳送和接收執行個體類型。如需詳細資訊，請參閱 [ENA Express 支援的執行個體類型](#ena-express-supported-instance-types) 資料表。
+ 傳送和接收執行個體都必須設定 ENA Express。如果組態有任何差異，您可能會遇到流量預設為標準 ENA 傳輸的情況。下列情境說明會發生的情況。

  **情況：組態的差異**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/ena-express.html)

  在這種情況下，兩個執行個體之間的 TCP 流量可以使用 ENA Express，因為這兩個執行個體皆已將其啟用。但是，由於其中一個執行個體並未將 ENA Express 用於 UDP 流量，因此這兩個執行個體透過 UDP 之間的通訊會使用標準 ENA 傳輸。
+ 傳送和接收執行個體必須在相同的可用區域中執行。
+ 執行個體之間的網路路徑不得包含中介軟體方塊。ENA Express 目前不支援中介軟體。
+ (僅 Linux 執行個體) 若要充分利用全部頻寬潛力，請使用 2.2.9 或更新版本的驅動程式。
+ (僅 Linux 執行個體) 若要產生指標，請使用 2.8 或更新版本的驅動程式。

如果未滿足任意要求，執行個體會使用標準 TCP/UDP 通訊協定但不帶 SRD 進行通訊。

若要確保您的執行個體網路驅動程式設定為最佳效能，請參閱適用於 ENA 驅動程式的建議最佳實務。這些最佳實務也適用於 ENA Express。如需詳細資訊，請參閱 GitHub 網站上的 [ENA Linux 驅動程式最佳實務與效能最佳化指南](https://github.com/amzn/amzn-drivers/blob/master/kernel/linux/ena/ENA_Linux_Best_Practices.rst)。

**注意**  
Amazon EC2 是指執行個體與以*附件*形式連接到執行個體的網路介面之間的關係。ENA Express 設定會套用至附件。如果網路介面從執行個體中斷連接，則附件將不再存在，而套用至該執行個體的 ENA Express 設定將不再有效。執行個體終止時也是如此，即使網路介面仍然存在。

在傳送執行個體和接收執行個體上啟用網路介面附件的 ENA Express 之後，您可以使用 ENA Express 指標來協助確保您的執行個體充分利用 SRD 技術提供的效能改進。如需 ENA Express 指標的詳細資訊，請參閱 [ENA Express 的指標](monitoring-network-performance-ena.md#network-performance-metrics-ena-express)。

## ENA Express 支援的執行個體類型
<a name="ena-express-supported-instance-types"></a>

下列執行個體類型支援 ENA Express。

------
#### [ General purpose ]


| 執行個體類型 | Architecture | 
| --- | --- | 
| m6a.12xlarge | x86\$164 | 
| m6a.16xlarge | x86\$164 | 
| m6a.24xlarge | x86\$164 | 
| m6a.32xlarge | x86\$164 | 
| m6a.48xlarge | x86\$164 | 
| m6a.metal | x86\$164 | 
| m6i.8xlarge | x86\$164 | 
| m6i.12xlarge | x86\$164 | 
| m6i.16xlarge | x86\$164 | 
| m6i.24xlarge | x86\$164 | 
| m6i.32xlarge | x86\$164 | 
| m6i.metal | x86\$164 | 
| m6id.8xlarge | x86\$164 | 
| m6id.12xlarge | x86\$164 | 
| m6id.16xlarge | x86\$164 | 
| m6id.24xlarge | x86\$164 | 
| m6id.32xlarge | x86\$164 | 
| m6id.metal | x86\$164 | 
| m6idn.8xlarge | x86\$164 | 
| m6idn.12xlarge | x86\$164 | 
| m6idn.16xlarge | x86\$164 | 
| m6idn.24xlarge | x86\$164 | 
| m6idn.32xlarge | x86\$164 | 
| m6idn.metal | x86\$164 | 
| m6in.8xlarge | x86\$164 | 
| m6in.12xlarge | x86\$164 | 
| m6in.16xlarge | x86\$164 | 
| m6in.24xlarge | x86\$164 | 
| m6in.32xlarge | x86\$164 | 
| m6in.metal | x86\$164 | 
| m7a.12xlarge | x86\$164 | 
| m7a.16xlarge | x86\$164 | 
| m7a.24xlarge | x86\$164 | 
| m7a.32xlarge | x86\$164 | 
| m7a.48xlarge | x86\$164 | 
| m7a.metal-48xl | x86\$164 | 
| m7g.12xlarge | arm64 | 
| m7g.16xlarge | arm64 | 
| m7g.metal | arm64 | 
| m7gd.12xlarge | arm64 | 
| m7gd.16xlarge | arm64 | 
| m7gd.metal | arm64 | 
| m7i.12xlarge | x86\$164 | 
| m7i.16xlarge | x86\$164 | 
| m7i.24xlarge | x86\$164 | 
| m7i.48xlarge | x86\$164 | 
| m7i.metal-24xl | x86\$164 | 
| m7i.metal-48xl | x86\$164 | 
| m8a.16xlarge | x86\$164 | 
| m8a.24xlarge | x86\$164 | 
| m8a.48xlarge | x86\$164 | 
| m8a.metal-24xl | x86\$164 | 
| m8a.metal-48xl | x86\$164 | 
| m8azn.12xlarge | x86\$164 | 
| m8azn.24xlarge | x86\$164 | 
| m8azn.metal-12xl | x86\$164 | 
| m8azn.metal-24xl | x86\$164 | 
| m8g.12xlarge | arm64 | 
| m8g.16xlarge | arm64 | 
| m8g.24xlarge | arm64 | 
| m8g.48xlarge | arm64 | 
| m8g.metal-24xl | arm64 | 
| m8g.metal-48xl | arm64 | 
| m8gb.8xlarge | arm64 | 
| m8gb.12xlarge | arm64 | 
| m8gb.16xlarge | arm64 | 
| m8gb.24xlarge | arm64 | 
| m8gb.48xlarge | arm64 | 
| m8gb.metal-24xl | arm64 | 
| m8gb.metal-48xl | arm64 | 
| m8gd.12xlarge | arm64 | 
| m8gd.16xlarge | arm64 | 
| m8gd.24xlarge | arm64 | 
| m8gd.48xlarge | arm64 | 
| m8gd.metal-24xl | arm64 | 
| m8gd.metal-48xl | arm64 | 
| m8gn.8xlarge | arm64 | 
| m8gn.12xlarge | arm64 | 
| m8gn.16xlarge | arm64 | 
| m8gn.24xlarge | arm64 | 
| m8gn.48xlarge | arm64 | 
| m8gn.metal-24xl | arm64 | 
| m8gn.metal-48xl | arm64 | 
| m8i.24xlarge | x86\$164 | 
| m8i.32xlarge | x86\$164 | 
| m8i.48xlarge | x86\$164 | 
| m8i.96xlarge | x86\$164 | 
| m8i.metal-48xl | x86\$164 | 
| m8i.metal-96xl | x86\$164 | 
| m8id.24xlarge | x86\$164 | 
| m8id.32xlarge | x86\$164 | 
| m8id.48xlarge | x86\$164 | 
| m8id.96xlarge | x86\$164 | 
| m8id.metal-48xl | x86\$164 | 
| m8id.metal-96xl | x86\$164 | 

------
#### [ Compute optimized ]


| 執行個體類型 | Architecture | 
| --- | --- | 
| c6a.12xlarge | x86\$164 | 
| c6a.16xlarge | x86\$164 | 
| c6a.24xlarge | x86\$164 | 
| c6a.32xlarge | x86\$164 | 
| c6a.48xlarge | x86\$164 | 
| c6a.metal | x86\$164 | 
| c6gn.4xlarge | arm64 | 
| c6gn.8xlarge | arm64 | 
| c6gn.12xlarge | arm64 | 
| c6gn.16xlarge | arm64 | 
| c6i.8xlarge | x86\$164 | 
| c6i.12xlarge | x86\$164 | 
| c6i.16xlarge | x86\$164 | 
| c6i.24xlarge | x86\$164 | 
| c6i.32xlarge | x86\$164 | 
| c6i.metal | x86\$164 | 
| c6id.8xlarge | x86\$164 | 
| c6id.12xlarge | x86\$164 | 
| c6id.16xlarge | x86\$164 | 
| c6id.24xlarge | x86\$164 | 
| c6id.32xlarge | x86\$164 | 
| c6id.metal | x86\$164 | 
| c6in.8xlarge | x86\$164 | 
| c6in.12xlarge | x86\$164 | 
| c6in.16xlarge | x86\$164 | 
| c6in.24xlarge | x86\$164 | 
| c6in.32xlarge | x86\$164 | 
| c6in.metal | x86\$164 | 
| c7a.12xlarge | x86\$164 | 
| c7a.16xlarge | x86\$164 | 
| c7a.24xlarge | x86\$164 | 
| c7a.32xlarge | x86\$164 | 
| c7a.48xlarge | x86\$164 | 
| c7a.metal-48xl | x86\$164 | 
| c7g.12xlarge | arm64 | 
| c7g.16xlarge | arm64 | 
| c7g.metal | arm64 | 
| c7gd.12xlarge | arm64 | 
| c7gd.16xlarge | arm64 | 
| c7gd.metal | arm64 | 
| c7gn.4xlarge | arm64 | 
| c7gn.8xlarge | arm64 | 
| c7gn.12xlarge | arm64 | 
| c7gn.16xlarge | arm64 | 
| c7gn.metal | arm64 | 
| c7i.12xlarge | x86\$164 | 
| c7i.16xlarge | x86\$164 | 
| c7i.24xlarge | x86\$164 | 
| c7i.48xlarge | x86\$164 | 
| c7i.metal-24xl | x86\$164 | 
| c7i.metal-48xl | x86\$164 | 
| c8a.16xlarge | x86\$164 | 
| c8a.24xlarge | x86\$164 | 
| c8a.48xlarge | x86\$164 | 
| c8a.metal-24xl | x86\$164 | 
| c8a.metal-48xl | x86\$164 | 
| c8g.12xlarge | arm64 | 
| c8g.16xlarge | arm64 | 
| c8g.24xlarge | arm64 | 
| c8g.48xlarge | arm64 | 
| c8g.metal-24xl | arm64 | 
| c8g.metal-48xl | arm64 | 
| c8gb.8xlarge | arm64 | 
| c8gb.12xlarge | arm64 | 
| c8gb.16xlarge | arm64 | 
| c8gb.24xlarge | arm64 | 
| c8gb.48xlarge | arm64 | 
| c8gb.metal-24xl | arm64 | 
| c8gb.metal-48xl | arm64 | 
| c8gd.12xlarge | arm64 | 
| c8gd.16xlarge | arm64 | 
| c8gd.24xlarge | arm64 | 
| c8gd.48xlarge | arm64 | 
| c8gd.metal-24xl | arm64 | 
| c8gd.metal-48xl | arm64 | 
| c8gn.8xlarge | arm64 | 
| c8gn.12xlarge | arm64 | 
| c8gn.16xlarge | arm64 | 
| c8gn.24xlarge | arm64 | 
| c8gn.48xlarge | arm64 | 
| c8gn.metal-24xl | arm64 | 
| c8gn.metal-48xl | arm64 | 
| c8i.24xlarge | x86\$164 | 
| c8i.32xlarge | x86\$164 | 
| c8i.48xlarge | x86\$164 | 
| c8i.96xlarge | x86\$164 | 
| c8i.metal-48xl | x86\$164 | 
| c8i.metal-96xl | x86\$164 | 
| c8ib.12xlarge | x86\$164 | 
| c8ib.16xlarge | x86\$164 | 
| c8ib.24xlarge | x86\$164 | 
| c8ib.32xlarge | x86\$164 | 
| c8ib.48xlarge | x86\$164 | 
| c8ib.96xlarge | x86\$164 | 
| c8ib.metal-48xl | x86\$164 | 
| c8ib.metal-96xl | x86\$164 | 
| c8id.24xlarge | x86\$164 | 
| c8id.32xlarge | x86\$164 | 
| c8id.48xlarge | x86\$164 | 
| c8id.96xlarge | x86\$164 | 
| c8id.metal-48xl | x86\$164 | 
| c8id.metal-96xl | x86\$164 | 
| c8in.12xlarge | x86\$164 | 
| c8in.16xlarge | x86\$164 | 
| c8in.24xlarge | x86\$164 | 
| c8in.32xlarge | x86\$164 | 
| c8in.48xlarge | x86\$164 | 
| c8in.96xlarge | x86\$164 | 
| c8in.metal-48xl | x86\$164 | 
| c8in.metal-96xl | x86\$164 | 

------
#### [ Memory optimized ]


| 執行個體類型 | Architecture | 
| --- | --- | 
| r6a.12xlarge | x86\$164 | 
| r6a.16xlarge | x86\$164 | 
| r6a.24xlarge | x86\$164 | 
| r6a.32xlarge | x86\$164 | 
| r6a.48xlarge | x86\$164 | 
| r6a.metal | x86\$164 | 
| r6i.8xlarge | x86\$164 | 
| r6i.12xlarge | x86\$164 | 
| r6i.16xlarge | x86\$164 | 
| r6i.24xlarge | x86\$164 | 
| r6i.32xlarge | x86\$164 | 
| r6i.metal | x86\$164 | 
| r6id.8xlarge | x86\$164 | 
| r6id.12xlarge | x86\$164 | 
| r6id.16xlarge | x86\$164 | 
| r6id.24xlarge | x86\$164 | 
| r6id.32xlarge | x86\$164 | 
| r6id.metal | x86\$164 | 
| r6idn.8xlarge | x86\$164 | 
| r6idn.12xlarge | x86\$164 | 
| r6idn.16xlarge | x86\$164 | 
| r6idn.24xlarge | x86\$164 | 
| r6idn.32xlarge | x86\$164 | 
| r6idn.metal | x86\$164 | 
| r6in.8xlarge | x86\$164 | 
| r6in.12xlarge | x86\$164 | 
| r6in.16xlarge | x86\$164 | 
| r6in.24xlarge | x86\$164 | 
| r6in.32xlarge | x86\$164 | 
| r6in.metal | x86\$164 | 
| r7a.12xlarge | x86\$164 | 
| r7a.16xlarge | x86\$164 | 
| r7a.24xlarge | x86\$164 | 
| r7a.32xlarge | x86\$164 | 
| r7a.48xlarge | x86\$164 | 
| r7a.metal-48xl | x86\$164 | 
| r7g.12xlarge | arm64 | 
| r7g.16xlarge | arm64 | 
| r7g.metal | arm64 | 
| r7gd.12xlarge | arm64 | 
| r7gd.16xlarge | arm64 | 
| r7gd.metal | arm64 | 
| r7i.12xlarge | x86\$164 | 
| r7i.16xlarge | x86\$164 | 
| r7i.24xlarge | x86\$164 | 
| r7i.48xlarge | x86\$164 | 
| r7i.metal-24xl | x86\$164 | 
| r7i.metal-48xl | x86\$164 | 
| r7iz.8xlarge | x86\$164 | 
| r7iz.12xlarge | x86\$164 | 
| r7iz.16xlarge | x86\$164 | 
| r7iz.32xlarge | x86\$164 | 
| r7iz.metal-16xl | x86\$164 | 
| r7iz.metal-32xl | x86\$164 | 
| r8a.16xlarge | x86\$164 | 
| r8a.24xlarge | x86\$164 | 
| r8a.48xlarge | x86\$164 | 
| r8a.metal-24xl | x86\$164 | 
| r8a.metal-48xl | x86\$164 | 
| r8g.12xlarge | arm64 | 
| r8g.16xlarge | arm64 | 
| r8g.24xlarge | arm64 | 
| r8g.48xlarge | arm64 | 
| r8g.metal-24xl | arm64 | 
| r8g.metal-48xl | arm64 | 
| r8gb.8xlarge | arm64 | 
| r8gb.12xlarge | arm64 | 
| r8gb.16xlarge | arm64 | 
| r8gb.24xlarge | arm64 | 
| r8gb.48xlarge | arm64 | 
| r8gb.metal-24xl | arm64 | 
| r8gb.metal-48xl | arm64 | 
| r8gd.12xlarge | arm64 | 
| r8gd.16xlarge | arm64 | 
| r8gd.24xlarge | arm64 | 
| r8gd.48xlarge | arm64 | 
| r8gd.metal-24xl | arm64 | 
| r8gd.metal-48xl | arm64 | 
| r8gn.8xlarge | arm64 | 
| r8gn.12xlarge | arm64 | 
| r8gn.16xlarge | arm64 | 
| r8gn.24xlarge | arm64 | 
| r8gn.48xlarge | arm64 | 
| r8gn.metal-24xl | arm64 | 
| r8gn.metal-48xl | arm64 | 
| r8i.24xlarge | x86\$164 | 
| r8i.32xlarge | x86\$164 | 
| r8i.48xlarge | x86\$164 | 
| r8i.96xlarge | x86\$164 | 
| r8i.metal-48xl | x86\$164 | 
| r8i.metal-96xl | x86\$164 | 
| r8id.24xlarge | x86\$164 | 
| r8id.32xlarge | x86\$164 | 
| r8id.48xlarge | x86\$164 | 
| r8id.96xlarge | x86\$164 | 
| r8id.metal-48xl | x86\$164 | 
| r8id.metal-96xl | x86\$164 | 
| u7i-6tb.112xlarge | x86\$164 | 
| u7i-8tb.112xlarge | x86\$164 | 
| u7i-12tb.224xlarge | x86\$164 | 
| u7in-16tb.224xlarge | x86\$164 | 
| u7in-24tb.224xlarge | x86\$164 | 
| u7in-32tb.224xlarge | x86\$164 | 
| u7inh-32tb.480xlarge | x86\$164 | 
| x2idn.16xlarge | x86\$164 | 
| x2idn.24xlarge | x86\$164 | 
| x2idn.32xlarge | x86\$164 | 
| x2idn.metal | x86\$164 | 
| x2iedn.8xlarge | x86\$164 | 
| x2iedn.16xlarge | x86\$164 | 
| x2iedn.24xlarge | x86\$164 | 
| x2iedn.32xlarge | x86\$164 | 
| x2iedn.metal | x86\$164 | 
| x8g.12xlarge | arm64 | 
| x8g.16xlarge | arm64 | 
| x8g.24xlarge | arm64 | 
| x8g.48xlarge | arm64 | 
| x8g.metal-24xl | arm64 | 
| x8g.metal-48xl | arm64 | 
| x8aedz.24xlarge | x86\$164 | 
| x8aedz.metal-24xl | x86\$164 | 
| x8i.24xlarge | x86\$164 | 
| x8i.32xlarge | x86\$164 | 
| x8i.48xlarge | x86\$164 | 
| x8i.64xlarge | x86\$164 | 
| x8i.96xlarge | x86\$164 | 
| x8i.metal-48xl | x86\$164 | 
| x8i.metal-96xl | x86\$164 | 

------
#### [ Accelerated computing ]


| 執行個體類型 | Architecture | 
| --- | --- | 
| g6.48xlarge | x86\$164 | 
| g6e.12xlarge | x86\$164 | 
| g6e.24xlarge | x86\$164 | 
| g6e.48xlarge | x86\$164 | 
| g7e.12xlarge | x86\$164 | 
| g7e.24xlarge | x86\$164 | 
| g7e.48xlarge | x86\$164 | 
| p5.4xlarge | x86\$164 | 
| p5.48xlarge | x86\$164 | 
| p5e.48xlarge | x86\$164 | 
| p5en.48xlarge | x86\$164 | 
| p6-b200.48xlarge | x86\$164 | 
| p6-b300.48xlarge | x86\$164 | 

------
#### [ Storage optimized ]


| 執行個體類型 | Architecture | 
| --- | --- | 
| i4g.4xlarge | arm64 | 
| i4g.8xlarge | arm64 | 
| i4g.16xlarge | arm64 | 
| i4i.8xlarge | x86\$164 | 
| i4i.12xlarge | x86\$164 | 
| i4i.16xlarge | x86\$164 | 
| i4i.24xlarge | x86\$164 | 
| i4i.32xlarge | x86\$164 | 
| i4i.metal | x86\$164 | 
| i7i.12xlarge | x86\$164 | 
| i7i.16xlarge | x86\$164 | 
| i7i.24xlarge | x86\$164 | 
| i7i.48xlarge | x86\$164 | 
| i7i.metal-24xl | x86\$164 | 
| i7i.metal-48xl | x86\$164 | 
| i7ie.12xlarge | x86\$164 | 
| i7ie.18xlarge | x86\$164 | 
| i7ie.24xlarge | x86\$164 | 
| i7ie.48xlarge | x86\$164 | 
| i7ie.metal-24xl | x86\$164 | 
| i7ie.metal-48xl | x86\$164 | 
| i8g.12xlarge | arm64 | 
| i8g.16xlarge | arm64 | 
| i8g.24xlarge | arm64 | 
| i8g.48xlarge | arm64 | 
| i8g.metal-24xl | arm64 | 
| i8g.metal-48xl | arm64 | 
| i8ge.12xlarge | arm64 | 
| i8ge.18xlarge | arm64 | 
| i8ge.24xlarge | arm64 | 
| i8ge.48xlarge | arm64 | 
| i8ge.metal-24xl | arm64 | 
| i8ge.metal-48xl | arm64 | 
| im4gn.4xlarge | arm64 | 
| im4gn.8xlarge | arm64 | 
| im4gn.16xlarge | arm64 | 

------

## 使用 Linux 執行個體的先決條件
<a name="ena-express-prereq-linux"></a>

若要確保 ENA Express 可以順利運作，請為您的執行個體更新下列設定。
+ 如果您的執行個體使用巨型訊框，則請執行下列命令，將最大傳輸單位 (MTU) 設定為 `8900`。

  ```
  [ec2-user ~]$ sudo ip link set dev eth0 mtu 8900
  ```
+ 增加接收器 (Rx) 環的大小，如下所示：

  ```
  [ec2-user ~]$ ethtool -G device rx 8192
  ```
+ 若要最大化 ENA Express 頻寬，請依照下列方式設定 TCP 佇列限制：

  1. 將 TCP 小型佇列限制設定為 1 MB 或更大值。這會讓在通訊端上排入佇列並等待傳輸的資料量增多。

     ```
     sudo sh -c 'echo 1048576 > /proc/sys/net/ipv4/tcp_limit_output_bytes'
     ```

  1. 如果 Linux 發行版本已啟用 eth 裝置上的位元組佇列限制，請將其停用。對裝置佇列來說，這也會讓排入佇列並等待傳輸的資料增多。

     ```
     sudo sh -c 'for txq in /sys/class/net/eth0/queues/tx-*; do echo max > ${txq}/byte_queue_limits/limit_min; done'
     ```
**注意**  
Amazon Linux 發行版本的 ENA 驅動程式預設會停用位元組佇列限制。
+ 若要將 ENA Express TCP 流量延遲降至最低，您可以停用 TCP 自動追蹤功能。這可能會導致封包額外負荷的最小增加：

  ```
  sudo bash -c 'echo 0 > /proc/sys/net/ipv4/tcp_autocorking'
  ```

## 調校 Linux 執行個體上 ENA Express 設定的效能
<a name="ena-express-tune"></a>

若要檢查您的 Linux 執行個體組態是否有最佳的 ENA Express 效能，您可以執行下列可在 Amazon GitHub 儲存庫上使用的指令碼：

[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)

指令碼會執行一系列測試，並提出建議及必要的組態變更。