From owner-freebsd-stable@freebsd.org Fri Feb 26 05:31:54 2021 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE5B35559E3 for ; Fri, 26 Feb 2021 05:31:54 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmyvZ0jXZz4nJb; Fri, 26 Feb 2021 05:31:54 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-ot1-x335.google.com with SMTP id b8so8066938oti.7; Thu, 25 Feb 2021 21:31:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RUkX9MwxZ8n6YHdHUHurrbjb0hKK0ekr60jvejNJEx0=; b=HFnFLTH1nZrDpy2e/tVHvj3RDX0p03SoefZYUQ1ubUUyYpKaJR2ZbEZe7gkyNfOTyB 2BMA8+f+jhc3gnAd2046Nlf42l4HHORxwJqjTMuG4y5pQt3dk7nxhRlgqM28MGsGDBQf eBPQpLMddx5GtuRd931FtWaIr1T+s4q5r+Z4712l/AOTK3ACmITDTGt05lvKuK+Vgu/4 IrezDJk+E5m2saxUe+xW+RGwSn6WSS476OwGuxn2G8YA4nAEvsHex9qinFb+4zMy/aod 1Ni5rrgzCSxcKlZiqiEeruulO8gxZsLzKFlpYIz6SogJMCOVqR+w9erVLK+oyv7rRpif 38Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RUkX9MwxZ8n6YHdHUHurrbjb0hKK0ekr60jvejNJEx0=; b=Jy2vwpqJaBbmDOfbg2f4F6JhPeaLB3g5CzR+ob9SnKfYiWFk6z6LP7z7Uobl5TxoLO fIZlqphmT++enRbBZAY2/o5YBmbp2A5l/TpDVJ3gUnFb+tGQTlrY3lfkW/oQ5I29I00L bfHGsynCHvKo95wS7/v861pNd2roYf8LC01uZvt1F1I0QGGGfdlvAsQE5O8Cvbwwn1QG vn/RsIvDVkUVk8S0KbrdelksjtGQdRuPHSKxhFvEHZ1jBAIQBYpW+5xGjuYQF3Z8RXJy HaF0keHeavZlNIqDmIp4xDRc4gvc6YyOMXh4SItwDcgrb9VY9QglINDtP9QAUs7Gz5lx cfqQ== X-Gm-Message-State: AOAM531Xi2E2QrVs5+2t7th27gfgLvD0WsgbF10V7pRQlm5RwLuwbpZ/ JvHEr0TTCNtZNF1tZ73ACZiszoNhb8/H50Go4ok9HuGdVgGMAw== X-Google-Smtp-Source: ABdhPJxVI4Wf9qfVz/lATw+DZsLkqkf2QDeZYFjaD/KBzkAvVjiUDiZlHYGtkZ5tB50PIZCrnKZ7MAKgV9KRE9B+ShA= X-Received: by 2002:a9d:d51:: with SMTP id 75mr1081678oti.199.1614317512980; Thu, 25 Feb 2021 21:31:52 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kevin Oberman Date: Thu, 25 Feb 2021 21:31:34 -0800 Message-ID: Subject: Re: Drastic slowdown for geli attach To: Ian Lepore Cc: FreeBSD-STABLE Mailing List X-Rspamd-Queue-Id: 4DmyvZ0jXZz4nJb X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=HFnFLTH1; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of kob6558@gmail.com designates 2607:f8b0:4864:20::335 as permitted sender) smtp.mailfrom=kob6558@gmail.com X-Spamd-Result: default: False [-3.70 / 15.00]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[rkoberman@gmail.com,kob6558@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::335:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[rkoberman@gmail.com,kob6558@gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::335:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::335:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-stable] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 05:31:55 -0000 On Thu, Feb 25, 2021 at 3:44 PM Ian Lepore wrote: > 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@gmail.com > > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > > _______________________________________________ > > freebsd-stable@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to " > > freebsd-stable-unsubscribe@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 > I think I see the cause. The filesystem was originally encrypted with geli several years ago... in fact I set it up shortly after geli went into FreeBSD. I suspect that defaults changed since then and, when I got my new system, instead of using DD to image the file system, I created a new encrypted system with current defaults and copied the data from my backup drive. I am embarrassed to admit that I didn't even think about this rather drastic change in the file system. Thanks so much for the help! Sorry to have wasted whatever time you spent thinking about my concern. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683