From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id UHBeBIWQeWae0wAAe85BDQ:P1 (envelope-from ) for ; Mon, 24 Jun 2024 15:28:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id UHBeBIWQeWae0wAAe85BDQ (envelope-from ) for ; Mon, 24 Jun 2024 17:28:05 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=rdklein.fr header.s=zoho header.b=GNlOa+7c; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=pass ("zohomail.eu:s=zohoarc:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719242885; 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=GtXoLOIo8Zw3FMhScNmp0Z3IoDfHEelvG2ubsJ/GILg=; b=eUXKj7PLs514E5TbOCADvTrobZBQ5ro/Ozs6Du77CYCtb2i629FsbQ5IWJERXPFZJjseic SdbSWkYq+7k+GJbF1TDy//2vNDD7Odiyr8qEGBkr/2Yf7z0PMIJP0e8y9yWbMm6LyBToEv uxZtdzQGQObS/ggdngn3K+mwz7xrAkFPr55IaPUDIa3KgubA9NQtSG0f/hwqpexxV4h1IV G7bvAkPrdeFU0ZwZN/kjMJtnp3iedlN3NFebT/jVpP0xbvSaeJx1/GwWgGKQfZnChr5n7z fxBbO959WlI9hw6QSdtsqU7FidLdxcdAgO0k+f7B3W1g84I088/51QbFa0Bzhw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=rdklein.fr header.s=zoho header.b=GNlOa+7c; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=pass ("zohomail.eu:s=zohoarc:i=1") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1719242885; a=rsa-sha256; cv=pass; b=TLK4seg1TahhlrbfxTL7758YjsTJSHBtfAGtjX+nS56C+MQUZTrvmAjkEG1MSdUTTwWFzA Xr330+3kRw6jW6uaw6I9N/WacmZOuKrULllzBG68G4wPhD7KHSXjrrACkmfZ008bO10NcX LsRS8vaZPIVfV+kHSAtdURBG1dbkEslHORG7dXrr35CQUTFOpO8rxKEuXehgFbsNgBDslO 0upaM4/KSp5FReBjm3jc4O88jkdOOZrZMMM1KC+quNhCT+Yr2nM98lMg5JKj0haP3IhAll CeO97KMww2W4TzGWAAbWQKx7MRc3Qti6c+SKV6ssAr0XIGOozDaGRSZ8hEc1tQ== 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 91BE181CE for ; Mon, 24 Jun 2024 17:28:02 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLlaz-0005lH-P8; Mon, 24 Jun 2024 11:27:05 -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 1sLlaw-0005kX-Fm for guix-devel@gnu.org; Mon, 24 Jun 2024 11:27:02 -0400 Received: from sender-op-o11.zoho.eu ([136.143.169.11]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLlaq-0008Tj-Gu for guix-devel@gnu.org; Mon, 24 Jun 2024 11:26:59 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1719242810; cv=none; d=zohomail.eu; s=zohoarc; b=JAJgVYv0KudeclpTmqY1HeG7ey9BozIEtnSkoHFEJKnm1cNVTAtudYkT3Bo5nu+Fxjo/ZPW4N/b1LxXvRrx1bUYe+KzCWok2EzPFt2G1BkXlAygk2zoilL2VGighPDvDFpjZNYapUDb1Cfbv9BOdIJdFUj8WNvRBkoZXZ62RLnA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1719242810; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=GtXoLOIo8Zw3FMhScNmp0Z3IoDfHEelvG2ubsJ/GILg=; b=k/xAEY9M3JKaweXvoaeBryLL+rn4mHzLUGx90AMYmgSij/IilpOG2IaZBvYc99wEoNnrT/Qj4N6p0DyEnf+5sbEXjmxnhBGJxT60pS8vqSCTA0V3kQF1FUABBQFuxZAJHPt2NowQIiRK44uKRKj7YfzdX3TLhKAbC2kJ/X65jHA= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=rdklein.fr; spf=pass smtp.mailfrom=edou@rdklein.fr; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1719242810; s=zoho; d=rdklein.fr; i=edou@rdklein.fr; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=GtXoLOIo8Zw3FMhScNmp0Z3IoDfHEelvG2ubsJ/GILg=; b=GNlOa+7cFi2nIgAo9OMNI+nf2bGzBqUpopUTuAtySyvksO/f1IVwKC+vv30g9XFA C4VrqfLvwg961wdtnbJFP8z9kyKZOC96oUBRMxGEC/l5xMfnajXwIQusN60DEoKxR+m 4uS84UYxPo0PHjtvV5S2kysE3mctBpaiYQiTclphdqJACTabiyHXEGNyuBbokwWKNjf 2XhPdug4Q/low2Hu9uA1dqUWTB/Ux0pVj+/LTKmmCAzOBkta8K9IbRM4Ft5eUMaC66h Re1EEYVoJ3GPgeW0EtVbxS4gvFrwUVv0I5muuvfSImk28Wq48H5x94XZQHxJG8nEIbw oFYk/oDeoA== Received: by mx.zoho.eu with SMTPS id 1719242807526795.4130146348054; Mon, 24 Jun 2024 17:26:47 +0200 (CEST) References: <874jb16993.fsf@rdklein.fr> <5a43132d-8913-49d4-8316-781be0d47097@arctype.co> User-agent: mu4e 1.10.2; emacs 28.2 From: Edouard Klein To: Ryan Sundberg Cc: guix-devel@gnu.org Subject: Re: Guix pull: avoiding "Computing Guix derivation" Date: Mon, 24 Jun 2024 17:25:12 +0200 In-reply-to: <5a43132d-8913-49d4-8316-781be0d47097@arctype.co> Message-ID: <87v81yl5u1.fsf@rdklein.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.169.11; envelope-from=edou@rdklein.fr; helo=sender-op-o11.zoho.eu 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -8.06 X-Migadu-Queue-Id: 91BE181CE X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.06 X-TUID: KnysEAnwFRlf Hi Ryan, Just to tell you that guix deploy was the key :) Here is what I came up with: https://the-dam.org/docs/explanations/GarbageCollection.html using guix deploy, in conjunction with: (modify-service os guix (channels %beaverlabs-channels) (guix (guix-for-channels %beaverlabs-channels)))) is the key to have the "Computing Guix derivation" step done on my desktop, and have an up to date guix, with custom channels, on the server. I can then update all the profiles, and run guix gc --delete-generations. Thanks for the pointer :) Cheers, Edouard. Ryan Sundberg writes: > Hi Edouard, I have couple of ideas for you, which may help with your depl= oyment process: > > 1) if possible, mount /gnu on a btrfs filesystem with zstd compression en= abled. This will let you fill up at least 3x of your physical disk space be= cause the store compresses very well. > > 2) for production servers you should try using `guix deploy` to push rath= er than pull profiles. This will offload most of the process to the machine= pushing the deployment. > > With regards to multi user profiles, if this is a typical server (not a > terminal/shell server) I wonder why you need to have per user profiles at= all. I > only say this because I am not sure about running `guix deploy` on an ind= ividual > user basis. > > Sincerely, > Ryan Sundberg > > May 13, 2024 8:08:35 AM Edouard Klein : > >> Hi Guix, >> >> First, I'd like to apologize for not having taken the time to answer >> those who helped me on a previous guix performance issue (with >> containers), the reason is tied to the topic of this email: the store >> has eaten all the space of my server, and solving that takes precedence >> over everything else, because no space =3D=3D no services. >> >> So, I need to clear some space, and to do that I need to have every user >> run guix pull (and by that I mean root will sudo -u $user guix pull), >> then update all of their profiles, and then guix gc >> --delete-generations. >> >> This ought to turn deduplication up to 11, and enjoy a reduced store >> size. >> >> I've already solved the cache size problem: >> mount -t overlay overlay -o \ >> lowerdir=3D"/root/.cache/guix",upperdir=3D"/home/$user/.cache/guix-overl= ay",workdir=3D"/home/$user/.cache/guix-workdir" \ >> "/home/$user/.cache/guix" >> >> Then >> bindfs --mirror=3D$user /home/$user/.cache/guix /home/$user/.cache/guix >> >> This lets root (who just ran guix pull) share its cache with every user, >> and avoid blasting away 700MB of disk space in every $HOME to reproduce >> the cache. >> >> However, now, I'm facing the previously addressed problem of guix pull >> being slow and hungry: >> https://www.mail-archive.com/guix-devel@gnu.org/msg66442.html (Guix pull= speed) >> https://yhetil.org/guix/87h6mwf4u3.fsf@lapenas.dev/T/ (guix pull >> performance) >> >> On my server, in order to run guix pull, I have to stop all other >> services otherwise I run out of ram. >> >> Then, one root has pulled, I need to wait 4 minutes /per user/ for guix >> pull to finish its "Computing Guix derivation" step. >> >> I would like to know two things, one is for the sake of knowledge, and >> the other is to solve the problem at hand: >> >> - Why is this step not substitutable ? The inputs are known, a hash can >> be derived, a substitute server could be queried for an output of that >> hash ? What am I missing ? Does the guix derivation not end up in the >> store ? What makes it so special that it can't be served by a substitute >> server ? >> >> - Is there a way (even a very dirty one, like hand copying stuff accross >> =C2=A0 /var/guix/profiles/per-user/*/current-guix) I can stop paying thi= s 4 >> =C2=A0 minutes per user price ? As I said, this is downtime on my server= , as >> =C2=A0 I need to stop all other services to let guix pull finish. >> >> Thanks in advance. >> >> Sorry for beating a dead horse, it's just that I can't scale anything up >> until I solve these performance issues. Sure I could rent a bigger >> server, but that's just kicking the can down the road. >> >> >> Cheers, >> >> Edouard.