Overclocking Router Devices

you can also find more 800-1100MHz profiles on fork https://github.com/psyborg55/u-boot_mod/commits/master

added several profiles for SPI too, all tested on QCA9531

@juppin is there a reason you don't specify range shift mask in cpu pll regs? i see some profiles have it masked some don't

Then new uboots are lzma compressed, there is no way to change it by a register value modification anymore

I managed to overclock Archer C7v4.
Currently all uboots are lzma compressed so the approach to modify a single register value no longer works.
You have to download the GPL Sources to recompile uboot with the modified values.
New TP-Link comes with double u-boot, modify the values and flash both uboot-factory and uboot then it will work.

[    0.000000] Memory: 124772K/131072K available (3602K kernel code, 173K rwdata, 464K rodata, 296K init, 196K bss, 6300K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] Clocks: CPU:1000.000MHz, DDR:650.000MHz, AHB:333.333MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 3822520893 ns
[    0.000005] sched_clock: 32 bits at 500MHz, resolution 2ns, wraps every 4294967295ns
[    0.008202] Calibrating delay loop... 497.66 BogoMIPS (lpj=995328)
[    0.046726] pid_max: default: 32768 minimum: 301
1 Like

My device will occasionally get stuck at the position of "MIPS: machine is gl.inet gl-ar150" and will not continue to start

Booting image at: 0x9F050000

   Image name:   MIPS OpenWrt Linux-4.9.120
   Created:      2018-08-16   7:51:15 UTC
   Image type:   MIPS Linux Kernel Image (lzma compressed)
   Data size:    1475733 Bytes = 1.4 MB
   Load address: 0x80060000
   Entry point:  0x80060000

Uncompressing kernel image... OK!
Starting kernel...

[    0.000000] Linux version 4.9.120 (luo@luo-B250M-D3H) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7141-e4d0ee5af5) ) #0 Thu Aug 16 07:51:15 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=GL-AR150 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro console=ttyATH0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 59636K/65536K available (3372K kernel code, 175K rwdata, 840K rodata, 276K init, 219K bss, 5900K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007584] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.088757] pid_max: default: 32768 minimum: 301
[    0.093349] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.099513] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110373] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.118416] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.126160] NET: Registered protocol family 16
[    0.131187] MIPS: machine is GL.iNet GL-AR150

Normally, its next log should be the switch clock source

clocksource: Switched to clocksource MIPS

Does anyone have a similar problem?

Thanks

build suceeded is @pepe2k 's u-boot_mod on Archer C7 v1: LAN/WAN, web recovery, both USB ports, serial console, wifi 2.4, reset button - all works. there are minor issues with rfkill switch detection and LED MUXes that i hope to solve soon.
tried setting some lower clocks, device starts at 600/600/200 and even 400/200/200 (but as a some sort of fallback result clock) few other presets tried resulted in inverted CPU/DDR clocks, when this is sorted out will try with clocks beyond 1GHz.

at the same time QCA9531 just passed 100days of uptime at 1000/600/200 with ALFA Ar9271 card in STA mode reaching same uptime

so, the max at which QCA9558 in C7 will start was 1200MHz, but at this rate there were frequent crashes, lowered to 1160MHz and measured some NAT throughput.(no clock drift observed) here are the results:

720/600/200 profile

~$ iperf -c 10.42.43.1 -i 1 -t 20
------------------------------------------------------------
Client connecting to 10.42.43.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.221 port 44650 connected with 10.42.43.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  44.1 MBytes   370 Mbits/sec
[  3]  1.0- 2.0 sec  43.1 MBytes   362 Mbits/sec
[  3]  2.0- 3.0 sec  43.9 MBytes   368 Mbits/sec
[  3]  3.0- 4.0 sec  42.9 MBytes   360 Mbits/sec
[  3]  4.0- 5.0 sec  44.1 MBytes   370 Mbits/sec
[  3]  5.0- 6.0 sec  45.6 MBytes   383 Mbits/sec
[  3]  6.0- 7.0 sec  45.8 MBytes   384 Mbits/sec
[  3]  7.0- 8.0 sec  45.5 MBytes   382 Mbits/sec
[  3]  8.0- 9.0 sec  47.4 MBytes   397 Mbits/sec
[  3]  9.0-10.0 sec  44.8 MBytes   375 Mbits/sec
[  3] 10.0-11.0 sec  46.5 MBytes   390 Mbits/sec
[  3] 11.0-12.0 sec  45.0 MBytes   377 Mbits/sec
[  3] 12.0-13.0 sec  46.6 MBytes   391 Mbits/sec
[  3] 13.0-14.0 sec  45.8 MBytes   384 Mbits/sec
[  3] 14.0-15.0 sec  45.8 MBytes   384 Mbits/sec
[  3] 15.0-16.0 sec  45.6 MBytes   383 Mbits/sec
[  3] 16.0-17.0 sec  44.8 MBytes   375 Mbits/sec
[  3] 17.0-18.0 sec  44.9 MBytes   376 Mbits/sec
[  3] 18.0-19.0 sec  46.0 MBytes   386 Mbits/sec
[  3] 19.0-20.0 sec  45.5 MBytes   382 Mbits/sec
[  3]  0.0-20.0 sec   904 MBytes   379 Mbits/sec
ubuntu@ubuntu:~$ iperf -c 10.42.0.1 -i 1 -t 20
------------------------------------------------------------
Client connecting to 10.42.0.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.205 port 33206 connected with 10.42.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  55.2 MBytes   463 Mbits/sec
[  3]  1.0- 2.0 sec  53.9 MBytes   452 Mbits/sec
[  3]  2.0- 3.0 sec  54.0 MBytes   453 Mbits/sec
[  3]  3.0- 4.0 sec  53.9 MBytes   452 Mbits/sec
[  3]  4.0- 5.0 sec  53.8 MBytes   451 Mbits/sec
[  3]  5.0- 6.0 sec  53.6 MBytes   450 Mbits/sec
[  3]  6.0- 7.0 sec  52.8 MBytes   442 Mbits/sec
[  3]  7.0- 8.0 sec  55.0 MBytes   461 Mbits/sec
[  3]  8.0- 9.0 sec  52.6 MBytes   441 Mbits/sec
[  3]  9.0-10.0 sec  54.9 MBytes   460 Mbits/sec
[  3] 10.0-11.0 sec  53.0 MBytes   445 Mbits/sec
[  3] 11.0-12.0 sec  54.4 MBytes   456 Mbits/sec
[  3] 12.0-13.0 sec  53.1 MBytes   446 Mbits/sec
[  3] 13.0-14.0 sec  53.8 MBytes   451 Mbits/sec
[  3] 14.0-15.0 sec  52.9 MBytes   444 Mbits/sec
[  3] 15.0-16.0 sec  54.0 MBytes   453 Mbits/sec
[  3] 16.0-17.0 sec  52.9 MBytes   444 Mbits/sec
[  3] 17.0-18.0 sec  54.0 MBytes   453 Mbits/sec
[  3] 18.0-19.0 sec  53.1 MBytes   446 Mbits/sec
[  3] 19.0-20.0 sec  53.9 MBytes   452 Mbits/sec
[  3]  0.0-20.0 sec  1.05 GBytes   450 Mbits/sec

1160/600/200 profile

~$ iperf -c 10.42.43.1 -i 1 -t 20
------------------------------------------------------------
Client connecting to 10.42.43.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.221 port 44652 connected with 10.42.43.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  73.8 MBytes   619 Mbits/sec
[  3]  1.0- 2.0 sec  74.0 MBytes   621 Mbits/sec
[  3]  2.0- 3.0 sec  72.9 MBytes   611 Mbits/sec
[  3]  3.0- 4.0 sec  73.9 MBytes   620 Mbits/sec
[  3]  4.0- 5.0 sec  73.1 MBytes   613 Mbits/sec
[  3]  5.0- 6.0 sec  74.0 MBytes   621 Mbits/sec
[  3]  6.0- 7.0 sec  73.0 MBytes   612 Mbits/sec
[  3]  7.0- 8.0 sec  74.0 MBytes   621 Mbits/sec
[  3]  8.0- 9.0 sec  72.9 MBytes   611 Mbits/sec
[  3]  9.0-10.0 sec  74.1 MBytes   622 Mbits/sec
[  3] 10.0-11.0 sec  73.0 MBytes   612 Mbits/sec
[  3] 11.0-12.0 sec  74.1 MBytes   622 Mbits/sec
[  3] 12.0-13.0 sec  72.9 MBytes   611 Mbits/sec
[  3] 13.0-14.0 sec  74.4 MBytes   624 Mbits/sec
[  3] 14.0-15.0 sec  72.9 MBytes   611 Mbits/sec
[  3] 15.0-16.0 sec  74.0 MBytes   621 Mbits/sec
[  3] 16.0-17.0 sec  74.1 MBytes   622 Mbits/sec
[  3] 17.0-18.0 sec  72.9 MBytes   611 Mbits/sec
[  3] 18.0-19.0 sec  74.6 MBytes   626 Mbits/sec
[  3]  0.0-20.0 sec  1.44 GBytes   617 Mbits/sec
ubuntu@ubuntu:~$ iperf -c 10.42.0.1 -i 1 -t 20
------------------------------------------------------------
Client connecting to 10.42.0.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.22 port 37260 connected with 10.42.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  89.0 MBytes   747 Mbits/sec
[  3]  1.0- 2.0 sec  85.9 MBytes   720 Mbits/sec
[  3]  2.0- 3.0 sec  88.1 MBytes   739 Mbits/sec
[  3]  3.0- 4.0 sec  85.5 MBytes   717 Mbits/sec
[  3]  4.0- 5.0 sec  85.5 MBytes   717 Mbits/sec
[  3]  5.0- 6.0 sec  85.8 MBytes   719 Mbits/sec
[  3]  6.0- 7.0 sec  85.9 MBytes   720 Mbits/sec
[  3]  7.0- 8.0 sec  84.6 MBytes   710 Mbits/sec
[  3]  8.0- 9.0 sec  86.5 MBytes   726 Mbits/sec
[  3]  9.0-10.0 sec  84.5 MBytes   709 Mbits/sec
[  3] 10.0-11.0 sec  86.9 MBytes   729 Mbits/sec
[  3] 11.0-12.0 sec  85.4 MBytes   716 Mbits/sec
[  3] 12.0-13.0 sec  86.6 MBytes   727 Mbits/sec
[  3] 13.0-14.0 sec  85.5 MBytes   717 Mbits/sec
[  3] 14.0-15.0 sec  86.8 MBytes   728 Mbits/sec
[  3] 15.0-16.0 sec  85.6 MBytes   718 Mbits/sec
[  3] 16.0-17.0 sec  86.5 MBytes   726 Mbits/sec
[  3] 17.0-18.0 sec  84.5 MBytes   709 Mbits/sec
[  3] 18.0-19.0 sec  87.1 MBytes   731 Mbits/sec
[  3] 19.0-20.0 sec  85.2 MBytes   715 Mbits/sec
[  3]  0.0-20.0 sec  1.68 GBytes   722 Mbits/sec

pretty nice 200-250Mbps of NATed throughput gain (depending on machine OS and eth NICs)

This can probably be increased by running pahole and fixing up the ethernet driver.

agree. but, keep in mind, this is test with ar71xx image on kernel 4.9.

once enabled fast path/flow offload - whatever guys with gbit connections are using these would get close to gbit speeds leaving enough cpu time for other tasks

Isn't that only for routing?

the testcase scenario consist of 2 PCs, one connected to LAN port, another to WAN port. so this was in fact routing test, but without netfilter offload, or other acceleration features.
at least NAT term should imply that..

I'd like to try OCing my C7 v4s, can you point me in the right direction to read up on and get it done? Thanks.

I remember the issue someone had with with Overclock QCA9558 was time drift not performance stability.

how did they come up with that time drift issue in the first place? by using badly writen bootloader that shows fake pumped-up values?

IIRC, the issue was encountered with ar71xx where clocks higher than 1000MHz would cause time drift. ath79 may have fixed it.

well, as i said ar71xx image has been tested, built with kernel 4.9.111, no clock drift at clocks >1000.

example of test: observe router uptime 1m36s at 23h25m48s, checked few minutes later and got 3m36s at 23h27m48s.

guy who noticed clock drift on his device used flawed breed loader and was out of sync 2 seconds every 20seconds

I noticed you said max was 1200. I wonder if heatsinks would fix the issue...

My C7v3 comes with heatsinks. Maybe I should try...

actually i've already put one 25x25x10mm heatsink, used coolermaster e1 paste... then i put old laptop's fan in front of it and only with fan i noticed less crashes. but still squashfs decompression and illegal r/w access errors were persistent which may indicate the SPI needs higher profile too, and that depends on AHB which seems to be picky about it's clocks.
another thing i remembered, maybe the voltage is simply too low and needs to be raised by few mv.
if you decide to try to build, there is already support for QCA956x in @pepe2k's github (pull request)

update:code pushed and PR opened: https://github.com/pepe2k/u-boot_mod/pull/229

1 Like

Please help !How you set overclock profile in breed? Please make picture from your wr841nd overclock settings.

Why do you think overclocking is good for your router?

1 Like

I want better performance!