Performance regression, 2.2.3/recent?

Phil Pennock gnupg-users at spodhuis.org
Sun Dec 3 02:20:02 CET 2017


Anyone else seeing major slowdowns with keyring dumping in recent GnuPG
on Linux?

I have a dump-state script used for monthly backups where after an hour,
I gave up.  The step is just:

  gpg --with-colons --with-fingerprint --with-subkey-fingerprint --with-secret --list-keys

but pubring.kbx is 236 MiB.  Large, but GnuPG has handled it until now.

If I copy to a clean GNUPGHOME on macOS (more CPU etc too) then things
complete in about 27 seconds.  No variation of the flags has a
significant impact.

I just killed another attempt on the Ubuntu / Atom-CPU box, which was
running under `strace -o ...` which would slow things down a bit, but
after 16+ minutes (16:41.54) the strace output was 535MiB.

If I tailed the strace, I saw lots of repetitive output, reading the
same chunks of data from the kbx.  After killing it:

$ grep '^open(' strace.foo | sort | uniq -c
[...]
   3382 open("/home/pdp/.gnupg/pubring.kbx", O_RDONLY) = 10
      1 open("/home/pdp/.gnupg/pubring.kbx", O_RDONLY) = 3
      1 open("/home/pdp/.gnupg/pubring.kbx", O_RDONLY) = 4
      1 open("/home/pdp/.gnupg/pubring.kbx", O_RDONLY) = 7

Packages all built by me, under clean VMs, configure flags available if
desired.  Aside from install-location, it boils down to gmp gets
--enable-fat, some gnutls bits, and gnupg22 gets:
        "--disable-nls",
        "--disable-ldap",
        "--enable-noexecstack",
        "--enable-key-cache=16384",
        "--enable-wks-tools",

If I look at the successful dump on the beefier machine, then:

% grep -c '^pub:' foo.5
5338
% grep -c '^uid:' foo.5
16927

I rebuilt GnuPG with --enable-key-cache=32768 and it hasn't helped.  The
latest attempt is 12 minutes in and still running, with the output file
being 1032192 bytes large, it should be 3648012 when done.  That's a
long time, just to dump information.

Package versions:

    ii  optgnupg-gmp                6.1.2-pt2
    ii  optgnupg-gnupg              2.2.3-pt2
    ii  optgnupg-gnutls             3.5.16-pt2
    ii  optgnupg-libassuan          2.4.5-pt1
    ii  optgnupg-libgcrypt          1.8.1-pt1
    ii  optgnupg-libgpg-error       1.27-pt1
    ii  optgnupg-libksba            1.3.5-pt1
    ii  optgnupg-nettle             3.4-pt1
    ii  optgnupg-npth               1.5-pt1
    ii  optgnupg-pinentry           1.0.0-pt3

Thanks,
-Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 996 bytes
Desc: Digital signature
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20171202/691884ce/attachment-0001.sig>


More information about the Gnupg-users mailing list