From: Maxime Devos <maximedevos@telenet.be>
To: Csepp <raingloom@riseup.net>, Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: substitute derivation: also substitute grafts?
Date: Thu, 15 Sep 2022 17:06:31 +0200 [thread overview]
Message-ID: <50888e79-4d5e-8c66-b318-975e0d170aca@telenet.be> (raw)
In-Reply-To: <87o7vgg0e3.fsf@riseup.net>
[-- Attachment #1.1.1: Type: text/plain, Size: 1524 bytes --]
On 15-09-2022 16:46, Csepp wrote:
>
> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> [...]
>> Did I say *all items*? Well, … grafts are not included, because graft
>> derivations are marked as not substitutable.
>>
>> Can we change that conditionally? I would really like to avoid having
>> to build grafts on B when they have already been built on A.
>
> I would love this too, because IO can be incredibly slow on HDDs and
> large packages. My netbook would be thankful.
>
There are some some opportunities for optimizations in the grafting code
before substituting more -- for example, to avoid seek times, it would
be possible to rewrite multiple files concurrently (maybe using
'par-for-each' to process each file in a directory in parallel).
This is already done in (guix build grafts), except that:
* 'find-files' itself is not parallelised, even though parallelising it
could potentially reduce the time spent seeking (*)
* it uses (parallel-job-count), which is (IIUC) 1 by default because
--cores=1 by default. As grafts are more IO intensive than CPU
intensive, maybe it would be reasonable to impose a _minimum_ amount
of parallelism, I don't, know, 2 or 4 or so?
(I'm assuming the main problem here is seek times.)
Also combinable with the proposal of having substitutes for grafts.
Greetings,
Maxime.
(*) IIUC, the time for N parallel seeks should, in theory, ≃ 1 seek, for
small values of N, because of elevator algorithms.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2022-09-15 15:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 12:58 substitute derivation: also substitute grafts? Ricardo Wurmus
2022-09-15 14:46 ` Csepp
2022-09-15 15:06 ` Maxime Devos [this message]
2022-09-15 17:43 ` Csepp
2022-09-15 17:51 ` Maxime Devos
2022-09-19 16:26 ` Josselin Poiret
2022-09-19 16:57 ` Maxime Devos
2022-09-19 22:00 ` Ricardo Wurmus
2022-10-01 16:43 ` Ludovic Courtès
2022-10-01 17:29 ` Ricardo Wurmus
2022-10-01 18:00 ` Tobias Geerinckx-Rice
2022-10-01 18:27 ` Ricardo Wurmus
2022-10-05 10:03 ` Ludovic Courtès
2022-10-05 11:41 ` zimoun
2022-10-07 22:21 ` Mark H Weaver
2022-10-10 15:32 ` Ludovic Courtès
2022-10-10 15:55 ` zimoun
2022-10-10 17:50 ` Ricardo Wurmus
2022-10-05 12:53 ` Ricardo Wurmus
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=50888e79-4d5e-8c66-b318-975e0d170aca@telenet.be \
--to=maximedevos@telenet.be \
--cc=guix-devel@gnu.org \
--cc=raingloom@riseup.net \
--cc=rekado@elephly.net \
/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).