Thanks Ilya, I can confirm this solves my problem.

Regards
Tobias

From: Ilya Maximets <i.maxim...@ovn.org>
Date: Wednesday, 15. February 2023 at 14:56
To: Tobias Hofmann (tohofman) <tohof...@cisco.com>, ovs-discuss@openvswitch.org 
<ovs-discuss@openvswitch.org>
Cc: i.maxim...@ovn.org <i.maxim...@ovn.org>
Subject: Re: [ovs-discuss] OvS DPDK takes too many hugepages
On 2/15/23 22:46, Tobias Hofmann (tohofman) via discuss wrote:
> Hello everyone,
>
>
>
> I’m enabling DPDK on a system and I don’t see any errors while doing so. 
> However, after enabling DPDK, I can see that my system has way less free 
> hugepages than expected. It should only be using 512 at that point but it’s 
> using 1914. OvS is the only potential candidate that can be consuming 
> hugepages at that time. I  tried to verify that it is indeed OvS that is 
> allocating these hugepages by checking each process under 
> /proc/<proc-id>/smaps but surprisingly I did not find any process having 
> hugepages under its process ID. I wonder if there is something failing 
> internally in OvS that is messing up the hugepage allocation.
>
> Here are a few details of the system I’m using:
>
> OvS version: 2.17.3
> DPDK version: 21.11.0
> Kernel version: 4.18.0-372.9.1.el8.x86_64
>
> HugePages_Total:    5120
> HugePages_Free:     3206
> HugePages_Rsvd:        0
> HugePages_Surp:        0
> Hugepagesize:       2048 kB
> Hugetlb:        10485760 kB
>
> I noticed that the OvS and DPDK versions are not precisely matching with the 
> official support listed here: 
> https://docs.openvswitch.org/en/latest/faq/releases/ 
> <https://docs.openvswitch.org/en/latest/faq/releases/>
>
> Could that be a reason for this behavior?
>
> I’ve attached the log files of the ovs-vswitchd.log of the time where DPDK 
> gets enabled to this email.

Hi, Tobias.

According to the log, you have DPDK initialized with the following
configuration:

  EAL ARGS: ovs-vswitchd --iova-mode=va --socket-mem 1024 --in-memory -l 0.

You have socket-mem set to 1024, that means that DPDK will *pre-allocate* 1024MB
on start up.  But you don't have socket-limit option, so the actual memory
consumption is unlimited.  Hence, OVS can allocate as much memory as it wants.

OVS stopped configuring socket-limit equal to socket-mem starting from
release 2.17.  You need to explicitly set the other_config:dpdk-socket-limit
option in order to limit the amount of memory OVS is allowed to allocate.

Here is what release notes in the NEWS file are saying abut 2.17:

     * EAL argument --socket-limit no longer takes on the value of --socket-mem
       by default.  'other_config:dpdk-socket-limit' can be set equal to
       the 'other_config:dpdk-socket-mem' to preserve the legacy memory
       limiting behavior.

Best regards, Ilya Maximets.
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to