Subject: Re: OpenSSL RSA very very slow
To: J.T. Conklin <jtc@acorntoolworks.com>
From: Johnny C. Lam <jlam@NetBSD.org>
List: port-amd64
Date: 01/13/2005 07:11:11
On Mon, Jan 10, 2005 at 07:35:41AM -0800, J.T. Conklin wrote:
> Frank van der Linden <fvdl@NetBSD.org> writes:
> > On Sat, Jan 08, 2005 at 09:13:15AM -0500, Alicia da Conceicao wrote:
> >> Just an observation that the RSA operations in the OpenSSL distribution
> >> that comes with NetBSD-amd64 version 2.0 is very slow compared to the
> >> NetBSD-i386 version when run on a machine with similar CPU clock speed.
> >
> > What commandline are you using to measure the speed?
> 
> I see this with 'openssl speed rsa' when comparing the stock NetBSD
> OpenSSL, and one using SIXTY_FOUR_BIT_LONG and bn/asm/x86_64-gcc.c.
> 
> Submitting a Configure patch to the OpenSSL folks and a NetBSD PR with
> Makefile *.inc changes has been on my queue for some time, I'll try to
> make it happen this evening.

FWIW, the pkgsrc openssl already builds with these optimizations.  I
had copied part of the linux-x86_64 openssl config when creating the
entry in the Configure script for NetBSD/amd64.  The only remaining
part of the linux-x86_64 config that I haven't copied over is RC4_CHUNK,
which is supposed to "enable code that handles data aligned at long
(natural CPU word) boundary).  I'll test a build with and without this
extra definition to see if the RSA speed differs.

	Cheers,

	-- Johnny Lam <jlam@NetBSD.org>