numam-dpdk/devtools
David Marchand 9e6b36c34c app/testpmd: reduce memory consumption
Following [1], testpmd memory consumption has skyrocketted.
The rte_port structure has gotten quite fat.

struct rte_port {
[...]
  struct rte_eth_rxconf rx_conf[65536];            /* 266280 3145728 */
  /* --- cacheline 53312 boundary (3411968 bytes) was 40 bytes ago --- */
  struct rte_eth_txconf tx_conf[65536];            /* 3412008 3670016 */
  /* --- cacheline 110656 boundary (7081984 bytes) was 40 bytes ago --- */
[...]
  /* size: 8654936, cachelines: 135234, members: 31 */
[...]

testpmd handles RTE_MAX_ETHPORTS ports (32 by default) which means that it
needs ~256MB just for this internal representation.

The reason is that a testpmd rte_port (the name is quite confusing, as
it is a local type) maintains configurations for all queues of a port.
But where you would expect testpmd to use RTE_MAX_QUEUES_PER_PORT as the
maximum queue count, the rte_port uses MAX_QUEUE_ID set to 64k.

Prefer the ethdev maximum value.

After this patch:
struct rte_port {
[...]
  struct rte_eth_rxconf      rx_conf[1025];        /*  8240 49200 */
  /* --- cacheline 897 boundary (57408 bytes) was 32 bytes ago --- */
  struct rte_eth_txconf      tx_conf[1025];        /* 57440 57400 */
  /* --- cacheline 1794 boundary (114816 bytes) was 24 bytes ago --- */
[...]
  /* size: 139488, cachelines: 2180, members: 31 */
[...]

With this, we can ask for less memory in test-null.sh.

[1]: https://git.dpdk.org/dpdk/commit/?id=436b3a6b6e62

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-26 18:05:15 +01:00
..
cocci devtools/cocci: create safer version of strlcpy script 2019-04-04 22:45:33 +02:00
build-tags.sh devtools: fix building kernel component tags 2019-07-31 00:22:33 +02:00
check-dup-includes.sh devtools: support FreeBSD 2019-07-31 00:22:33 +02:00
check-forbidden-tokens.awk devtools: add explicit warnings for forbidden tokens 2018-11-04 21:54:04 +01:00
check-git-log.sh devtools: add git log checks for TPID, LACP and RETA 2019-04-16 00:21:16 +02:00
check-includes.sh eal: remove exec-env directory 2019-04-02 21:49:35 +02:00
check-maintainers.sh use SPDX tag for 6WIND copyrighted files 2018-05-25 10:47:06 +02:00
check-symbol-change.sh devtools: fix check of symbol added as stable API 2019-05-10 00:19:31 +02:00
check-symbol-maps.sh devtools: check orphan symbols in map files 2018-05-29 17:43:33 +02:00
checkpatches.sh devtools: fix cleanup of checkpatch temporary file 2019-10-21 16:19:00 +02:00
cocci.sh devtools: use a common prefix for temporary files 2018-10-01 23:51:45 +02:00
get-maintainer.sh devtools: support FreeBSD 2019-07-31 00:22:33 +02:00
git-log-fixes.sh use SPDX tag for 6WIND copyrighted files 2018-05-25 10:47:06 +02:00
load-devel-config devtools: support FreeBSD 2019-07-31 00:22:33 +02:00
test-build.sh devtools: test nfb and AF_XDP build with make 2019-09-15 20:50:58 +02:00
test-meson-builds.sh devtools: reduce list of Arm builds tested with meson 2019-11-21 00:23:58 +01:00
test-null.sh app/testpmd: reduce memory consumption 2019-11-26 18:05:15 +01:00
validate-abi.sh devtools: support FreeBSD 2019-07-31 00:22:33 +02:00