DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: "Stephen Hemminger" <stephen@networkplumber.org>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	"Morten Brørup" <mb@smartsharesystems.com>
Subject: [PATCH 5/7] app/test/mempool_perf: scale down for high core counts
Date: Fri, 29 May 2026 10:10:58 -0700	[thread overview]
Message-ID: <20260529171417.526892-6-stephen@networkplumber.org> (raw)
In-Reply-To: <20260529171417.526892-1-stephen@networkplumber.org>

On a 32-core system the test matrix runs the cartesian product of
4 mempools, 3 core-count configurations and ~340 (n_keep, bulk)
points at TIME_S=1 second each: about 67 minutes total, well past
the 10 minute perf-test timeout.

Two reductions, no loss of meaningful signal:

1. Per-point duration: 1 second -> 200 ms.  Each point currently
   collects 10^5-10^6 mempool ops; 200 ms still yields >10^4
   samples, well above the noise floor for a cycles-per-op average.

2. Matrix trim: drop adjacent bulk and n_keep points that don't
   produce regime changes.  Retained set covers the boundaries
   that matter: 1, 4, cache-line burst (8), typical packet burst
   (32) and cache size (RTE_MEMPOOL_CACHE_MAX_SIZE = 512) for bulk;
   32 (fits in cache), 512 (= cache size) and 32768 (far exceeds
   cache) for n_keep.

Combined effect: ~10x runtime reduction.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test/test_mempool_perf.c | 32 ++++++++++++--------------------
 1 file changed, 12 insertions(+), 20 deletions(-)

diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index dd2f0bbaca..6801812a8d 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -61,26 +61,21 @@
  *
  *    - Pseudorandom max bulk size (*n_max_bulk*)
  *
- *      - Max bulk from CACHE_LINE_BURST to 256, and RTE_MEMPOOL_CACHE_MAX_SIZE,
- *        where CACHE_LINE_BURST is the number of pointers fitting into one CPU cache line.
+ *      - Max bulk: CACHE_LINE_BURST, 32, RTE_MEMPOOL_CACHE_MAX_SIZE,
+ *        where CACHE_LINE_BURST is the number of pointers fitting into
+ *        one CPU cache line.
  *
  *    - Fixed bulk size (*n_get_bulk*, *n_put_bulk*)
  *
- *      - Bulk get from 1 to 256, and RTE_MEMPOOL_CACHE_MAX_SIZE
- *      - Bulk put from 1 to 256, and RTE_MEMPOOL_CACHE_MAX_SIZE
- *      - Bulk get and put from 1 to 256, and RTE_MEMPOOL_CACHE_MAX_SIZE, compile time constant
+ *      - Bulk get: 1, 4, CACHE_LINE_BURST, 32, RTE_MEMPOOL_CACHE_MAX_SIZE
+ *      - Bulk put: 1, 4, CACHE_LINE_BURST, 32, RTE_MEMPOOL_CACHE_MAX_SIZE
  *
  *    - Number of kept objects (*n_keep*)
  *
- *      - 32
- *      - 128
- *      - 512
- *      - 2048
- *      - 8192
- *      - 32768
+ *      - 32, 512, 32768
  */
 
-#define TIME_S 1
+#define TIME_MS 200
 #define MEMPOOL_ELT_SIZE 2048
 #define MAX_KEEP 32768
 #define N (128 * MAX_KEEP)
@@ -257,7 +252,7 @@ per_lcore_mempool_test(void *arg)
 
 	start_cycles = rte_get_timer_cycles();
 
-	while (time_diff/hz < TIME_S) {
+	while (time_diff < hz * TIME_MS / 1000) {
 		if (n_max_bulk != 0)
 			ret = test_loop_random(mp, cache, n_keep, n_max_bulk);
 		else if (!use_constant_values)
@@ -376,13 +371,10 @@ launch_cores(struct rte_mempool *mp, unsigned int cores)
 static int
 do_one_mempool_test(struct rte_mempool *mp, unsigned int cores, int external_cache)
 {
-	unsigned int bulk_tab_max[] = { CACHE_LINE_BURST, 32, 64, 128, 256,
-			RTE_MEMPOOL_CACHE_MAX_SIZE, 0 };
-	unsigned int bulk_tab_get[] = { 1, 4, CACHE_LINE_BURST, 32, 64, 128, 256,
-			RTE_MEMPOOL_CACHE_MAX_SIZE, 0 };
-	unsigned int bulk_tab_put[] = { 1, 4, CACHE_LINE_BURST, 32, 64, 128, 256,
-			RTE_MEMPOOL_CACHE_MAX_SIZE, 0 };
-	unsigned int keep_tab[] = { 32, 128, 512, 2048, 8192, 32768, 0 };
+	unsigned int bulk_tab_max[] = { CACHE_LINE_BURST, 32, RTE_MEMPOOL_CACHE_MAX_SIZE, 0 };
+	unsigned int bulk_tab_get[] = { 1, 4, CACHE_LINE_BURST, 32, RTE_MEMPOOL_CACHE_MAX_SIZE, 0 };
+	unsigned int bulk_tab_put[] = { 1, 4, CACHE_LINE_BURST, 32, RTE_MEMPOOL_CACHE_MAX_SIZE, 0 };
+	unsigned int keep_tab[] = { 32, 512, 32768, 0 };
 	unsigned int *max_bulk_ptr;
 	unsigned int *get_bulk_ptr;
 	unsigned int *put_bulk_ptr;
-- 
2.53.0


  parent reply	other threads:[~2026-05-29 17:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 17:10 [PATCH 0/7] app/test: make perf tests usable on wider range of systems Stephen Hemminger
2026-05-29 17:10 ` [PATCH 1/7] app/test/reciprocal_division: make it a fast test Stephen Hemminger
2026-05-29 17:10 ` [PATCH 2/7] app/test/reciprocal_division_perf: reduce test time Stephen Hemminger
2026-05-29 17:10 ` [PATCH 3/7] app/test/mempool_perf: size mempool by tested cores Stephen Hemminger
2026-06-01  8:12   ` Andrew Rybchenko
2026-06-01 12:22     ` Morten Brørup
2026-05-29 17:10 ` [PATCH 4/7] app/test/mempool_perf: drop constant-values replay Stephen Hemminger
2026-06-01  8:34   ` Andrew Rybchenko
2026-06-01 13:22     ` Morten Brørup
2026-05-29 17:10 ` Stephen Hemminger [this message]
2026-06-01  8:42   ` [PATCH 5/7] app/test/mempool_perf: scale down for high core counts Andrew Rybchenko
2026-06-01 12:58   ` Morten Brørup
2026-05-29 17:10 ` [PATCH 6/7] app/test/test_rcu_qsbr_perf: call quiescent more often Stephen Hemminger
2026-05-29 17:11 ` [PATCH 7/7] app/test/test_pmd_perf: skip if no device available Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260529171417.526892-6-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox