Wireguard performance numbers on WRT1900ac and Xeon server

I’m going to assume this is a v1 unit.

The v1 has no NEON support, which WireGuard has support for. I’m guessing it’s falling back to the C implementations for the crypto.

In any case, getting NEON on any Cortex A9 device in OpenWrt currently requires you to compile your own builds. Note that every device except the WRT1900ACv1 supports NEON.

Also note that as far as I know, there hasn’t been much work on getting WireGuard very well integrated with the kernel’s networking subsystem to take advantage of stuff like GRO and GSO.

Speed will improve over time. I don’t know if it’s possible to take advantage of VFP to speed up anything. Maybe poly1305 since it uses floating point.

1 Like

In addition to the above, if you have a neon capable cpu you need to manually change the profile also setting -O2 instead of -Os might help performance a bit.

1 Like

Thanks for the replies. The WRT1900ac is a v1 (mamba series). My reason for the testing is that I will be upgrading from my Internet from 180/20 to Gigabit in the next few months. At the end of the day I'm trying to determine if I can get away with purchasing a newer SOC based OpenWRT compatible router that can handle near Gigabit speed with Wireguard or look at a low powered X86 solution. I know the latter is almost mandatory for better OpenVPN performance.

Is their a tutorial somewhere explaining how to compile with NEON support? I have my own build butr don't see any obvious options anywhere

Edit target/mvebu/cortexa9/...something. look for vfp3 and replace that with neon.

Or set options in menuconfig.for example:

CONFIG_EXTRA_OPTIMIZATION="-O2 -fno-caller-saves -fno-plt -mfpu=neon"
CONFIG_TARGET_OPTIMIZATION="-O2 -pipe -mcpu=cortex-a9 -mfpu=neon"

and there is a bit more to be had with the individual make files on packages.


:slight_smile:

1 Like

It looks like neon support was added month ago so no need to do anything?

Can you be a bit more specific?

If building from TRUNK it seems from above Neon support has been already added and enabled for WRT1900ACS.

Opps, I misread...

No it isn't, https://github.com/openwrt/openwrt/blob/master/target/linux/mvebu/cortexa9/target.mk#L13

So there no easy way to enable this currently.

Three ways above, none are that difficult.

1 Like

You still need to recompile the rest of packages if you want to enable neon as the default CPU flags disables usage of NEON instructions. Do note that everything doesn't use NEON however.

What about " to be had with the individual make files on packages."

How to tackle that or is it not required or does that mean some packages will stop working with Neon?

Thanks btw dizzy for the intel

No packages will stop working, it's just "convenience" I guess...

If you want to pick up the discussion again here's the old PR, https://github.com/lede-project/source/pull/1211

Going to depend on what you include in your build, what the make file currently supports (i.e. does it support NEON OOTB, or do you need to un-comment a line). Mostly AV type transcode packages, just requires some investigation.

1 Like

Is there a way to verify neon has been enabled in a build from command line for example?

Mainly crypto and multimedia related software is what uses NEON instructions, there's support for most software that can use NEON in the tree and package repo. We could benefit greatly as far as zlib goes if someone could repackage the Chromimum fork of zlib as upstream seems quite dead.

Most software wont tell, libx264 (via ffmpeg) for instance will however.

1 Like

Yes, not to forget crypto, which is a wee bit borked for me at the moment with the openssl 1.1.1 PR.