Date: Wed, 12 Sep 2018 20:32:30 -0700 From: Kevin Oberman <rkoberman@gmail.com> To: Lev Serebryakov <lev@freebsd.org> Cc: current <current@freebsd.org>, brnrd@freebsd.org, Jung-uk Kim <jkim@freebsd.org> Subject: Re: Speed problems with both system openssl and security/openssl-devel Message-ID: <CAN6yY1usNXCzpnLhHLqbhcjHr6Y4X0%2BTrXiJzNAFY81S5nbzHw@mail.gmail.com> In-Reply-To: <43892083.20180913024646@serebryakov.spb.ru> References: <43892083.20180913024646@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 12, 2018 at 4:48 PM Lev Serebryakov <lev@freebsd.org> wrote: > Hello Brnrd, > > I'm benchmarking new hardware (rather limited one, but still) which > supports AES-NI (Celeron J3160). > > I'm comparing simple "openssl speed aes-256-cbc" and "openssl speed -evp > aes-256-cbc" on FreeBSD 12-ALPHA4 (built by myself with all debug options > turned off) and Debian Linux 9.5.0 booted from install DVD (without > installation). > > Simple "openssl speed aes-256-cbc" shows same numbers both in > single-threaded and multi-threaded mode (for all 4 cores). Linux is > marginally faster, > but it is in the margin of measurement error. > > But "openssl speed -evp aes-256-cbc" gives me very disappointing results. > FreeBSD's openssl is WAY slower than Linux one. It is even slower than > non-evp mode for small blocks. > > Here are results (As reported by openssl, with fractions dropped): > > Lin 18942 20637 21300 57967 58769 58769 > Free 18931 20591 21282 58342 58731 58779 > Lin-evp 97049 151466 183905 194385 197514 197727 > Free-evp 2838 10845 35362 81892 131264 137579 > > Linux have openssl 1.1.0f, and I've tried both system /usr/bin/openssl > (1.0.2p) > and /usr/local/bin/openssl from security/openssl-devel port (1.1.0i), > results are > virtually the same. I have "ASM" and "SSE2" options enabled in port. > > What happens here? Why does FreeBSD's build of openssl use AES-NI so > inefficient? > > -- > Best regards, > Lev mailto:lev@FreeBSD.org This is probably not the issue, but aesni is not in the GENERIC kernel. Are you sure aesni.ko is loaded? % kldstat | grep aesni If not found, "kldload aesni" and add aesni_load="YES" to /boot/loader.conf -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1usNXCzpnLhHLqbhcjHr6Y4X0%2BTrXiJzNAFY81S5nbzHw>