From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id OALzGH7OOGa4MgEA62LTzQ:P1 (envelope-from ) for ; Mon, 06 May 2024 14:35:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id OALzGH7OOGa4MgEA62LTzQ (envelope-from ) for ; Mon, 06 May 2024 14:35:10 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EZpismFW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714998910; a=rsa-sha256; cv=none; b=apDKYYCWOQ1KvMfEEshfJnvPD7/YQaiLT6lLYHyn5SB4T2bejDxrECulg/gCoPHJHEXZvx WYTkFp8a3EMn+6qCDmiISgtZpU9QqAN5bcLmVnkU9hwgapdEYFRybRl2FZu4zoUMsGDkhM 2o6lEyrPsNCrcFZq2iOnudeqEdg+MGpqwTldUorNeIzHHew/w8/I2fd0rJZyVF6ekdB90p aDn9dyX3J1hJ+CzMT5fNZEjSkcq1KSTAy7yfqUSTVm/rwmdv+RmT5XNiQAECdXS9BmoGa2 8YcQMvAuPKPNHul7dCE0pzDRMPjAngGCEYtd3Vw0b+nkEtW1B4dTF9AVzlzLqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EZpismFW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714998910; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=pn/i2hsq2j98XWj73fU4imPTs7ARcxp+fmpLAkMdcL8=; b=qjAkHaIA4XST/R0d/GG4+fMcw4bPX8CZVw60SoH0LQ3EYQxRZmh7Y4o32h2rMMbrVV6guQ IpAGTrdODVeyvX3K0Ejp+P7ZWEpW/EyyNn1B+OAE+DUZD1OJyK4XqwQwxVBYCTuF7GfoWe wVNHszz22nag7hGKuXJaMZcPlojwK2DyDHTRNdiRIPfQWyEFMc+v1c26cprX5aQCZTxIQf B4ESEHDMDryn728S3sH6c0A5jR0VRa4kA/mXn/lEJcQ52oealN63dPnNrWuafq+Dn1rrgW 03CS9K4TxkOnb0mexKFhehagwutTQeEmkAmGrwAzkmTV6oEeuhWNlxRLXTgqNg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3509521967 for ; Mon, 6 May 2024 14:35:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3xYL-0006sN-BN; Mon, 06 May 2024 08:34:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3xXw-0006Se-9e for help-guix@gnu.org; Mon, 06 May 2024 08:34:20 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3xXu-0007xn-Ic; Mon, 06 May 2024 08:34:20 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-51efd2728e3so386985e87.2; Mon, 06 May 2024 05:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714998856; x=1715603656; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=pn/i2hsq2j98XWj73fU4imPTs7ARcxp+fmpLAkMdcL8=; b=EZpismFWIkD0to5g4cLZ532XDgWivOIULAAvoOl5ma2aMWaw3AlQUnDp7ZTZVyYcCY cJy9IuxP204cDMaBSjhPJTQnfkHFzIMfMlfUP/Dq+fNRqqefXFKP+b/OkGigaHm+LWS/ NIHeNljSqa6RN+oVpHVYHT6Z2uyzjBOfQAdy2qeUKN9wkk5RAmgeUd9AgtmkclT46eFp CKsdyudMaNfCQ4Gn1X1ECaJf6NI6siJA73Kue9FzLR3XbS4Y58Nnx+fM7iQnbCgJOAhQ 0yhtTFF6qyuW5XR+WhDJmBZ/NT3fC2uwkesVzVL9HVLo+nNKqug2almmZxVDu6Pg5pKO WTVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714998856; x=1715603656; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pn/i2hsq2j98XWj73fU4imPTs7ARcxp+fmpLAkMdcL8=; b=lK3U4ibv7ElR+LvjKD49zMZoWU31RMbE7aKumJBLD47+yiYs+grLY7Ske7BcY2yph2 Siv0Nj+hTRX0AZ1b4z83vSRr/XOAVyCZmM+BeTB7iZ+IgGwJ6Grn2/MA+J85bY6pdiqR upDMtn0/Yfqc+rsGfyBx5znPl53WjVTbuUlqlmpQPBrF6a3ZREcWhyOwP1A724dgnCT6 5vcIW1BuG5dWjz/f/jKuWG1d2FC+0H9XBa8hEMhM/5YIxByVSJFzWOFLRfqZm41inqoc Jv2rsk0iv0pEiuH1W1LVJgPrkSi5Nm9+6K+r5VbwNBcK68Meb4GDAY70ifBhHwQthAFA jmvQ== X-Forwarded-Encrypted: i=1; AJvYcCVJxiacH90S8lEn6G/0emiDu676+uD7liRzWa5F/64zd74KTINyPXlYtCGCeSd0Ug6vjMMshvjUTdjWAY+hD1+TMQ== X-Gm-Message-State: AOJu0YwnNi/ICy0tph9zrOe9tn+8HPEsQRFBpVmYF0i9x4xdgIUR5e7Z bBQGNvLy33cn2T3kqyZp9/VCyQ+ESap284Sgst95T8l5zdTH8Y4MdSzCMA== X-Google-Smtp-Source: AGHT+IHJstuqA5WnlxtEQPncqmvXhNJOyAj1uMV8ruFe7e59oX/tV47HSG/Ix6K93bi4+HhJhV2KKQ== X-Received: by 2002:a2e:87c9:0:b0:2e2:9416:a650 with SMTP id v9-20020a2e87c9000000b002e29416a650mr4572268ljj.3.1714998855775; Mon, 06 May 2024 05:34:15 -0700 (PDT) Received: from lili (roam-nat-fw-prg-194-254-61-43.net.univ-paris-diderot.fr. [194.254.61.43]) by smtp.gmail.com with ESMTPSA id g9-20020a05600c4ec900b0041c542636bcsm19571913wmq.44.2024.05.06.05.34.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 05:34:15 -0700 (PDT) From: Simon Tournier To: Denis 'GNUtoo' Carikli , help-guix@gnu.org Cc: Adrien 'neox' Bourmault Subject: Re: Guix as a non-optional dependency in another project, and Guix resources requirements. In-Reply-To: <20240316020307.6bf7335c@primary_laptop> References: <20240316020307.6bf7335c@primary_laptop> Date: Mon, 06 May 2024 14:34:01 +0200 Message-ID: <87jzk7p1ae.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=zimon.toutoune@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 3509521967 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.71 X-Spam-Score: -9.71 X-TUID: 7NiiyAn7f3jK Hi Denis, On sam., 16 mars 2024 at 02:03, Denis 'GNUtoo' Carikli 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: =E2=80=9CComputing Guix derivation= =E2=80=9D. Then the rest is substitutable. Here, we could also speak network requirements but that=E2=80=99s another story. ;-) I have never measured the RAM requirement of this step. I would be surprised if it=E2=80=99s more than 2GiB=E2=80=A6 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 =E2=80=9Cguix publish=E2=80=9D. Do not take me wrong about the substitutes. You only need the result of some derivations (see =E2=80=99compile-guix=E2=80=99 procedure in (guix sel= f) module); the ones that =E2=80=9Cguix pull=E2=80=9D 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 =E2=80=9CComputing Guix derivation=E2= =80=9D? Cheers, simon