Open sarosharif opened 1 year ago
In a sense, iperf tool is not compatible with Onload. iperf uses 2 separate threads for read and write. For Onload it means lock contention. The "better results" you mention are for memcached.
Latency is not expected to benefit from AF_XDP Onload at all. I.e. your results match my expectations.
Thank you for your response. Can you recommend some tool for throughput measurement instead of iperf, through which I would be able to see best results for onload af_xdp?
I can recommend something like memcached. Or may be nginx (caution: Onload nginx profile needs "clustering"; I saw some recent commits here in the master branch of Onload which add "clustering" support to AF_XDP but I did not try it).
AF_XDP Onload provides some benefit for an application which uses epoll to manage a lot of sockets.
Does anyone have any advice for tuning onload on ena for custom applications?
I tested out onload AF_XDP latency on AWS machine(m5zn.12xlarge). Initially I had some issues related to setting it up. After building and installing I registered device using this command:
echo ens5 |sudo tee /sys/module/sfc_resource/afxdp/register
But whenever I ran any application using onload, I encountered this error:Later on I was able to debug and fix this by running these two commands:
sudo ifconfig ens5 mtu 3000
sudo ethtool -L ens5 combined 1
Afterwards I measured the latency with and without onload afxdp using a simple ping pong application that also takes timestamp when the packet is returned. The measurements are taken on two machines in same placement group, over 100000 samples, twice and the application runs on UDP protocol. Here are the results:
Degraded latency is observed with onload af_xdp.
Additionally I also measured throughput using linux iperf tool on UDP. Throughput improved only marginally:
These results are contrary to my expectations and I have a few questions: