DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mattias Rönnblom" <hofors@lysator.liu.se>
To: David Marchand <david.marchand@redhat.com>, dev@dpdk.org
Cc: thomas@monjalon.net,
	"Bruce Richardson" <bruce.richardson@intel.com>,
	"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>,
	"Stephen Hemminger" <stephen@networkplumber.org>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"Chengwen Feng" <fengchengwen@huawei.com>,
	"Konstantin Ananyev" <konstantin.ananyev@huawei.com>
Subject: Re: [PATCH] config: limit lcore variable maximum size to 4k
Date: Fri, 8 Nov 2024 23:02:55 +0100	[thread overview]
Message-ID: <04a51a5f-4a9a-4200-9c3b-9e1c8b4d345c@lysator.liu.se> (raw)
In-Reply-To: <20241108181732.173263-1-david.marchand@redhat.com>

On 2024-11-08 19:17, David Marchand wrote:
> OVS locks all pages to avoid page faults while processing packets.
> 1M for each lcore translates to allocating 128M with default build
> options on x86.
> This resulted in OOM while running unit tests in parallel.
> 

Could you give some more context. If you get OOM if you add 128 MB of 
RSS, how much memory have you budgeted for the app in total? What are 
the packet mempool sizes, for example?

If you are running tests in parallel it likely means these aren't 
characteristics tests, and thus you can disable the mlockall() call and 
fit many more copies under the OOM ceiling.

Another alternative might be to unlock the lcore variables area, or make 
the whole BSS MLOCK_ONFAULT.

> At the moment, the more demanding DPDK user of lcore variable is
> rte_service, with a 2112 bytes object.
> 

<rte_lcore_var.h> is a public API, so the largest object may well be 
much larger than that.

That said, maybe 1 MB is too large.

> Limit the lcore variable maximum size to 4k which looks more reasonable.
> 

NAK

128 kB?

> Fixes: 5bce9bed67ad ("eal: add static per-lcore memory allocation facility")
> 

I've mentioned this property of lcore variables a couple of times on the 
list, so it should come as no surprise to anyone.

> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>   config/rte_config.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/config/rte_config.h b/config/rte_config.h
> index 498d509244..5f0627679f 100644
> --- a/config/rte_config.h
> +++ b/config/rte_config.h
> @@ -41,7 +41,7 @@
>   /* EAL defines */
>   #define RTE_CACHE_GUARD_LINES 1
>   #define RTE_MAX_HEAPS 32
> -#define RTE_MAX_LCORE_VAR 1048576
> +#define RTE_MAX_LCORE_VAR 4096
>   #define RTE_MAX_MEMSEG_LISTS 128
>   #define RTE_MAX_MEMSEG_PER_LIST 8192
>   #define RTE_MAX_MEM_MB_PER_LIST 32768


      parent reply	other threads:[~2024-11-08 22:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 18:17 David Marchand
2024-11-08 18:35 ` Morten Brørup
2024-11-08 19:53   ` Morten Brørup
2024-11-08 22:13     ` Thomas Monjalon
2024-11-08 22:34       ` Mattias Rönnblom
2024-11-08 23:11         ` Thomas Monjalon
2024-11-11  6:31           ` Mattias Rönnblom
2024-11-08 22:49       ` Morten Brørup
2024-11-08 22:23     ` Mattias Rönnblom
2024-11-08 23:52       ` Morten Brørup
2024-11-11  7:22         ` Mattias Rönnblom
2024-11-11 16:54           ` Stephen Hemminger
2024-11-08 22:02 ` Mattias Rönnblom [this message]

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=04a51a5f-4a9a-4200-9c3b-9e1c8b4d345c@lysator.liu.se \
    --to=hofors@lysator.liu.se \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=konstantin.ananyev@huawei.com \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=mb@smartsharesystems.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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;
as well as URLs for NNTP newsgroup(s).