From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id ADygN+g1QmbY5wAAe85BDQ:P1 (envelope-from ) for ; Mon, 13 May 2024 17:46:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id ADygN+g1QmbY5wAAe85BDQ (envelope-from ) for ; Mon, 13 May 2024 17:46:49 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=arctype.co header.s=mail header.b=JLZsCj3B; 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=pass (policy=reject) header.from=arctype.co ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715615208; 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=vf1cDiyGttnESiq4LyalrVKdhortlPlx1qpkhRcTGsk=; b=OGlRFz0Af2xYwQn9F1Qk94K68l0O73xjADqJRbrw7objL/op7v0euVK85SgVVsBm7qWeLl iB6weU8XbJyuhIopUIxrFRbYvOmrZwXIeZarWAsl1h20taM04DfPCBHY+BayN1aOlUB9iO xEwRMkHH+f9JC3D/3wIObPrvlOjPJ6GxUpUVeecjYQ01AfBASfnZcEoA4yHlll2glyGOsL lcj/sgWO76Q+supg5wR6ta2Oypft1mMQHCGtFt+5GYLOHJntO6Es2M4cKESjt+16OSSLuK o4WIiQibln3P3yXVFZiBWagsd7GUOdFNKxR32aeMkiZHHIHNfxRieQwewGyv0Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=arctype.co header.s=mail header.b=JLZsCj3B; 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=pass (policy=reject) header.from=arctype.co ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715615208; a=rsa-sha256; cv=none; b=htCTKEiaL/c2SWHVEcuRL8Uh9kTt8JUqlKeQCCv3t7FIa4PDkm5gnH0jTmZMhax/dkJdHR W3Y1Cb89hGB974Tvn1UeNVnVr6XVsPUDf8QcmmO9Aii2LLZ1/uXBBk6BGmpK6ikqeCS2Vt E+zNG8Pn2icVMMSWQRCoBgtV80/PfFDN15eO/gp7g5lrTr0odhjTBIJLsArl4fe1L8ABJd NbF8ElFXl4Pe/2JxleXLjy5ovsAE9gNZq7H5sP5kg3UnXM3lUTwVLbFrWhYW/5a5lIFn2s bn0JWs60VLF8rdiDf92yezUyhJ1L3c65VYAHo1IKzmWMopWEVOyYagQpw3eBBA== 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 CC2613EF27 for ; Mon, 13 May 2024 17:46:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6XsI-0006L3-2T; Mon, 13 May 2024 11:46:02 -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 1s6XsF-0006Kf-Op for guix-devel@gnu.org; Mon, 13 May 2024 11:45:59 -0400 Received: from mail.arctype.co ([138.68.9.245]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s6XsD-0001GP-DS for guix-devel@gnu.org; Mon, 13 May 2024 11:45:59 -0400 Received: from authenticated-user (mail.arctype.co [138.68.9.245]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.arctype.co (Postfix) with ESMTPSA id D07CF13B0EF; Mon, 13 May 2024 15:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=arctype.co; s=mail; t=1715615152; bh=vf1cDiyGttnESiq4LyalrVKdhortlPlx1qpkhRcTGsk=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=JLZsCj3BiaaOuwS4mu2vi05kCBTPgyj67LUXkkqx6JVl2WpS99En8//vjCbgtEHgH PvsAdVJz0H0mkYc0qoaQe1DF4EV4+Uk3lLAOuUK+ptZxPSBl0b9v1mmXP0jemChwgU fPxREywaFBId09G15JyXgk0jYkic6G3QExFvV781tekpxjoxLrXAwwmvFLYnlDN/Q5 WoItzYIpASfex4ZHSc4S9D4MS7jOHSqK11YlO3PAmuZqHdgIzpNdEDNoXMNyW6F1hG Fr291KLcAGrZamkea6W8vj6h7m+nxKNcs5m25+/Ry0IpvRkO0M96BngrQjGmEcPScg nZQc4+Af5zQLw== Date: Mon, 13 May 2024 08:45:51 -0700 (PDT) From: Ryan Sundberg To: Edouard Klein Cc: guix-devel@gnu.org Message-ID: <5a43132d-8913-49d4-8316-781be0d47097@arctype.co> In-Reply-To: <874jb16993.fsf@rdklein.fr> References: <874jb16993.fsf@rdklein.fr> Subject: Re: Guix pull: avoiding "Computing Guix derivation" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: <5a43132d-8913-49d4-8316-781be0d47097@arctype.co> Received-SPF: pass client-ip=138.68.9.245; envelope-from=ryan@arctype.co; helo=mail.arctype.co 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, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.57 X-Spam-Score: -7.57 X-Migadu-Queue-Id: CC2613EF27 X-Migadu-Scanner: mx13.migadu.com X-TUID: hL0DydFSOTZj Hi Edouard, I have couple of ideas for you, which may help with your deploy= ment process: 1) if possible, mount /gnu on a btrfs filesystem with zstd compression enab= led. This will let you fill up at least 3x of your physical disk space beca= use the store compresses very well. 2) for production servers you should try using `guix deploy` to push rather= than pull profiles. This will offload most of the process to the machine p= ushing the deployment. With regards to multi user profiles, if this is a typical server (not a ter= minal/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 in= dividual user basis. Sincerely, Ryan Sundberg May 13, 2024 8:08:35 AM Edouard Klein : > Hi Guix, >=20 > 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. >=20 > 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. >=20 > This ought to turn deduplication up to 11, and enjoy a reduced store > size. >=20 > I've already solved the cache size problem: > mount -t overlay overlay -o \ > lowerdir=3D"/root/.cache/guix",upperdir=3D"/home/$user/.cache/guix-overla= y",workdir=3D"/home/$user/.cache/guix-workdir" \ > "/home/$user/.cache/guix" >=20 > Then > bindfs --mirror=3D$user /home/$user/.cache/guix /home/$user/.cache/guix >=20 > 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. >=20 > 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) >=20 > On my server, in order to run guix pull, I have to stop all other > services otherwise I run out of ram. >=20 > Then, one root has pulled, I need to wait 4 minutes /per user/ for guix > pull to finish its "Computing Guix derivation" step. >=20 > I would like to know two things, one is for the sake of knowledge, and > the other is to solve the problem at hand: >=20 > - 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 ? >=20 > - 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 this= 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. >=20 > Thanks in advance. >=20 > 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. >=20 >=20 > Cheers, >=20 > Edouard.