all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel <Guix-devel@gnu.org>
Subject: Re: Performance improvements
Date: Mon, 28 Oct 2019 09:56:13 +0200	[thread overview]
Message-ID: <20191028075613.GA20762@E5400> (raw)
In-Reply-To: <87pnihg55a.fsf@gnu.org>

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

On Mon, Oct 28, 2019 at 12:06:25AM +0100, Ludovic Courtès wrote:
> Hi!
> 
> Some more improvements come from these commits:
> 
>   ac19950507 gnu: bootstrap: Cache the 'bootstrap-executable' origins.
>   5166d02730 gnu: bootstrap: 'bootstrap-origin' preserves eq?-ness when no changes are made.
>   d727a9343d derivations: Don't memoize 'derivation->bytevector'.
>   f5fca9a82c gexp: Cache the module to derivation mappings.
>   c57e417eff store: Allow objects in the cache to be inserted and search for with 'equal?'.
>   f58b45350b gexp: Add 'imported+compiled-modules'.
>   f726f6f802 derivations: 'build-expression->derivation' caches its module derivations.
>   cf7648f882 derivations: Introduce 'imported+compiled-modules'.
> 
> This caches the module-to-derivation mapping, which wasn’t cached until
> now.
> 
> Overall the goal is to have the high-level caches work nicely (the
> “object cache” in particular), rendering the low-level caches (such as
> the ‘add-data-to-store’ cache) potentially useless.  This is beneficial
> because a cache hit on the object cache saves more CPU time than a cache
> hit on a low-level cache.
> 
> Ludovic Courtès <ludo@gnu.org> skribis:
> 
> > $ time guix build libreoffice -nd
> > /gnu/store/8drmbhsrayr2j5lkvrwq37rg8g06hgsw-libreoffice-6.1.5.2.drv
> >
> > real    0m2.142s
> > user    0m2.323s
> > sys     0m0.082s
> > $ guix describe
> > Generacio 110   Oct 14 2019 08:43:33    (nuna)
> >   guix bd04fe8
> >     repository URL: https://git.savannah.gnu.org/git/guix.git
> >     branch: master
> >     commit: bd04fe878627a14533d908ccdf5b906050d6e0a4
> 
> And now:
> 
> --8<---------------cut here---------------start------------->8---
> $ time /tmp/new/bin/guix build libreoffice -nd
> /gnu/store/ibzap0v1c367h0j2mdd2jmlsfx9jplfb-libreoffice-6.1.5.2.drv
> 
> real    0m1.658s
> user    0m1.699s
> sys     0m0.073s
> $ /tmp/new/bin/guix describe
> Generacio 1     Oct 28 2019 00:03:05    (nuna)
>   guix 271b3c9
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: 271b3c9d16f8880f4a27b52a615cdec611322fae
> --8<---------------cut here---------------end--------------->8---
> 

Results are even better on a slower machine:

$ time guix build libreoffice -nd
/gnu/store/ibzap0v1c367h0j2mdd2jmlsfx9jplfb-libreoffice-6.1.5.2.drv

real    0m5.408s
user    0m5.186s
sys     0m0.299s

$ time ./pre-inst-env guix build libreoffice -nd
/gnu/store/ibzap0v1c367h0j2mdd2jmlsfx9jplfb-libreoffice-6.1.5.2.drv

real    0m3.836s
user    0m3.519s
sys     0m0.235s

$ guix describe
Generation 12   Oct 27 2019 11:53:42    (current)
  ietf 8c6079e
    repository URL: https://gitlab.com/efraim/guix-ietf.git
    branch: master
    commit: 8c6079e10fdf640ce2cdafa3c1ea24961650f451
  guix 24adcba
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 24adcbab0ad903c59793dbe141950fff5058b8a2

$ ./pre-inst-env guix describe
Git checkout:
  repository: /home/efraim/workspace/guix
  branch: master
  commit: 64e3fe04b32e2eab1144d5b0c9278eab81056bd6



-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

      parent reply	other threads:[~2019-10-28  7:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 21:39 Performance improvements Ludovic Courtès
2019-10-15  6:35 ` Pierre Neidhardt
2019-10-15  7:24 ` Jan Nieuwenhuizen
2019-10-19 20:17   ` Ludovic Courtès
2019-10-15  8:21 ` Dimakakos Dimos
2019-10-15 18:21 ` Efraim Flashner
2019-10-19 20:17   ` Ludovic Courtès
2019-10-27 23:06 ` Ludovic Courtès
2019-10-28  7:44   ` Pierre Neidhardt
2019-10-28  7:56   ` Efraim Flashner [this message]

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=20191028075613.GA20762@E5400 \
    --to=efraim@flashner.co.il \
    --cc=Guix-devel@gnu.org \
    --cc=ludo@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.