unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Mekeor Melire <mekeor@posteo.de>
Cc: guix-devel@gnu.org
Subject: Re: Speed up package installation by using images instead of archives (like distri)?
Date: Sat, 17 Apr 2021 17:49:52 +0200	[thread overview]
Message-ID: <878s5gud0f.fsf@gnu.org> (raw)
In-Reply-To: <c8bb541132f5c50a757a2b0e517deb4f@posteo.de> (Mekeor Melire's message of "Sun, 04 Apr 2021 13:59:18 +0200")

Hi!

Mekeor Melire <mekeor@posteo.de> skribis:

> In contrast, distri downloads the package as an (squashfs)
> image. That's it. The image will then be mounted (which is not an
> expensive IO operation) as a read-only virtual-file-system. (But as
> it's not recommendable to mount as many images as there are installed
> packages, distri mounts the package-images lazily, i.e. right before
> they are being used.)
>
> (At least, the above explanation reflects my understanding.)
>
> Thus, I wonder: (0) Does it make sense to make Guix follow this idea
> as well? I.e. should we make Guix install packages by downloading
> images and mounting those instead of extracting archives? (1) Does
> this even fit into Guix technically? I.e. how hard would it be to
> implement this? (2) And would it even be worth it? I.e. how much
> faster would Guix become?

The Guix blog post mentions squashfs images, suggesting it’s not
transposable to Guix.  :-)

Specifically, there are several practical issues if you think about what
it would take to mount squashfs images instead of extracting things:
you’d have one mount point per store item? how does that interact with
GC?  what about GNU/Hurd support?  I view it as a can of worms, if it’s
workable at all.

Would it be faster?  Like other proposals in the distri talk, it’s all
about doing things lazily instead of eagerly.  In this case,
decompression happens lazily instead of eagerly.  I think that could
make application startup on a cold cache slower, precisely because that
work has to happen anyway.  More importantly, mounting all these
squashfs images at boot time could be costly.

Looking at the big picture, with zstd substitutes available, the main
speed issues in Guix are elsewhere.  What would make a big difference is
if we didn’t have to download (or build) that much so often.  This is
what the end of the blog post hints at.

HTH!

Ludo’.


      reply	other threads:[~2021-04-17 15:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-04 11:59 Speed up package installation by using images instead of archives (like distri)? Mekeor Melire
2021-04-17 15:49 ` Ludovic Courtès [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

  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=878s5gud0f.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mekeor@posteo.de \
    /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).