Skip to content

Conversation

@adel-belkhiri
Copy link
Contributor

This PR introduces 5 performance analyses for DPDK applications implemented using the ethdev library. These analyses provide insights into packet distribution, rate, throughput, and PMD thread busyness, thus helping monitor and optimize application performance.

New Features:

  1. Packet Rate Analysis:
    Computes the packet rate (in pps) for transmitted and received Ethernet traffic on a per-queue basis. It helps monitor the efficiency of traffic processing by calculating the number of packets received or transmitted in a given period.

  2. Packet Throughput Analysis:
    Analyzes packet throughput (in bps) for transmitted and received Ethernet traffic. This is done on a per-queue basis to evaluate bandwidth usage.

  3. Busyness Analysis for PMD Threads:
    Estimates how busy PMD threads are by comparing the times they successfully retrieve packets from the NIC queue versus when they are merely spinning without processing any packets. This can be used to evaluate the efficiency of polling operations.

  4. Packet Distribution Analysis:
    Analyzes the distribution of packets retrieved in a single rte_eth_rx_burst() call, on a per-thread and per-queue basis. This analysis provides insights into packet retrieval patterns, including how evenly or unevenly the workload is distributed across queues.

  5. Packet Distribution Statistics:
    Computes various statistics related to packet retrieval distribution, including the minimum, maximum, average, and standard deviation for packets retrieved in a single rte_eth_rx_burst() call, which offers more granular visibility into traffic distribution patterns.

Copy link
Contributor

@MatthewKhouzam MatthewKhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor changes.

*
* @author Adel Belkhiri
*/
@SuppressWarnings({ "nls" })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NonNullByDefault

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

try {
StateSystemBuilderUtils.incrementAttributeLong(ssb, ts, queueQuark, nbPkts);
} catch (StateValueTypeException e) {
Activator.getInstance().logWarning(getClass().getName() + ": problem accessing the state of a NIC queue (Quark =" + String.valueOf(queueQuark) + ")"); //$NON-NLS-1$ //$NON-NLS-2$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this... can you put it in the activator to have it everywhere?

@arfio arfio self-requested a review September 27, 2024 19:04
Copy link
Contributor

@arfio arfio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all the analyses look very interesting but there is a lot of duplicated that can easily be reused throughout. In particular the throughput and rate analysis that are very similar, it could be merged into one analysis with multiple views.

@adel-belkhiri adel-belkhiri force-pushed the dpdk-ethdev branch 2 times, most recently from 0b9fd6f to d2f9125 Compare October 16, 2024 15:54
Copy link
Contributor

@MatthewKhouzam MatthewKhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changes needed

Copy link
Contributor

@arfio arfio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of small comments, once they are fixed, I will be happy to approve !

@adel-belkhiri adel-belkhiri force-pushed the dpdk-ethdev branch 2 times, most recently from 451df36 to d21e82b Compare December 16, 2024 20:08
@arfio
Copy link
Contributor

arfio commented Jan 7, 2025

I just need a small trace to test the view and the remaining comments to be fixed.

@adel-belkhiri adel-belkhiri force-pushed the dpdk-ethdev branch 2 times, most recently from a36ba23 to 0b0f9b6 Compare January 23, 2025 16:54
Introduces packet throughput analysis for DPDK applications
using the ethdev library. The analysis calculates packet throughput in
both bits per second (bps) and packets per second (pps) for transmitted
and received Ethernet traffic on a per-queue basis.

Note that the calculation of throughput in bps requires the existence of
custom profiling events in the trace

Signed-off-by: Adel Belkhiri <[email protected]>
PMD threads continuously poll NIC queues, leading to constant 100% CPU usage.
This analysis provides a rough estimation of how busy PMD threads are with
actual work, by comparing the times they successfully retrieve packets from the
NIC queue versus the times they are merely spinning without processing any
packets.

Signed-off-by: Adel Belkhiri <[email protected]>
Introduce packet distribution analysis for PMD threads based on ethdev library.
This analysis computes the distribution of packets retrieved in a single
rte_eth_rx_burst() call, on a per-queue basis.

Signed-off-by: Adel Belkhiri <[email protected]>
Introduce packet distribution statistics analysis for PMD threads in the ethdev
library. This analysis calculates various statistics related to the
distribution of packets retrieved in a single rte_eth_rx_burst() call, on a
per-thread and per-queue basis. The computed statistics include the minimum,
maximum, average number of packets retrieved, as well as the standard deviation.

Signed-off-by: Adel Belkhiri <[email protected]>
@adel-belkhiri
Copy link
Contributor Author

I just need a small trace to test the view and the remaining comments to be fixed.

For anyone who wants to try the analyses, here is a link to download a test trace: https://drive.google.com/file/d/1w9hZUSRihlgyPEBdYDWMZZ10wlYpByUH/view?usp=sharing

@arfio arfio self-requested a review February 3, 2025 16:47
Copy link
Contributor

@arfio arfio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect for me! Thank you!
Matthew may still have some comments.

Copy link
Contributor

@MatthewKhouzam MatthewKhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My issues were addressed. Thank you for the great contribution!

@MatthewKhouzam MatthewKhouzam merged commit 8917c4c into eclipse-tracecompass-incubator:master Feb 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants