Drastic slowdown for geli attach

Ian Lepore ian at freebsd.org
Thu Feb 25 23:44:10 UTC 2021


On Wed, 2021-02-24 at 21:34 -0800, Kevin Oberman wrote:
> Sometime around the first week of this month (February) the time to
> do a
> geli attach on my 13.0-ALPHA3 amd64 system sharply increased. It
> started
> taking about 10 seconds. Prior to this, it took about 3-4 seconds. I
> have
> not seen any issues with the disc after it attaches, I am simply
> concerned
> that the longer time may be indicative of a deeper issue.
> 
> The system is a ThinkPad L15 with a CometLake i5-10210U and a Seagate
> ST2000LM007-1R8174 2T HDD.
> --
> Kevin Oberman, Part time kid herder and retired Network Engineer
> E-mail: rkoberman at gmail.com
> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "
> freebsd-stable-unsubscribe at freebsd.org"

In my experience, the thing that takes the most time in a geli attach
is the iterations of PKCS#5v2 it performs.  When you setup geli on a
partition it calculates how many iterations take about 2 seconds to
perform (unless you provide a specific value with the -i flag).

If you set up geli on a very fast machine then move the storage to a
slower machine, it may take much longer than 2 seconds.  (And if you
have 10 drives to attach, 2 seconds each becomes annoying, so I tend to
use -i with a small-ish number like 5000).

Or, in your case, maybe something has changed like it used to use aesni
accellerated instructions and now it doesn't for some reason, like
different default flags got used on the build, or something changed in
the crypto and/or driver framework.  That's the kind of thing I'd be
looking for.

-- Ian



More information about the freebsd-stable mailing list