Subject: Re: IPSec performance
To: Martin van Hensbergen <mhens@mac.com>
From: Frederick Bruckman <fredb@immanent.net>
List: port-mac68k
Date: 02/19/2003 10:10:22
On Wed, 19 Feb 2003, Martin van Hensbergen wrote:

> I would like to know the performance of IPSec tunnels using netbsd on a
> 68k machine.
>
> I use a Centris 650 with 12 megabytes of RAM and a custom 1.5.2 kernel
> with IPSec support.

> When I do NOT use encryption, I get a transfer rate of about 350
> kilobyte per second, which is the normal wireless speed. When I turn
> the encryption on, the throughput decreases to 35 kilobyte per second!
> This is not very impressive, especially considering the fact that my
> internet connection has a troughput of 80 k/sec!
>
> I have tried different encryption algorithms (3des, des, blowfish) but
> this does not effect the speed.
>
> Does anyone have a similar setup and benchmarks to share? Any hints on
> how to improve this speed? I have the option of getting a Quadra 800
> but since it's only 8 mhz faster, I don't think this will bring me a
> much better performance.

Just a thought... what optimizations do you use for your kernel? There
have been reports that openssl is much faster on 68040 when compiled
with -m68020-40 than the default -m68020, and the kernel code may
respond similarly. I would:

1) Comment out the line that says ``CFLAGS+= -msoft-float'' in
Makefile.mac68k.

2) Comment out the other CPU's in your kernel config besides ``options
M68040''. This'll bypass some switch statements in critical sections
of the code.

3) Add a line that says ``makeoptions     COPTS="-O2 -m68040"'' to
your kernel config. (Why not try to use all the features of the chip?)

4) Comment out ``options FPU_EMULATE''; comment out ``options
KMEM_STATS''; comment out support for file-systems, features, and
devices you're not going to use. The improvement here is subtle: by
making the kernel smaller, you improve the chance that consecutively
performed tasks won't need to pull in a new cache line.

5) Reconfigure, "make cleandepends", and so on...

I'm really curious as to whether any of that will help, or which
optimizations make the most difference.

Frederick