all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>, help-guix@gnu.org
Cc: Adrien 'neox' Bourmault <neox@gnu.org>
Subject: Re: Guix as a non-optional dependency in another project, and Guix resources requirements.
Date: Mon, 06 May 2024 14:34:01 +0200	[thread overview]
Message-ID: <87jzk7p1ae.fsf@gmail.com> (raw)
In-Reply-To: <20240316020307.6bf7335c@primary_laptop>

Hi Denis,

On sam., 16 mars 2024 at 02:03, Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:

> - First and most importantly, running 'guix pull' can fail sometimes,
>   especially if there is not enough RAM per core. A fix that work is to
>   lower the number of cores used with 'guix pull -c 1 -M 1' for
>   instance.
>
>   But the issue is that I'm unsure how much RAM per core is needed.
>   Maybe 2GiB or 3GiB? Also if users have heavy desktop usage
>   (browser(s) with a ton of tabs open) could that value change?
>
>   I could ask help from GNU Boot users for testing to find that value
>   but maybe the Guix community already knows more about this.
>
>   The big downside of my approach here is that if for some reason the
>   script I made uses a 'memory per core' value that is too low, it
>   would probably makes things way more difficult for contributors than
>   having to read the Guix manual upfront in the first place, because it
>   would fail and they won't understand why. So they'd need to
>   understand both Guix, the code I wrote, and what caused the issue.
>
> - If Guix was already installed on a host distribution, I'm not sure
>   how to handle substitutes. Ideally I'd like to be able to enable them
>   just for GNU Boot and not change the way they are handled for other
>   Guix usage. Also if substitutes are not used it probably affect the
>   amount of RAM per core required.
>
>   One way around here could be to build Guix ourselves and somehow find
>   a way to have different defaults, but building that Guix could
>   probably a long time.

Well, from my understanding, with or without substitutes is the key
here.  Without substitutes, yeah we hit the Guile compilation
boundaries, especially about RAM.

With substitutes, the story is different. :-)

The only operation that is expensive is: “Computing Guix derivation”.
Then the rest is substitutable.  Here, we could also speak network
requirements but that’s another story. ;-)

I have never measured the RAM requirement of this step.  I would be
surprised if it’s more than 2GiB… but who know! :-)

Your users do not need to run a complete Guix but only something that
can be determined beforehand and compliant with the rest of your
project.

Somehow, you have two choices:

 + Rely on substitutes from Guix project.  The advantage is that you
 have nothing to do, just invoke the right command with your custom
 script.  The main drawback is that your script is subject to Guix
 project policy when deleting substitutes.  To my knowledge, this policy
 is clear but the effects are hard to predict.

 + Serve your own substitutes.  The advantage is that you control which
 substitutes are available.  The drawback is that you need to setup
 “guix publish”.

Do not take me wrong about the substitutes.  You only need the result of
some derivations (see ’compile-guix’ procedure in (guix self) module);
the ones that “guix pull” builds.

Doing that, your script might pinpoint a specific Guix revision and you
also serve the substitute requirements for that revision.

Bah the first question is the RAM of “Computing Guix derivation”?

Cheers,
simon


      parent reply	other threads:[~2024-05-06 12:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-16  1:03 Guix as a non-optional dependency in another project, and Guix resources requirements Denis 'GNUtoo' Carikli
2024-03-20 12:15 ` pelzflorian (Florian Pelz)
2024-03-21 16:26   ` Adrien 'neox' Bourmault
2024-03-21 16:35     ` Adrien 'neox' Bourmault
2024-03-22  0:16       ` Denis 'GNUtoo' Carikli
2024-04-08 15:52         ` Andreas Enge
2024-04-08 20:32           ` Felix Lechner via
2024-04-11 15:36             ` Andreas Enge
2024-04-11 17:32               ` Felix Lechner via
2024-04-09  9:33           ` pelzflorian (Florian Pelz)
2024-04-09 12:23             ` Felix Lechner via
2024-03-22  0:52   ` Denis 'GNUtoo' Carikli
2024-03-22  9:17     ` pelzflorian (Florian Pelz)
2024-03-25  0:26       ` Denis 'GNUtoo' Carikli
2024-03-25 17:34         ` pelzflorian (Florian Pelz)
2024-03-27  1:28           ` Denis 'GNUtoo' Carikli
2024-03-27 11:22             ` pelzflorian (Florian Pelz)
2024-04-01 22:02               ` Denis 'GNUtoo' Carikli
2024-05-06 12:34 ` Simon Tournier [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=87jzk7p1ae.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=GNUtoo@cyberdimension.org \
    --cc=help-guix@gnu.org \
    --cc=neox@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.