Wireguard performance numbers on WRT1900ac and Xeon server


#4

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.


#5

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.


#6

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.


#7

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


#8

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


#9

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.


Updating u-boot on wrt1200ac / Overclocking cpu
#10


:slight_smile:


#11

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


#12

Can you be a bit more specific?


#13

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

Opps, I misread...


#14

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


#15

So there no easy way to enable this currently.


#16

Three ways above, none are that difficult.


#17

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.


#18

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


#19

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


#20

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.


#21

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


#22

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.


#23

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