Subject: Re: improving ssh performance on sun4m systems
To: None <port-sparc@netbsd.org>
From: Aaron J. Grier <agrier@poofygoof.com>
List: port-sparc
Date: 03/13/2002 18:25:43
On Tue, Mar 12, 2002 at 01:50:35PM +0000, Greg MATTHEWS wrote:


> not sure about compiling ssl stuff as i couldnt find a directory with
> a valid makefile.

the big hotspot to optimize is lib/libcrypto (for 1.5 and later).
(otherwise it's openssl pkgsrc.)

check speed via 'openssl speed'  (apparently speed tests are compiled
in; very handy.)  specifically 'openssl speed dsa' as these are what
take the longest with ssh v2.

pkgsrc/devel/cpuflags can help.  on my 110MHz sparc 5 running 1.5.2,
cpuflags adds '-mcpu=supersparc' which almost doubles my dsa
performance:

compiler: cc -O3 -fomit-frame-pointer  -Werror
                  sign    verify    sign/s verify/s
dsa  512 bits   0.2094s   0.2639s      4.8      3.8
dsa 1024 bits   0.6993s   0.8767s      1.4      1.1

compiler: cc -O2 -mcpu=supersparc  -Werror
                  sign    verify    sign/s verify/s
dsa  512 bits   0.1029s   0.1273s      9.7      7.9
dsa 1024 bits   0.3360s   0.4250s      3.0      2.4

compiler: cc -O3 -mcpu=supersparc  -Werror 
                  sign    verify    sign/s verify/s
dsa  512 bits   0.1041s   0.1283s      9.6      7.8
dsa 1024 bits   0.3407s   0.4229s      2.9      2.4

compiler: cc -O3 -fomit-frame-pointer -mcpu=supersparc  -Werror
                  sign    verify    sign/s verify/s
dsa  512 bits   0.1035s   0.1296s      9.7      7.7
dsa 1024 bits   0.3383s   0.4225s      3.0      2.4

so gcc is obviously producing much better code on this machine when
-mcpu=supersparc is used.  and this is with the older compiler...

gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

it wouldn't surprise me if the newer gcc is even better about optimizing
and / or tuning.

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | agrier@poofygoof.com
      "[...] I generally haven't found IDM guys to be very good
       live acts, most of them just sit down at their laptop and
       tweak reaktor."  -- Brandon Daniel