How to set up static core affinity?

465 views
Skip to first unread message

charl...@gmail.com

unread,
Jul 3, 2018, 11:07:43 AM7/3/18
to TRex Traffic Generator
When I start ./t-rex-64, I can specify how many cores/threads to use for each interface by -c <num>.

Is there a way to manually set core affinity for each interface?

hanoh haim

unread,
Jul 3, 2018, 12:01:48 PM7/3/18
to charl...@gmail.com, TRex Traffic Generator
Hi,
You should use the ./dpdk_setup_port to generate the best configuration file.
You can tune the file manually after that but it is not recommended.
Have a look inthe manual how to use it.
Thanks,
Hanoh

On Tue, 3 Jul 2018 at 18:07 <charl...@gmail.com> wrote:
When I start ./t-rex-64, I can specify how many cores/threads to use for each interface by -c <num>.

Is there a way to manually set core affinity for each interface?

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/e2fdf762-4e69-4417-a487-b97ee279c61a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Hanoh
Sent from my iPhone

Matt Callaghan

unread,
Jul 6, 2018, 11:06:21 AM7/6/18
to TRex Traffic Generator
It looks like specifically Hanoh is referring to: https://trex-tgn.cisco.com/trex/doc/trex_manual.html#_command_line_mode

It's a bit tricky to find because there no typical keywords like "affinity", "pinning", "isolation", etc.

So I'd say that
  • `--ci` = affinity/pinning (include)
  • `--ce` = isolation (exclude)
@Hanoh, is this a correct summary?

Does this also mean that we cannot utilize DUAL SOCKET systems efficiently when using the command line?

Instead you'd have to define the socketX + threads(on that NUMA) in the platform node of the yaml config

charl...@gmail.com

unread,
Jul 9, 2018, 1:26:57 PM7/9/18
to TRex Traffic Generator
Hi Matt,

By manually adding a "platform:" section like

platform:
master_thread_id: 0
latency_thread_id: 24
dual_if:
- socket: 0
threads: [1,2,3,4,5,6,7]
- socket: 3
threads: [25,26,27,28,29,30,31]

it works as expected.

Thanks,
Charlie

Reply all
Reply to author
Forward
0 new messages