all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
To: 41702@debbugs.gnu.org
Subject: bug#41702: `guix environment` performance issues
Date: Thu, 4 Jun 2020 10:23:16 +0200	[thread overview]
Message-ID: <20200604082316.GA3146@zpidnp36> (raw)

[-- Attachment #1: Type: text/plain, Size: 2090 bytes --]

Hi,

I’ve noticed that `guix environment` can be very very slow for some packages.
Whereas usually a call like

	time guix environment --ad-hoc <package> -- true

takes 600ms to 1.5s, it takes 8.4s for the package r-learnr on my Ryzen 5 3600
with NVMe SSD, 32G of RAM and a warm cache. This seems to accumulate when
trying to install multiple unrelated “slow” packages into the same environment,
i.e. jupyter (2.9s) + r-rlearnr (8.4s) + r-stm (2.9s) = 12.1s. What these
packages seem to have in common is a deep chain of propagated inputs.

And in fact, if I create artificial test packages where test-999 propagates
test-998, test-998→test-997 and so on the command above takes 1m 9s. A single
package propagating 999 packages takes 4.5s.

Instrumenting guix-environment’s with-store call with statprof I see a lot of
time is spent in the garbage collector:

Total time: 24.672604202 seconds (19.431122691 seconds in GC)
./pre-inst-env guix environment --ad-hoc r-learnr -- true  25,18s user 0,24s system 308% cpu 8,248 total

More specifically in an anonymous function and reap-pipes, which is a gc hook,
I believe:

%     cumulative   self
time   seconds    seconds   calls   procedure
 33.41     14.49      8.24                            anon #xbb8480
 27.95      6.90      6.90                            ice-9/popen.scm:145:0:reap-pipes
  4.37      1.08      1.08                            anon #xbbdcd8
  3.28      0.86      0.81                            ice-9/vlist.scm:539:0:vhash-assq
  2.40      2.37      0.59                            guix/grafts.scm:202:22

Not sure if that helps tracking the issue down though.

Cheers,
Lars

PS: Here’s `guix describe`:
Generation 1	Jun 03 2020 10:38:17	(current)
  guix 9ab2790
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 9ab2790e2acf872c0f2cf41ec180de80d1eee3f3
  zpid bab33c1
    repository URL: https://github.com/leibniz-psychology/guix-zpid.git
    branch: master
    commit: bab33c19e0f0304d7aa82751653eb85d8cad8c0a


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

             reply	other threads:[~2020-06-04  8:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  8:23 Lars-Dominik Braun [this message]
2020-06-06 16:08 ` bug#41702: `guix environment` performance issues Ludovic Courtès
2020-06-06 21:40   ` Ludovic Courtès
2020-06-08  9:04   ` Lars-Dominik Braun
2020-06-08 21:59     ` Ludovic Courtès
2020-06-09  9:15       ` Lars-Dominik Braun
2020-06-27 21:20         ` Ludovic Courtès
2020-06-30  9:59           ` Lars-Dominik Braun
2020-07-01 10:49           ` Ludovic Courtès
2020-07-01 11:24             ` Lars-Dominik Braun
2020-07-01 21:53               ` Ludovic Courtès
2020-07-02  7:00                 ` Lars-Dominik Braun
2020-07-02 12:03                   ` Lars-Dominik Braun
2020-07-06  8:49                     ` Ludovic Courtès
2020-07-06 12:58                       ` Lars-Dominik Braun
2020-07-20  9:50                         ` Lars-Dominik Braun
2020-07-20 21:51                           ` Ludovic Courtès
2020-10-22 21:03                             ` Maxim Cournoyer
2020-10-23  7:26                               ` Lars-Dominik Braun
2020-10-23 13:07                                 ` bug#44175: [optimization] Grafting is too slow Maxim Cournoyer
2020-10-23 21:17                                   ` Ludovic Courtès
2020-10-25  2:33                                     ` Maxim Cournoyer
2020-10-25 16:43                                       ` Ludovic Courtès
2020-10-26  7:56                                         ` Lars-Dominik Braun
2020-10-23 14:51                                 ` bug#41702: `guix environment` performance issues Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200604082316.GA3146@zpidnp36 \
    --to=ldb@leibniz-psychology.org \
    --cc=41702@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.