OpenWrt Forum Archive

Topic: Performance Oriented OpenWRT Builds

The content of this topic has been archived between 12 Sep 2015 and 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

My build here is geared towards optimizing for performance especially NAT.

It is currently based on Barrier Breaker as it is the stable release.
This build is maintained via patches which applies cleanly ontop of Barrier Breaker.
Because it is patched via a script it means I can do a lot of iterative testing for performance on each patch added.

There is not a lot of software preinstalled just mainly the ones needed for the Router to function as a Network Gateway/Router with IPv6/IPv4.
Software Included
-Full IPv6/Dual Stack/Tunneling
-Full Wpad with Enterprise Radius Authentication
-VSFTPD with SSL
-SQM-Scripts
-Wake On Lan
-DDNS
-UPnP
-3/4G USB Modem
-MultiWAN3
-Block Mount
-Support ext2/3/4

Patches include
-Some Compatible QCA Code Auora Patches (Tested Working)
-CFLAG Prccessor tuning (Tested Working)
-uClibc Patches (Tested Working)
-Kernel Patches (Tested Working)
-Minor LuCI Interface Fixes for Mobile Devices (Tested Working)
-Minify/Compressed CSS and Javascript (Tested Working)
-QoS for IPv6/4 (Tested Working)
-OpenSSL Assembly for PowerPC (Tested Performance boosted Significantly)
-Backport performance improvement fixes from Trunk to Barrier Breaker including Routing Cache Patch

Quality Assurance is based on the fact that firmware is flashed on my own Router verified bootable before it is uploaded

Supported Routers
WR1043NDv1, WDR4300v1,WDR4900v1

Architecture Supported
mips24k, mips74k, PowerPC e500v2

Build Script for mips24k here
https://github.com/gwlim/mips24k-barrier-breaker-patch

Build Script for mips74k here
https://github.com/gwlim/mips74k-barrier-breaker-patch

Build Script for PowerPC e500v2 here
https://github.com/gwlim/mpc85xx-barrier-breaker-patch

If you do not want to build it yourself, binaries as well as overclocking bootloaders can be found here
https://github.com/gwlim/Openwrt_Firmware
Only the following routers are supported
WR1043NDv1, WDR4300 and identical hardware Routers and WDR4900v1 (if you are using any other router you have to build it yourself from my source)
The actual hardware I own is WR1043NDv1, WDR4300v1 and WDR4900 and the binaries are tested on my hardware.
If you have any other router that is not in the list you have to clone my buildscript choose your own Router from the menuconfig and build it yourself.

(Last edited by alphasparc on 24 Nov 2015, 04:16)

jperf testing (No SQM-Scripts Running) -

WR1043NDv1 Overclocked to 430MHZ - NAT ~ 290Mbits/s
WR4300v1 Overclocked to 730MHZ - NAT ~ 530Mbits/s
WR4900v1 Stockclock (800MHZ) - NAT ~ 530Mbits/s

(Last edited by alphasparc on 2 May 2015, 13:31)

alphasparc wrote:

Actually I have been making this build for a long time.
I am just putting it here now to share having acquire confidence in the mods I have made.
My experience using with the software I compiled is quite good.
Github here
Downloads here
What my builds have
-Directed build target mips24kc
-Try and find all the packages to strip out debug (add --disable-debug) when possible
-Enable Threading in packages when possible
-Patch RTL8366RB (code from OpenWRT Ticket)
-Patched LuCI from the same ticket and add dtim_period etc
-Scripts to compress AJAX and CSS run it in this order : luci.sh -> closure.sh and yuicompressor.sh
-Rename some of the LuCI stuff to a better name
-Add NetBIOS disable to samba init
-Has IPv6 from AA
-Use minidlna
and a lot of cruft until I lost track.
If you want to know all the different patch I added just take the source and do a diff.
Feel free to steal all the changes smile
I added a lot of scripts inside to automate monkey patching so make sure the directory is in home.

Have you tested the AA Release R37729 build on 1043 ND router or you just compile the image and upload w/o testing?
I want to try it on my router and I don't want to brick it .  Just hope that the wireless is stable.

(Last edited by Bajramo on 8 Aug 2013, 08:35)

I always test on my router before uploading.
I follow the practice of "eating my own dogfood" smile

(Last edited by alphasparc on 18 Aug 2013, 16:33)

Hi,

pptpd is broken.

Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for pptpd:
*     kernel (= 3.3.8-1-d6597ebf6203328d3519ea3c3371a493) *     kernel (= 3.3.8-1-d6597ebf6203328d3519ea3c3371a493) *
* opkg_install_cmd: Cannot install package pptpd.

Any alternative?

BTW, this is an AMAZING work. Firmware is clean and sharp, a lot of new features available out of the box. This is awesome!
Thanks a lot!

(Last edited by AfonsoDuarte on 27 Aug 2013, 23:19)

That is strange...I managed to install it...

root@openwrt:~# opkg update
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
root@openwrt:~# opkg install pptpd
Installing pptpd (1.3.4-2) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/pptpd_1.3.4-2_ar71xx.ipk.
Configuring pptpd.

Thanks for the reply. I used the sysupgrade image and got the errors above with everything that relates to PPTP or IPSEC (even kmod's).

Is there a way to completely restore the filesystem? Is flashing the "factory" image enough?

The latest release is on github, it is the most convient place to put the binaries since it is generated in the same place as the buildroot.
MD5 checksum also in the folder.
You can sysupgrade either the factory and the sysupgrade.
Both is the same.
When you sysupgrade all the jjfs is erased meaning old packages and config (unless you choose save config).

(Last edited by alphasparc on 28 Aug 2013, 12:05)

Ok you are right the reason why kmods will not install because the version is out of sync.
The openwrt repo have not updated their packages for a long time and they have not generated new ones.
So what will happen is that kmods WILL NOT work unless you do

root@openwrt:~# opkg install kmod-bonding --force-depends

but userspace applications will install without needing the flags but I am not sure about the stability of using out of sync kmods...

(Last edited by alphasparc on 28 Aug 2013, 16:25)

Fixed after reinstall.
--force-depends gave me reboots after connecting the pptp client.

Thanks again! smile

How about just list the packages you need and I will build them as modular package and put them on github?
Anyone who needs any packages extra just leave note on this thread.

This is weird...

I managed to completely reinstall your image, and i could install pptpd right away.
I tested, it worked.

I got to work, tried to connect the VPN, and couldn't manage to do it. Got home, and saw pptpd to not be installed (!!!!).
Tried to install it again, and, same thing as before:

root@TP-Link:~# opkg update
Downloading http://downloads.openwrt.org/attitude_a … ckages.gz.
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
root@TP-Link:~# opkg install pptpd
Installing pptpd (1.3.4-2) to root...
Downloading http://downloads.openwrt.org/attitude_a … r71xx.ipk.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for pptpd:
*     kernel (= 3.3.8-1-d6597ebf6203328d3519ea3c3371a493) *     kernel (= 3.3.8-1-d6597ebf6203328d3519ea3c3371a493) *
* opkg_install_cmd: Cannot install package pptpd.



Then, i forced it.

root@TP-Link:~# opkg install pptpd --force-depends
Installing pptpd (1.3.4-2) to root...
Downloading http://downloads.openwrt.org/attitude_a … r71xx.ipk.
Installing kmod-gre (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_a … r71xx.ipk.
Installing kmod-ipv6 (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_a … r71xx.ipk.
Configuring kmod-ipv6.
Configuring kmod-gre.
Configuring pptpd.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for pptpd:
*     kernel (= 3.3.8-1-d6597ebf6203328d3519ea3c3371a493) *     kernel (= 3.3.8-1-d6597ebf6203328d3519ea3c3371a493) *
* resolve_conffiles: Existing conffile /etc/pptpd.conf is different from the conffile in the new package. The new conffile will be placed at /etc/pptpd.conf-opkg.
* resolve_conffiles: Existing conffile /etc/ppp/options.pptpd is different from the conffile in the new package. The new conffile will be placed at /etc/ppp/options.pptpd-opkg.



And tested it.....

root@TP-Link:~# ps | grep pptp
2055 root      1684 S    grep pptp
root@TP-Link:~# /etc/init.d/pptp start
-ash: /etc/init.d/pptp: not found
root@TP-Link:~# /etc/init.d/pptpd start
root@TP-Link:~# logread -f
Aug 29 18:40:14 TP-Link daemon.info pptpd[2083]: CTRL: Client 89.214.117.29 control connection started
Aug 29 18:40:14 TP-Link daemon.info pptpd[2083]: CTRL: Starting call (launching pppd, opening GRE)


After this last line, the router hanged.

Any ideas? In the meanwhile, i'm forwarding pptpd to another node so i can have access.


========= UPDATE ========

I've removed pptpd, and configured port forward to my raspberry pi.
Funny thing is that the router still reboots when a connection is established.

Possible fault with a kernel module?

(Last edited by AfonsoDuarte on 29 Aug 2013, 22:36)

The problem is this changeset
https://dev.openwrt.org/changeset/37113
It points to a 12.09.1 repository but there is no such repository, the URL does not exist what I did was I manually changed it to point to the old 12.09 repository which causes all the check depend issues because it is 12.09.1 not 12.09.
So at this point I can either choose to generate the packages needed manually or I can reverse this changeset...

(Last edited by alphasparc on 30 Aug 2013, 04:50)

Thank you for your builds; my router loves them! smile

Do you think that it would be possible to throw a script in there that logs the total daily bandwidth usage?

Thanks, I'll check that out! In the meantime, I was able to craft a cronjob that should do it (thanks #openwrt irc users!), although it won't cumulate data throughout the day (eg: any reboots will "reset" these stats):


## The following line will log the "br-lan" interface stats to /root/bw.log -- it is ran every day at midnight. Log example: 2013-09-29: D=18.1797Gb U=1.5724Gb T=19.7521Gb

0 0  * * * ip -s link show br-lan | awk 'BEGIN{"date +'%Y-%m-%d'"|getline d;} /RX/ { getline; rxbytes=$1/(1024*1024*1024) } /TX/ { getline; txbytes=$1/(1024*1024*1024) } END { print d ": D=" txbytes "Gb U=" rxbytes "Gb T=" rxbytes+txbytes"Gb"}' >> bw.log

(Last edited by raz123 on 29 Sep 2013, 20:52)

I still get a lot of "phy0: Failed to stop TX DMA, queues=0x100!"

Any suggestions?
I'm running WPA2 over TKIP. I also tried AES with no luck..

AfonsoDuarte, you could cook a script to restart Wi-Fi as soon as you get a DMA error..

I found this online, I think it should do it:

#!/bin/sh
logread -f | grep 'Failed to stop TX DMA' | while read line
do
  /bin/date >> /tmp/wifi_restarts.log
  /sbin/wifi restart
done

(Last edited by raz123 on 2 Nov 2013, 21:28)

My experience is that it eventually auto recovers.
You can try setting antenna diversity.
So far I have not notice any dropped wifi even though I do get the errors in the syslog.

(Last edited by alphasparc on 3 Nov 2013, 17:55)

the jumbo frames function doesn't seem to work, excellent build none the less

(Last edited by chronoman on 15 Nov 2013, 00:58)

alphasparc,  I am thinking about getting this router.
Could you please elaborate on vlan and port mirroring (and switch functionality in general)?
I want to be able to do port mirroring (sometimes), allow certain port to be able to communicate only with another certain port (limit port to port communications) and if possible stats about ports (over snmp or otherwise).
You also mentioned extended luci functionality in your blog.
Does it include support for port mirroring using luci?

Thanks.

(Last edited by matrix200 on 23 Dec 2013, 20:50)

New builds Download here
git repository here

Curious about your choice of compiler optimization: you used "-mips32r2 -mtune=24kc". Why not "-march=24kc" instead of "-mips32r2" since you're already "tuning" for the 24Kc MIPS CPU.

For different architecture -mip32r2 -mtune=XXX still runs but -march doesn't.
Performance wise there is no difference.