unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Substituting in parallel to save time?
@ 2018-11-07 21:26 Leo Famulari
  2018-11-07 22:17 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Famulari @ 2018-11-07 21:26 UTC (permalink / raw)
  To: guix-devel

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

Substitution honors the --max-jobs argument to the guix-daemon, which
means that, by default, substitutes are downloaded in sequence, one at a
time.

I noticed that in many cases, it takes longer to set up the substitution
than to actually download the substitute on my 30 Mbps downlink.

The effect is that it might take a few minutes to to download a few
dozen small substitutes, which may only total 5 megabytes of data, even
though my connection to the substitute server is fast enough that it
should only take a few seconds.

So, it benefits me to increase max-jobs for substitute downloads.
However, I rarely want to actually build packages in parallel; one
package build may fully load my system.

Currently, is it possible to distinguish between substitute downloads
and builds? Maybe it would be an overall performance win to download
substitutes in parallel, in tune with parallel-job-count.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Substituting in parallel to save time?
  2018-11-07 21:26 Substituting in parallel to save time? Leo Famulari
@ 2018-11-07 22:17 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2018-11-07 22:17 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Hi!

Leo Famulari <leo@famulari.name> skribis:

> I noticed that in many cases, it takes longer to set up the substitution
> than to actually download the substitute on my 30 Mbps downlink.

Yeah.

> The effect is that it might take a few minutes to to download a few
> dozen small substitutes, which may only total 5 megabytes of data, even
> though my connection to the substitute server is fast enough that it
> should only take a few seconds.
>
> So, it benefits me to increase max-jobs for substitute downloads.
> However, I rarely want to actually build packages in parallel; one
> package build may fully load my system.
>
> Currently, is it possible to distinguish between substitute downloads
> and builds? Maybe it would be an overall performance win to download
> substitutes in parallel, in tune with parallel-job-count.

No, they cannot be distinguished.

I’d be in favor of a solution where ‘guix substitute’ is kept alive
across substitutions (like what happens with ‘guix substitute --query’),
which would allow it to keep connections alive and thus save the TLS
handshake and a few extra round trips per download.

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-07 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-07 21:26 Substituting in parallel to save time? Leo Famulari
2018-11-07 22:17 ` Ludovic Courtès

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).