amzn / amzn-drivers

Official AWS drivers repository for Elastic Network Adapter (ENA) and Elastic Fabric Adapter (EFA)
446 stars 167 forks source link

Request for documentation / information #213

Closed gshanemiller closed 2 years ago

gshanemiller commented 2 years ago

Can Amazon provide the following to aid with DPDK development,

Elsewhere, for example during the EC2 launch screen for c5n.metal instances, the web pages says c5n.metal instances are capable of 100Gbp with EFA enabled:

This instance type supports the Elastic Fabric Adapter (EFA). EFAs support OS-bypass functionality, which enables High
Performance Computing (HPC) and Machine Learning (ML) applications to communicate directly with the network interface
hardware. EFAs provide lower latency and higher throughput than traditional TCP channels.

Was that performance achieved on this driver?

shaibran commented 2 years ago

Let us review your request and we'll get back to you shortly

shaibran commented 2 years ago

Regarding documentation:

Regarding threshold recommendation: We're not using any of the threshold registers in our PMD.

Regarding line speed: ENA is a virtual device, so there is no link. Thus the default link speed for the ENA is RTE_ETH_SPEED_NUM_NONE. The maximum performance is limited by the VF's capabilities and the instance type. As the driver is not aware on which instance type it is running, using appropriate limiters for the instance should be performed on the application side, as it can get access to more variety of tools to do that (e.g. it can read the instance meta data or pass the maximum BW as an argument).

Regarding performance results: You can find the sample results for the c5n.18xlarge. It was achieved by using the benchmarking tool based on the pktgen and the DTS.

gshanemiller commented 2 years ago

Thank you - all questions addressed.

gshanemiller commented 2 years ago

Reopening this item with one further request for clarification. As per

https://www.amazon.com/Data-Plane-Development-Kit-DPDK/dp/0367373955/ref=sr_1_1?keywords=data+plane+development+kit&qid=1648425589&s=books&sprefix=data+plane+devel%2Cstripbooks%2C85&sr=1-1

virtio devices (see chapter 12 pg 236) are partially or wholly interrupt driven (INTx/MSI-X).

And as per this link the number one performance constraint on the TX side is whether or not the TXQ's ring is full. As you can see code spends a lot of CPU time busy-spinning on rte_eth_tx_burst trying to flush packets out once the TXQ's ring is full.

which leads to this question:

shaibran commented 2 years ago

By default, the ENA PMD works fully in the in the polling mode. The cleanup is performed right after transmit (since v22.03 it's right before the transmit). Regarding As you can see code spends a lot of CPU time busy-spinning on rte_eth_tx_burst trying to flush packets out once the TXQ's ring is full --> That's because application is pushing the packets faster than the hardware can handle it

We support only Rx interrupt, however it is optional (disabled by default). This is application's power-saving feature, you can find an example for usage in the l3fwd-power application