0

I'm new to DPDK and running the Helloworld example given as part of the DPDK build.Here I'm able to successfully run and get the O/p expected. That is printing Hello World on different lcores.

./dpdk-helloworld -l 0-3 -n 4
EAL: Detected 112 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-2048kB
EAL: Probing VFIO support...
EAL: No legacy callbacks, legacy socket not created
hello from core 1
hello from core 2
hello from core 3
hello from core 0

But When I run htop, I can see only the first core being used, I was expecting four core will be utilized.

Is there something wrong in my understanding of how EAL works in DPDK?

Vipin Varghese
4,8782 gold badges11 silver badges26 bronze badges
asked Jul 5, 2021 at 7:15
2
  • did you try the option suggested in the answer? If it solves the problem accept or upvote to close the question. Commented Jul 6, 2021 at 12:23
  • can you please update your findings, it will help to understand if there are difference in understanding. If there are not please accept or upvote to close this question. Commented Jul 13, 2021 at 2:34

1 Answer 1

1

There can be couple of reasons which might lead to your observation, such as

  1. DPDK example hello world is a simple run to competition program model which launches lcore_hello in all worker threads and the main thread. There is no infinite loop of while or for to run on desired lcores.
  2. DPDK application is running inside VM with ISOL cpu set for single core.
  3. htop sampling time is not enough to show case all 4 cpu were utilized

Since limited information is shared about setup and environment, I have to assume cause of your error is 3. The solution for your requirement is In order to achieve 100% utilization across all threads edit lcore_hello to be an infinite loop, example code below

static int
lcore_hello(__rte_unused void *arg)
{
 unsigned lcore_id;
 lcore_id = rte_lcore_id();
 printf("hello from core %u\n", lcore_id);
 while(1);
 return 0;
}

Note: I highly recommend using perf record with the right sample rate to capture across all core events for specific application launches too.

answered Jul 6, 2021 at 2:12
Sign up to request clarification or add additional context in comments.

1 Comment

@karthikpoojary humbly requesting for your update, please accept and upvote to close the ticket.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.