-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app/testpmd: add testpmd based sleeping
Sleep for an incremental amount of time if the fwd engine has processed less than at least half a burst of packets (i.e 16pkts with default setting) on a polling iteration of testpmd. Upon detecting the threshold of >= 16 pkts on an Rxq, reset the sleep time to zero (i.e. no sleep). Sleep time will be increased on each iteration where the low load conditions remain up to a total of the max sleep time which is set by the user with the "--max-sleep-us NUM" command line argument or when in interactive "mode set max_sleep NUM". The default max_sleep value is 0, which means that no sleeps will occur and the default behaviour is unchanged from previously. Testing has been performed on AMD EPYC 7702 server with --nb-cores 12. The results were obtained via turbostat for each individual lcore: max_sleep 0 ====== ======== ======== ======== idle 4Mpps 16Mpps Bursts =============== ====== ======== ======== ======== C1-state % 0 0 0 0 C2-state % 0 0 0 0 % usage 100 100 100 100 Watt / core 1.14 1.18 1.19 1.14 =============== ====== ======== ======== ======== max_sleep 500 ====== ======== ======== ======== idle 4Mpps 16Mpps Bursts =============== ====== ======== ======== ======== C1-state % 99 85 74 98.6 C2-state % 0 0 0 0 % usage 1 15 26 1 Watt / core 0.04 0.18 0.28 0 04 =============== ====== ======== ======== ======== max_sleep 1000 ====== ======== ======== ======== idle 4Mpps 16Mpps Bursts =============== ====== ======== ======== ======== C1-state % 0 85 74 0.3 C2-state % 99 0 0 97.6 % usage 1 15 25 1 Watt / core 0.02 0.18 0.28 0 02 =============== ====== ======== ======== ======== On most cases, the consumption of the cores is greatly improved while still performing zero packet loss. Latency test has been performed on each tests above. The CPU has a C1 latency of 1us and a C2 latency of 400us. On the worst case scenario, Tx Burst of thousands packets every seconds, the following latency in us (micro seconds) has been observed: =========== ==== ===== ====== max_sleep 0 500 1000 ----------- ---- ----- ------ max latency 14 560 1260 min latency 5 5 6 Avg latency 7 305 617 =========== ==== ===== ====== link: https://www.github.com/torvalds/linux/tree/master/tools/power/x86/turbostat Signed-off-by: Anthony Harivel <aharivel@redhat.com> Signed-off-by: 0-day Robot <robot@bytheb.org>
- Loading branch information
Showing
6 changed files
with
149 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters