unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: zimoun <zimon.toutoune@gmail.com>, "Ludovic Courtès" <ludo@gnu.org>
Cc: 50384@debbugs.gnu.org
Subject: [bug#50384] [PATCH v2] Optimise search-patch (reducing I/O)
Date: Mon, 06 Sep 2021 12:06:00 +0200	[thread overview]
Message-ID: <3491bccdaa15281fa254c2b788121cb42ea81adb.camel@telenet.be> (raw)
In-Reply-To: <864kayjdwz.fsf@gmail.com>

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

zimoun schreef op ma 06-09-2021 om 10:39 [+0200]:
> Hi Maxime,
> 
> Thanks for looking at optimising stuff. :-)
> 
> On Sun, 05 Sep 2021 at 21:48, Maxime Devos <maximedevos@telenet.be> wrote:
> 
> > Let's compare the numbers again!  This time, I've run
> > 
> > echo powersave |sudo tee /sys/devices/system/cpu/cpufreq/policy{0,1,2,3}/scaling_governor
> > 
> > to make sure the CPU frequency doesn't change.  On a hot (disk) cache:
> > 
> > # After the patch series
> > time GUIX_PROFILING="rpc gc" ./the-optimised-guix/bin/guix build -d --no-grafts pigx
> 
> [...]
> 
> > So on a hot disk cache, there doesn't appear to be any improvement
> > (except for ‘time spent in GC’ -- presumably that's due to the optimisations
> > to guix/base32.scm).
> 
> Which kind of disk do you have?  SSD, spinning HDD, other?

A spinning disk, presumably a HDD.  FWIW, it's a ‘TOSHIBA MQ01ABD100 (AX1P2C)’
that has been ‘on’ for 10 months and 10 days, according to ‘SMART-data and selftests’
I just noticed it has ‘2304 bad sectors’.  Maybe I should make backups and run file
system checks?

> 
> > What about a cold cache?
> > 
> > # After the patch series
> > 
> > sync && echo 3 | sudo tee /proc/sys/vm/drop_caches
> > ./the-optimised-guix/bin/guix --help
> > time GUIX_PROFILING="rpc gc" ./the-optimised-guix/bin/guix build -d --no-grafts pigx
> > /gnu/store/fq6x8d2vcm6sbjkimg7g8kcgb4c5xv1b-pigx-0.0.3.drv
> > Remote procedure call summary: 5949 RPCs
> >   built-in-builders              ...     1
> >   add-to-store                   ...     3
> >   add-to-store/tree              ...    26
> >   add-temp-root                  ...   195
> >   valid-path?                    ...   195
> >   add-text-to-store              ...  5529
> > Garbage collection statistics:
> >   heap size:        93.85 MiB
> >   allocated:        312.03 MiB
> >   GC times:         17
> >   time spent in GC: 3.37 seconds (23% of user time)
> > 
> > real	1m39,178s
> > user	0m14,557s
> > sys	0m0,990s
> 
> How the average (against 3 examples) looks like?

I'll try to optimise more things and report the average for the v3. 

> > It seems that if the disk cache is cold, the time-to-derivation decreases
> > a little by this patch series.  Much less than I had hoped for though; I'll
> > have to look into other areas for interesting performance gains ...
> 
> Please update the number using your diff showed in [1]. :-)
> 
> 
> 1: <http://issues.guix.gnu.org/50384#4>

Are you referring to:

> Oops, I forgot to include the following change to build-aux/compile-all.scm:
>       (or (not (file-exists? go))
>           (file-mtime<? go file)
> -          (any (cut file-mtime<? go <>) extra-dependencies))))
> +          (any (lambda (dependency)
> +               (or (not (file-exists? dependency))
> +                   (file-mtime<? go dependency))) extra-dependencies))))

That's compilation-time only, so that cannot affect the timing of "guix build -d ...".

Geetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2021-09-06 10:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-04 21:17 [bug#50384] [PATCH] Optimise search-patch (reducing I/O) Maxime Devos
2021-09-04 21:47 ` Ludovic Courtès
2021-09-04 22:04 ` Ludovic Courtès
2021-09-05 19:48   ` [bug#50384] [PATCH v2] " Maxime Devos
2021-09-05 22:40     ` Maxime Devos
2021-09-06  8:39     ` zimoun
2021-09-06 10:06       ` Maxime Devos [this message]
2021-09-09 14:51     ` [bug#50384] [PATCH] " Ludovic Courtès
2021-09-21 16:55       ` [bug#50384] [PATCH v4] " Ludovic Courtès
2021-09-23 17:26         ` Maxime Devos
2021-09-27 16:17           ` Ludovic Courtès
2021-10-04 16:46             ` [bug#50384] [PATCH] " zimoun
2021-10-08  7:41               ` Ludovic Courtès
2021-10-11  8:09                 ` [bug#39258] bug#50384: " zimoun
2021-09-09 20:25 ` [bug#50384] [PATCH v3] " Maxime Devos
2021-09-10  9:54   ` bug#50384: " Maxime Devos

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=3491bccdaa15281fa254c2b788121cb42ea81adb.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=50384@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).