FRITZ!Box 7530: Performance with Gigabit FTTP

We have had our Zen provided FTTP line updated to 900/100. This works well with the 7530 router using stock firmware with Ookla speed test results of 920/103 fairly normally.
I have installed Openwrt 22.03.3 as that is what I generally use for routers and although it works well it appears to max out at 522/105. That is with "Packet Steering", "Software flow offloading" and "Hardware flow offloading" enabled.
Although that is really fine, it would be nice to see the 900 :slight_smile:
I have VLAN's, 1 and 2 with 2 going to LAN1 and the PPPoe interface tied to that. It looks like the overall CPU usage is about 40% while the download is going on, but not sure how to see specific CPU core usages.

Are there any settings I can use that might tweak the speed up ?
I also note there is a PPPoe-WAN tunnel deice present. What is the purpose of that (I don't think I am using that) ?

I believe with the IPQ4019 some of the IP filtering can be handled in hardware, at least the NAT can (with "Hardware flow offloading" enabled ?). I also believe that PPPoe can have hardware assist, possibly using the same IP filtering hardware but I don't know if Openwrt is using this.

You are punching far beyond the weight limit of ipq40xx - and PPPoE makes this situation even worse.

2 Likes

Log into the router via ssh, then if htop is not installed already do opkg update ; opkg install htop' and then run htop`, which will show per CPU load data (you might want to configure the display option (F2-> setup : Detailed CPU time (System/IO-Wait/Hard-IRQ/Soft-IRQ/Steal/Guest)) to show detailed CPU usage, especially softinterrupts (SIRQ) are relevant):


    0[|||||||||                                                                                         6.8% N/A] Tasks: 65, 45 thr, 134 kthr; 1 running
    1[||||||||||||                                                                                      8.7% N/A] Load average: 0.13 0.18 0.18 
  Mem[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||           293M/1001M] Uptime: 3 days, 13:12:33
  Swp[                                                                                                     0K/0K] PSI some CPU:      nan%   nan%   nan% 
                                                                                                                  PSI full memory:   nan%   nan%   nan% 
  Network: rx: 71KiB/s tx: 75KiB/s (613/602 packets)                                                                0:  1.9% sy:  0.0% ni:  0.0% hi:  0.0% si:  4.9% st:  0.0% gu:  0.0% wa:  0.0% 
  Disk IO: 0.0% read: 0K write: 0K                                                                                  1:  3.9% sy:  1.9% ni:  0.0% hi:  0.0% si:  2.9% st:  0.0% gu:  0.0% wa:  0.0% 

  PID+USER       PRI  NI  VIRT   RES   SHR S  CPU% MEM%   TIME+  Command                                                                                                                                                            
    1 root        20   0  1500   904   652 S   0.0  0.1  0:03.34 /sbin/procd                                                                                                                                                        
 1057 ubus        20   0  1152   744   572 S   0.0  0.1  0:01.55 `- /sbin/ubusd
 1064 root        20   0   732   416   392 S   0.0  0.0  0:00.00 `- /sbin/askfirst /usr/libexec/login.sh
 1128 root        20   0  1636  1156   516 S   0.0  0.1  0:03.95 `- /usr/sbin/haveged -F -w 1024 -d 32 -i 32 -v 1
 2491 root        20   0  1232   588   548 S   0.0  0.1  0:01.01 `- watchdog -T 30 -t 5 /dev/watchdog
 2556 root        20   0  2112  1256   852 S   0.0  0.1  0:03.46 `- /sbin/rpcd -s /var/run/ubus/ubus.sock -t 30
 3047 root        20   0  5096  2348  2040 S   1.0  0.2  8:53.53 `- /usr/sbin/hostapd -s -g /var/run/hostapd/global

here is an example from my 2 core router and here from my fritzbox 7520 in Setup window showing the relevant option to check:


    0[                                                                   0.0%] Tasks: 34, 16 thr, 82 kthr; 1 running
    1[|||                                                                3.3%] Load average: 0.24 0.15 0.09 
    2[|||||                                                              5.4%] Uptime: 14:09:13
    3[|||                                                                3.4%]
  Mem[||||||||||||||||||||||||||||||||||||||||||||||||||||||||     99.5M/241M]
  Swp[                                                                  0K/0K]

  [Setup]
Categories       Display options                                                                                                                             
Display options  For current screen tab: Main
Header layout    [ ]    Tree view
Meters           [ ]    - Tree view is always sorted by PID (htop 2 behavior)
Screens          [ ]    - Tree view is collapsed by default
Colors           Global options:
                 [x]    Show tabs for screens
                 [ ]    Shadow other users' processes
                 [x]    Hide kernel threads
                 [ ]    Hide userland process threads
                 [ ]    Hide processes running in containers
                 [x]    Display threads in a different color
                 [ ]    Show custom thread names
                 [x]    Show program path
                 [ ]    Highlight program "basename"
                 [ ]    Highlight out-dated/removed programs (red) / libraries (yellow)                                                                      
                 [ ]    Shadow distribution path prefixes
                 [ ]    Merge exe, comm and cmdline in Command
                 [x]    - Try to find comm in cmdline (when Command is merged)
                 [x]    - Try to strip exe from cmdline (when Command is merged)
                 [x]    Highlight large numbers in memory counters
                 [x]    Leave a margin around header
                 [x]    Detailed CPU time (System/IO-Wait/Hard-IRQ/Soft-IRQ/Steal/Guest)
                 [ ]    Count CPUs from 1 instead of 0
                 [ ]    Update process names on every refresh
                 [ ]    Add guest time in CPU meter percentage
                 [x]    Also show CPU percentage numerically
                 [ ]    Also show CPU frequency
                 [ ]    Also show CPU temperature (requires libsensors)
                 [ ]    - Show temperature in degree Fahrenheit instead of Celsius
                 [x]    Enable the mouse
                 [1.5]  Update interval (in seconds)
                 [ ]    Highlight new and old processes
                 [5]    - Highlight time (in seconds)
                 [0]    Hide main function bar (0 - off, 1 - on ESC until next input, 2 - permanently)





F1      F2      F3      F4      F5      F6      F7      F8      F9      F10Done                                                                              

Please also post the output of:
a) cat /proc/softirqs
b) cat /proc/interrupts

root@OpenWrt_FB7520:~# cat /proc/interrupts 
           CPU0       CPU1       CPU2       CPU3       
 26:     230935    2449212     359172    1662074     GIC-0  20 Level     arch_timer
 30:          4          0          0          0     GIC-0 270 Level     bam_dma
 31:          0          0          0          0     GIC-0 239 Level     bam_dma
 32:          3          0          0          0     GIC-0 139 Level     msm_serial0
 34:     120442       2598         11       2475     GIC-0 133 Level     bam_dma
 51:         20          0          0          0     GIC-0 200 Level     ath10k_ahb
 68:     138766     141139     115426    1295808     GIC-0 201 Level     ath10k_ahb
 69:     590980     839689     868624     547125     GIC-0  97 Edge      c080000.ethernet:txq0
 73:         32        207        548        871     GIC-0 101 Edge      c080000.ethernet:txq4
 77:        499        737        757        861     GIC-0 105 Edge      c080000.ethernet:txq8
 81:         35        386        396       1309     GIC-0 109 Edge      c080000.ethernet:txq12
 85:     539558     545758     633483     202692     GIC-0 272 Edge      c080000.ethernet:rxq0
 87:       2895       2019       2680       1298     GIC-0 274 Edge      c080000.ethernet:rxq2
 89:         46        513        368        968     GIC-0 276 Edge      c080000.ethernet:rxq4
 91:        755        668       1082       1276     GIC-0 278 Edge      c080000.ethernet:rxq6
102:          0          0          0          0   PCI-MSI   0 Edge      aerdrv
103:          0          0          0          0   msmgpio  42 Edge      keys
104:          0          0          0          0   msmgpio  41 Edge      keys
105:          0          0          0          0   msmgpio  43 Edge      keys
106:          0          0          0          0     GIC-0 164 Level     xhci-hcd:usb1
107:          1          0          0          0   PCI-MSI 524288 Edge      PTM SL
108:    1453174          0          0          0   PCI-MSI 524289 Edge      mei_cpe
109:    2039059          0          0          0   PCI-MSI 524290 Edge      aca-txo
110:    2242738          0          0          0   PCI-MSI 524291 Edge      aca-rxo
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:       4946      13075      11221       5313  Rescheduling interrupts
IPI3:     299381    1437710    1449673    1692949  Function call interrupts
IPI4:          0          0          0          0  CPU stop interrupts
IPI5:     112041     361780     305668     963682  IRQ work interrupts
IPI6:          0          0          0          0  completion interrupts
Err:          0
root@OpenWrt_FB7520:~# cat /proc/softirqs 
                    CPU0       CPU1       CPU2       CPU3       
          HI:          0          0          0          0
       TIMER:     136558     174510     135661    1469234
      NET_TX:    2046703       2288       6658       2058
      NET_RX:    4589319     850336     733157    2327907
       BLOCK:          0          0          0          0
    IRQ_POLL:          0          0          0          0
     TASKLET:     119672       2676         83       2555
       SCHED:     251788     325670     275851    1562223
     HRTIMER:          0          0          0          0
         RCU:      78466      90910      90899      94188
root@OpenWrt_FB7520:~# 

The problem is that the ARM a7 cores in the 7530/7520 @~700MHz are really a bit under powered for a gigabit link. I bet the AVM firmware works-around that by using more offloads than openwrt.
Personally I would get a more powerful router for a gigabit link...

Thanks for the reply.
I do understand that the 7530 is a bit underpowered for the task, but I also know that it can achieve 900/100 with reasonably optimised software using the available hardware modules and it reasonable low energy at 4.5 Watts, which is important to me. Also 500 Mbits/s is more than enough for my needs (greater upstream would be nice though!). But any recommendations for a low energy router capable of 900/100 (no special requirements just PPPoe/NAT and a touch of static routing) ?

Thanks for the htop info I have played with this and can see that one CPU core is maxing out with the others at < 10% during the download. On a newly booted router I see /proc/softirqs and /proc/interrupts as below.

An interesting thing is I see kstoftirqd/0 taking 133% cpu. Sometimes I see the load being shared by kstoftirqd/0, kstoftirqd/1 and kstoftirqd/2 for a short time then it all goes to kstoftirqd/0. When I see the load being shared by separate softirq's for a short time I see a larger download speed (500 - 600). Maybe there is a slight softirq load sharing issue ?
Any idea what is the main task holding up the system doing this download, I have presumed the PPPoe and NAT is offloaded to hardware, but is that the case ?
I was wondering if an qos work was going on that I could disable etc.
As I said, not big deal on this just wondered if a tweak on something might improve things to get the flashy numbers :slight_smile:

cat /proc/softirqs
                    CPU0       CPU1       CPU2       CPU3       
          HI:          0          0          0          0
       TIMER:       1811       2527       1153       4586
      NET_TX:          0          0          1          2
      NET_RX:     247877      22604      21034      33325
       BLOCK:          0          0          0          0
    IRQ_POLL:          0          0          0          0
     TASKLET:      40966          0         14         14
       SCHED:       3379       4871       2965       5917
     HRTIMER:          0          0          0          0
         RCU:       2410       3123       2609       3724

root@router4:~# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3       
 26:       5221       6689       3839      66116     GIC-0  20 Level     arch_timer
 30:          3          0          0          0     GIC-0 270 Level     bam_dma
 31:          0          0          0          0     GIC-0 239 Level     bam_dma
 32:          2          0          0          0     GIC-0 139 Level     msm_serial0
 34:      41128          0          0          0     GIC-0 133 Level     bam_dma
 51:      11421          0          0          0     GIC-0 200 Level     ath10k_ahb
 68:      11405          0          0          0     GIC-0 201 Level     ath10k_ahb
 69:      53292          0          0          0     GIC-0  97 Edge      edma_eth_tx0
 70:          9          0          0          0     GIC-0  98 Edge      edma_eth_tx1
 71:          0          0          0          0     GIC-0  99 Edge      edma_eth_tx2
 72:          0          0          0          0     GIC-0 100 Edge      edma_eth_tx3
 73:      16879          0          0          0     GIC-0 101 Edge      edma_eth_tx4
 74:          6          0          0          0     GIC-0 102 Edge      edma_eth_tx5
 75:          0          0          0          0     GIC-0 103 Edge      edma_eth_tx6
 76:          0          0          0          0     GIC-0 104 Edge      edma_eth_tx7
 77:       8513          0          0          0     GIC-0 105 Edge      edma_eth_tx8
 78:          6          0          0          0     GIC-0 106 Edge      edma_eth_tx9
 79:          0          0          0          0     GIC-0 107 Edge      edma_eth_tx10
 80:          0          0          0          0     GIC-0 108 Edge      edma_eth_tx11
 81:      25880          0          0          0     GIC-0 109 Edge      edma_eth_tx12
 82:       1712          0          0          0     GIC-0 110 Edge      edma_eth_tx13
 83:          0          0          0          0     GIC-0 111 Edge      edma_eth_tx14
 84:          0          0          0          0     GIC-0 112 Edge      edma_eth_tx15
 85:      67949          0          0          0     GIC-0 272 Edge      edma_eth_rx0
 87:      25689          0          0          0     GIC-0 274 Edge      edma_eth_rx2
 89:      14977          0          0          0     GIC-0 276 Edge      edma_eth_rx4
 91:      16169          0          0          0     GIC-0 278 Edge      edma_eth_rx6
102:          0          0          0          0   PCI-MSI   0 Edge      aerdrv
103:          0          0          0          0   msmgpio  42 Edge      keys
104:          0          0          0          0   msmgpio  41 Edge      keys
105:          0          0          0          0   msmgpio  43 Edge      keys
106:          0          0          0          0     GIC-0 164 Level     xhci-hcd:usb1
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:        538        803        788        713  Rescheduling interrupts
IPI3:       2117      31907      29423      41125  Function call interrupts
IPI4:          0          0          0          0  CPU stop interrupts
IPI5:       1773       3548       2385       2916  IRQ work interrupts
IPI6:          0          0          0          0  completion interrupts
Err:          0

Aslo is there any way I can edit the Openwrt 7520 / 7530 hardware page to add the fact that the LAN port numbers are reversed in Openwrt to the labels on the router in 22.03.03. Took me a bit of time tracking down.

There is no guarantee that any hardware offload engine is ever supported by OpenWrt, the SoC vendors typically fail to put effort into getting support into the upstream Linux kernel, and often treat their offloads as "secrets". Some offload engines are supported by OpenWrt, but not all. Also almost all of these offloads do not offer the generality of the Linux network stack but only work under special conditions (although these often apply to normal home links, after all that is the main market the SoC makers target with their designs).

Interesting, AVM claims average ~6 Watt with the maximum being 18 Watt, so if your measurement come out at 4.5 that might imply that the (not used by you) DSL part take ~1.5Watt.

Have a look at the openwrt wiki page for irqbalance, that might help in spreading the interrupts around a bit. But generally /proc/interrupts is more interesting after some uptime.

According to the OpenWrt page for 7530/7520 VLANs 1/2 might be special and it is recommended to avoid these for one's own VLANs. I have simply followed that advice on my 7520, so this might or might not be a real issue (I do not intend to ever test this, VLAN 42 is fine :wink: and obvious the correct answer according to Douglas Adams).

Yes, I understand about hardware offload engines etc. I work on embedded systems a fair amount and have seen quite a few of the issues, especially available documentation.

Note the 4.5 Watts was idle and also measured with a cheap plug in monitor that is probably not that accurate at low watts! But the power usage was about the same as my older TL-WDR3600 routers.

On the VLAN 1, 2, I think, from a bit of reading, this would only apply to ipq40xx SOC's that have "two" Ethernet interfaces. I believe they actually only have one real one split into two virtual ones and the VLAN tags 1, 2 are hardcoded/used to signify which of these "interfaces" the packets came from or are going to from the switch end. As the 7530 only has once such Ethernet interface I don't think it applies, but I will change them just in case.

I will look at the irqbalance. The points I note are:

  1. The 7530 seems to manage 500 Mbits/s downstream using just one CPU core mainly.
  2. I see ksoftirqd/0 using around 130% of CPU usage. As far as I know the ksoftirqd/[0123] tasks should be locked to the 4 separate cores so I don't see how one can do 130%. Maybe the stats measurements are off or I've got that wrong.
  3. The ksoftirqd/[123] tasks are sometimes seen sharing some of the load for about a second or two and when they do the overall bit rate is higher (seen 600 Mbits/s over about 15 secs when this happens).

There may be some good reasons why the other CPU cores are not sharing the load (actually waiting on hardware not really CPU processing?), and the stats may be misleading, but from the above it seems like the 7530 with Openwrt could share the load across cores better and might approach the 900 Mbits/s then. It is obviously offloading some work to hardware to do as well as it does.

Ah, OK we have a thread for such measurements, so if you have the details, maybe add them here:

As I said, I just saw it in the OpenWrt wiki and thought I mention it even though I did not confirm it,, your explanation makes some sense, thanks.

Some things n networking are inherently single threaded (at least in Linux) so if multiple things like PPPoE en/de-capsulation and ethernet interrupt processing pile up on a single CPU that might limit you, and that is where irqbalance might actually help (or manually assigning some important IRQs to different CPUs) but that is not guaranteed. It tends to be a safer bet to use a router where the main CPUs are beefy enough to handle the load (and even x86 routers can be power frugal if mainly idling around). But that clearly is your decision to make.
(I run my 7520 as bridged modem under OpenWrt and am quite happy with that, and am contemplating of also using its WiFi to get better coverage, but so far did not do that yet.)

Hi. How did you get on with the 7530. I have done issues with the stock few hanging so wondering about trying openwrt before going to different hardware.

What throughput were you able to get? And was latency decent like on stock?

I’m also on pppoe . 500/70 currently