DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nirmal Sarkar <nirmal.kisan@gmail.com>
To: dev@dpdk.org
Subject: DPDK hugepage issue in docker containter
Date: Thu, 25 Apr 2024 15:44:09 +0530	[thread overview]
Message-ID: <CACeX4O8USHM3pNtVkpQgv2aQXq_B1QWT4FVucSShVUoHJQ232g@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

I am running DPDK application inside docker container bound to a Numa Node.
The command to bring up the docker container, I am using the command below:
docker run -itd \
    --privileged \
    --name ${DOCKER_NAME} \
    --rm \
    --network=${DOCKER_NETWORK} \
    --cpuset-cpus="${CPU_SET}" \
    -e TEST_INTERFACE="${INTERFACE}" \
    -e DPDK_FILE_PREFIX="${PREFIX}" \
    -e DPDK_HUGE_MEM="${HUGE_MEM}" \
    -v /sys/bus/pci/drivers:/sys/bus/pci/drivers \
    -v /sys/kernel/mm/hugepages:/sys/kernel/mm/hugepages \
    -v /sys/devices/system/node:/sys/devices/system/node \
    -v /dev/hugepages:/dev/hugepages \
    ${DOCKER_IMAGE}

Once the docker comes up, the application executes the following steps:
1. cleans up residual hugepage  # *./dpdk-hugepages.py -c*
2. unmounts hugepage filesystem # *./dpdk-hugepages.py -u*
3. sets up hugepage size, reserves hugepage and mounts hugepage filesystem
# *./dpdk-hugepages.py -p 1G -r <some-value>G -m*
4. does the DPDK EAL init.

During EAL init, I am getting an error: *EAL: Not enough memory available
on socket 1! Requested: <specified-value>, available: 0MB*

As per my understanding - inside the docker container *step-2* unmounts
/dev/hugepages and with *step-3* it is not properly mounted back to
/dev/hugepages though the command does not give any explicit error with
mount.
To test my understanding - I created a file in host /dev/hugepages and I
could see/access the file inside docker. When I executed *step-2* and
*step-3*, /dev/hugepages content is not visible from the docker
container. Hence
it looks to me *step-2* is not required at all.

Please correct me if I am wrong and also mention the correct steps to
unmount/mount hugepages inside docker.

Regards,
Nirmal Sarkar

[-- Attachment #2: Type: text/html, Size: 4937 bytes --]

                 reply	other threads:[~2024-04-26  7:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CACeX4O8USHM3pNtVkpQgv2aQXq_B1QWT4FVucSShVUoHJQ232g@mail.gmail.com \
    --to=nirmal.kisan@gmail.com \
    --cc=dev@dpdk.org \
    /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).