OpenWrt Forum Archive

Topic: WRT54G/OpenWRT/OpenSWAN performance

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

Hey,

I posted this to the openswan-users list, and I'm reiterating it here.

On popular request I did some throughput tests using a Linksys WRT54G broadband router as ipsec endpoint.

0) General

The tests are performed with iperf for throughput, and cyclesoak on the WRT54G for CPU load. Cyclesoak is recalibrated for each new algorithm, but not between tests.

- Each test is peformed five times.
- For the CPU load, 11 data points are taken (1/second, for 10 seconds). For the CPU load the average is taken over 9 of these (the minimum and maximum values are taken out).
- The throughput yields one (total) value per test.

To get to the totals the 5 data points for CPU load and throughput are averaged over 3 measurements. As before, the minimum and maximum values are taken out.

1) Test results

1.1) Switching (same subnet)

Network layout:

eth0/10.164.10.200 --- (br0/10.164.10.1) --- eth0/10.164.10.100
iperf -s --- (   cyclesoak   ) --- iperf -N -c 10.164.10.200
         
        Average CPU load:                N/A        %
        Average throughput:                93.8        Mbit/s

1.2) Routing (different subnets)

Network layout:

eth0/192.168.1.200 --- (br0:1/192.168.1.1 X br0/10.164.10.1) --- eth0/10.164.10.100
iperf -s --- (             cyclesoak             ) --- iperf -N -c 192.168.1.200


1.2.1) Without IPsec
         
        Average CPU load:                52.9        %
        Average throughput:                26.1        Mbit/s

1.2.2) With IPsec

The ipsec tunnel is between 192.168.1.200 (left) and 10.164.10.1 (right), with 10.164.10.0/24 as rightsubnet. Measurements are preformed on 10.164.10.100 as client, with 192.168.1.200 as server, having the Linksys device in the middle as router.

Base configs:
left:

CPU: 2x500MHz Intel Celeron
Kernel: 2.6.7 SMP
Openswan: Openswan-2 HEAD userspace (CVS, 27-06-2004)
Memory: 768MB

ipsec.conf:
conn test
        left=%defaultroute
        right=10.164.10.1
        rightsubnet=10.164.10.0/24
        authby=secret
        auto=ignore

right:
CPU: 200MHz Broadcom BCM3302 V0.7
Kernel: 2.4.20
Openswan: Openswan-2.2.0dr1 ipsec.o module, Openswan-2 HEAD userspace.
Memory: 14MB :-)

ipsec.conf:
conn test
        left=192.168.1.200
        right=10.164.10.1
        rightsubnet=10.164.10.0/24
        authby=secret
        auto=ignore

1.2.2.1) Test results IPsec (3Des)
         
        Added esp=aes to the ipsec.conf snippets above on both sides.
         
        Average CPU load:                83.5        %
        Average throughput:                1.51        Mbit/s

1.2.2.2) Test results IPsec (AES)
         
        Added esp=aes to the ipsec.conf snippets above on both sides.
         
        Average CPU load:                82.9        %
        Average throughput:                2.65        Mbit/s

2) Discussion

I didn't have the chance to test IPsec with NULL encryption as the openswan KLIPS module I used on the WRT54G didn't seem to support this mode. Shame, but when I get a chance I will rerun these tests, but with NULL taken into the results too.

I think the general conclusion can be drawn that indeed AES is better to use for IPsec on resource starved devices. I don't think that comes as a
surprise to anyone :-) I am amazed by the large amount of load which simple routing puts on the CPU though, especially as simple switching didn't have any measurable effect on the CPU load (I guess that's done purely in hardware). Imagine how much throughput you'd be able to get when that area is optimized. Admittedly though, I didn't disable the
iptables ruleset when I preformed these tests. Maybe I should have. When I rerun the tests with NULL encryption for IPsec, I'll be sure to also
not have any netfilter in the way too. If in the meantime anyone has any suggestions on better tests or test methods, please let me know, and I'll take your suggestions into account on the next test run.

PS: I don't know how the layout of this piece will come over in your mail client, and the ascii art might not look that good either. Use your imagination :-)

Hi PolarWolf

I'm on the track to test performance of a MANET (ad hoc mode) with olsr (www.olsr.org) as the routing protocol.

I'm looking for a the openwrt package version of iperf (http://dast.nlanr.net/Projects/Iperf/)

As it's not a GPL tools it think it may not have it's place on the openwrt package main page...(i duno)

Anyway the NLANR licence authorize any downloads binary/source code of iperf in any format

So if you have a wrt54g (ipk) version of iperf please let us know. Or share any hints on compiling it ?

TIA

Hi PolarWolf

I'm on the track to test performance of a MANET (ad hoc mode) with olsr (www.olsr.org) as the routing protocol.

I'm looking for a the openwrt package version of iperf (http://dast.nlanr.net/Projects/Iperf/)

As it's not a GPL tools it think it may not have it's place on the openwrt package main page...(i duno)

Anyway the NLANR licence authorize any downloads binary/source code of iperf in any format

So if you have a wrt54g (ipk) version of iperf please let us know. Or share any hints on compiling it ?

TIA

In these tests I didn't run iperf on the WRT54G as that would cause myself to be testing packet generation capabilities of the openwrt/wrt54g combination, not sheer routing performance. In my case, not very useful. Building iperf for openwrt shouldn't be much of a problem, see the Wiki on how to build packages, and browse around in this forum on how to do it.

Just wonder, if anybody has tested the Openswan performance on newer hardware, like those Draft-N routers...?

The discussion might have continued from here.