Skip to contentSkip to conversation

batman cpu usage of multiple instances

DISCUSSION Moritz Warning 2 participants 3 messages Apr 17, 2020 – Apr 18, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

I have many batman-adv instances (~1000) running on one computer in a Linux network namespace each.

Top shows me that a single kernel worker is handling batman-adv:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
29251 root      20   0       0      0      0 R  99.3   0.0  18:03.27 kworker/u32:3+bat_events

Is there a way to let those multiple batman-adv instances make use of the other cores?

thanks,
Moritz

#1 lore raw
Quoted 5 lines · On Friday, 17 April 2020 03:23:23 CEST Moritz Warning wrote:

I have many batman-adv instances (~1000) running on one computer in a Linux network namespace each.

Top shows me that a single kernel worker is handling batman-adv:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
29251 root      20   0       0      0      0 R  99.3   0.0  18:03.27 kworker/u32:3+bat_events

This bat_events is mostly for sending the OGMs/ELPs/BCAST-retries. Usually not a bottleneck but your configuration is rather special and thus can be a limiting factor.

Quoted 1 line

Is there a way to let those multiple batman-adv instances make use of the other cores?

A quick way to change this is to go to batadv_init in net/batman-adv/main.c and change the create_singlethread_workqueue() call to create_workqueue().

Kind reagrds,
Sven

#2 lore raw
Quoted 11 lines · Sven Eckelmann
Quoted 5 lines · On Friday, 17 April 2020 03:23:23 CEST Moritz Warning wrote:

I have many batman-adv instances (~1000) running on one computer in a Linux network namespace each.

Top shows me that a single kernel worker is handling batman-adv:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
29251 root      20   0       0      0      0 R  99.3   0.0  18:03.27 kworker/u32:3+bat_events

This bat_events is mostly for sending the OGMs/ELPs/BCAST-retries. Usually not a bottleneck but your configuration is rather special and thus can be a limiting factor.

Quoted 8 lines
Quoted 1 line

Is there a way to let those multiple batman-adv instances make use of the other cores?

A quick way to change this is to go to batadv_init in net/batman-adv/main.c and change the create_singlethread_workqueue() call to create_workqueue().

Kind reagrds,
Sven

Thanks for the idea, but it turned out to make the situation slightly worse. While bat_events is only consuming very little CPU resources now, now the ksoftirqd/X instances take up 100% of each CPU thread.

The maximum of traffic is generated at 170 nodes producing 14KB/s traffic send per node, which is much more than expected. This is a grid of nodes, maybe a different topology will do better.

I am open for new ideas. :-)

Thanks,
Moritz