RPI5 + OpenWRT Using 3/4 Cores

Still working on tweaking and setting up my Pi5 creation for a compact and power ethernet router.

I have been looking for an answer to this question but I have not yet found the answer. OpenWRT appears to be showing only 3 of the 4 cores for the CPU. As you can see with IRQBalence it sees the 4 cores but when you go to the Overview page it only shows 3. Any help pointing me in the right direction would be appreciated.

root@OWRTRPI58GB:/etc# cat /proc/loadavg
0.04 0.06 0.01 1/133 12643
         CPU0       CPU1       CPU2       CPU3       
 13:   17647966    7049747   12562880    2093999     GICv2  26 Level     arch_timer
 14:     174855          0          0          0     GICv2  65 Level     107c013880.mailbox
 15:         15          0          0          0     GICv2 153 Level     uart-pl011
 32:     419046          0          0          0     GICv2 305 Level     mmc0
 33:      58897          0          0          0     GICv2 306 Level     mmc1
 34:          0          0          0          0     GICv2 251 Level     PCIe PME, aerdrv
 38:          0          0          0          0     GICv2 261 Level     PCIe PME, aerdrv
106:          0          0          0          0  rp1_irq_chip   6 Level     eth0
131:          0          0          0          0  rp1_irq_chip  31 Edge      xhci-hcd:usb1
136:          0          0          0          0  rp1_irq_chip  36 Edge      xhci-hcd:usb3
161:   14943904          0   14101202          0   MIP-MSI 1572864 Edge      eth1
162:   20587215   21096417          0          0   MIP-MSI 2097152 Edge      eth2
IPI0:      7637       8453       6873       7368       Rescheduling interrupts
IPI1:   2690667    1764253    8545188    9380796       Function call interrupts
IPI2:         0          0          0          0       CPU stop interrupts
IPI3:         0          0          0          0       CPU stop (for crash dump) interrupts
IPI4:         0          0          0          0       Timer broadcast interrupts
IPI5:    560989     689516     620590     565500       IRQ work interrupts
IPI6:         0          0          0          0       CPU wake-up interrupts
Err:          0

Bug in luci? What does nproc show?

apk update
apk add coreutils-nproc
CPU0       CPU1       CPU2       CPU3

I counted four, maybe i am losing things learned in kindergarten.

root@OWRTRPI58GB:~# nproc 
4

I'm not sure the intent of this comment. Yes, the interrupt list shows 4 cores but if you look at the distribution of interrupts they seem to be hanging hard on 0 with very little handed off to the other cores.

root@OWRTRPI58GB:/etc# cat /proc/loadavg
0.04 0.06 0.01 1/133 12643

I may be mistaken but does this command not show only 3 core load averages?

Loadavg is not per CPU, see e.g.:

"The first three columns measure CPU and IO utilization of the last one, five, and 10 minute periods. The fourth column shows the number of currently running processes and the total number of processes. The last column displays the last process ID used."

1 Like

Excellent!

So I'm mis-interpreting the values on the overview page. Thank you for helping me understand that. Is there anything I can do to balance the core utilization better? A file where I can tweak things like this?

When searching online it mentions OPKG but I dont use that since im on SNAPSHOT.

Specifically if you look at Eth 1 and Eth 2.

I would love to somehow force eth1 on Cores 0,1 and eth2 on Cores 2, 3. I feel like this is possible but I need to find more information on default distribution and how that is set or tweaked.

htop can be used to see per core load in real time.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.