From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uN50DYUCQGPWogAAbAwnHQ (envelope-from ) for ; Fri, 07 Oct 2022 12:42:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yFJ9DYUCQGO9rwAA9RJhRA (envelope-from ) for ; Fri, 07 Oct 2022 12:42:13 +0200 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 E85181415E for ; Fri, 7 Oct 2022 12:42:12 +0200 (CEST) Received: from localhost ([::1]:56172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogknz-0000ii-2C for larch@yhetil.org; Fri, 07 Oct 2022 06:42:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogkj0-0006WG-Fk for guix-patches@gnu.org; Fri, 07 Oct 2022 06:37:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogkj0-0001c2-75 for guix-patches@gnu.org; Fri, 07 Oct 2022 06:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogkj0-0003Yv-1x for guix-patches@gnu.org; Fri, 07 Oct 2022 06:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57788] [PATCH] gnu: rust: Disable debug info to reduce build requirements Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Oct 2022 10:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57788 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mark H Weaver Cc: 57788@debbugs.gnu.org Received: via spool by 57788-submit@debbugs.gnu.org id=B57788.166513898213643 (code B ref 57788); Fri, 07 Oct 2022 10:37:02 +0000 Received: (at 57788) by debbugs.gnu.org; 7 Oct 2022 10:36:22 +0000 Received: from localhost ([127.0.0.1]:34436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogkiL-0003Xz-Hw for submit@debbugs.gnu.org; Fri, 07 Oct 2022 06:36:21 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:45756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogkiI-0003Xl-OR for 57788@debbugs.gnu.org; Fri, 07 Oct 2022 06:36:20 -0400 Received: by mail-ej1-f48.google.com with SMTP id sc25so4262190ejc.12 for <57788@debbugs.gnu.org>; Fri, 07 Oct 2022 03:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=pi0f6+R71mRcCqz5YMOb/qWMWwuhG+3SbmvGp1p6GAk=; b=B9M0vdBKrZOA6Ldm6aesMcnw9K0cJUey6m9J0JqASwSmJni+PbaZDmcCU97ANgM5RA Os+qFJ+c398crSMyQsqA7TkQCY/WmMpuWrruJP0q9xhR6osW0V9cKWUjKUcjypSlE0RA +ppFOL+yeddIYE+RBZTEvetekjVTzlJs00Zw0fZEVwyeifCYFby6jNNnkftYOhrGI5Tt bU1e0QK5W//BqfaeOLPeEn6rBmU0cT4JsDULngaEtX3IaRk9khC56iMeFQdvX7j85S7R YlH1XqXR752M2t41YINvfnb/IIAtUV0Ybjm4l8oCB+iaBbfcxk6W3EULSqaK6MCVKyj/ iPPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pi0f6+R71mRcCqz5YMOb/qWMWwuhG+3SbmvGp1p6GAk=; b=V8jbTSYWcE3w6b/VbDVUU1KJ09ud7m70WskC+WwMp5QrDGovqiJ22DyNfrQRP+5ZCI yzsGp9ImLcWU/ayrjpvHdGcPRE/SDhNHwS9jBSEpc23KQr85nLd9bWiNVkwwvLWPKwk2 bYbFVQFiMrFkbpA2N6rpNTL49P8NSXHHCavRpPuMiDYq9HX2gg5eV+4y/X0SCEjDiUOY WMkDx67y7Exp/zM+tCAdPB515i/QhWrqOgoM0PAhiE2oZ4uYe2I4Tddj1RLpoJf4WinN +7skOEyFFvASWk3HvaoKBs9o+HaruzPP4h31RvEMGxT3DJAgr0HtfxE6nFSM5kDnjkyp AQrA== X-Gm-Message-State: ACrzQf183IbxLhgwAq6oZsmm0oVSbvaoTuzxfcC9TuYraVVSElxlNcLQ DqpIrDvvSd9uYvuY72jQqeM= X-Google-Smtp-Source: AMsMyM6WzIowGAxOEAC+KNluCEkjSiI2wxJ4Atjg3sHCTwlDj5tMQ4dZ8U1RR1kTLLAj92X1FWuBrQ== X-Received: by 2002:a17:907:1c1a:b0:78d:426c:2828 with SMTP id nc26-20020a1709071c1a00b0078d426c2828mr3612195ejc.331.1665138972682; Fri, 07 Oct 2022 03:36:12 -0700 (PDT) Received: from localhost ([141.226.13.62]) by smtp.gmail.com with ESMTPSA id v8-20020a50a448000000b004590d4e35cdsm1192933edb.54.2022.10.07.03.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 03:36:12 -0700 (PDT) Date: Fri, 7 Oct 2022 13:36:08 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Mark H Weaver , 57788@debbugs.gnu.org References: <874jxahlpi.fsf@netris.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WULFXluBVDDoUPOd" Content-Disposition: inline In-Reply-To: <874jxahlpi.fsf@netris.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665139333; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=pi0f6+R71mRcCqz5YMOb/qWMWwuhG+3SbmvGp1p6GAk=; b=NKAoNNf3XAUJ/uLbG1pBbyKfkYyquBeZwFaH15RzcU1T9OEOn1fFNT/b8s+Q5KpljqnxAn IQpTlJYiFAFGU5EBIEJ1ZZpZ2N5jiI1gTgottVXWSb19bZQom7WfwVqLeSx+lm+vCJts0A kEf7ZgbHDCxbqklK6G2WIpisg2eMtT7RKPz/qpA1P06OshotRj4I+l+MqZJBE6qCf766xV RAU642nWHXZ6x2Mlo6+MgW1rhUK1uH4oksPFp5epIFxnYbHbclGC22rbmrWNCwYgXwDlQJ 4wHH0L9XblRNy5bSlTv0dI5zaLDm5J/lcWgk3/TyqPHrtgX7mVxpSEml8aMNNw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665139333; a=rsa-sha256; cv=none; b=eb/NcBt1MGTANxJSjOo9dGiPnWcYBYKHVfz8koECvdCMwzgBXmr3Kbe0QL4+/snL2sm11d CwbsYu5kka6X1lweTubunlg0YzaleqjdJk26sarPcYyBB4iPdOQBc0s6IHc/zeBL1uzip3 OV6IzHeTM/EkN/BFIXcSGIRTh420oNFfOaszGGST+m7cDwm+DZeOIhfVW9Lgo873scYLeI V5lE2kD9puc3HLN5Rte1xOyxfbrluWhBTGejtCp9wij39o4sqNSekZjVmFNWcWZX4VU2y0 W2UFbgAuc9rcTFSai7jG0L4CLhKBzxH/7OD3Oa+DbHzXytD3L61vr7JAZ3mU7A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=B9M0vdBK; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=B9M0vdBK; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E85181415E X-Spam-Score: 0.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: L3dkY7wgfiDY --WULFXluBVDDoUPOd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 13, 2022 at 07:56:46PM -0400, Mark H Weaver wrote: > The following patch, which I've tested only on my private branch of > Guix, dramatically reduces the amount of memory and time required to > build Rust. >=20 > With this patch applied, I'm able to build Rust on a Thinkpad X200 with > only 4 GB of RAM using both cores. Without it, I'm unable to build Rust > at all, even with parallel builds disabled, running in a bare text-only > terminal, and with every nonessential daemon stopped. When I tried, a > single compiler process used more than 9 GB of virtual memory with heavy > thrashing before the OOM killer finally put it out of its misery. Your x200 is an x86_64? How much RAM+swap did you end up using with this patch? I was going to point you to a patch upstream in mrustc but I can't find it now, where they disabled debug builds by default, but I can't find it now. > Moreover, with this patch the builds are dramatically faster than I've > previously observed. In my earlier bootstraps of Rust (up to > rust-1.51), it took about 5 hours to build each compiler on my machine. > Now it takes only about 2 hours per compiler, except for the initial > bootstrap (1.54) which takes about 4 hours. I tested it out on my machine, it brought the build time down from 101 minutes to 71 minutes. Not the same improvement, but still noticeable. > The following patch is meant to be applied to the 'staging' branch, but > I've only tested it on my own private branch, which is based on very old > 'master' (April 2021) and is thus quite different by now. >=20 > I offer it here in case it might be of interest, although it hasn't been > tested on contemporary Guix. I'm not subscribed to this mailing list, > so please make sure to CC me on any replies you'd like me to see. >=20 > Regards, > Mark I'm building out to librsvg on staging right now with this patch applied, so hopefully we'll see that it's good. I'm assuming that setting CARGO_PROFILE_DEV_DEBUG to false won't cause any problems. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --WULFXluBVDDoUPOd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmNAARQACgkQQarn3Mo9 g1H9Ig/8CPD6cSIksJVB31qEtCeaNnt97RG4D0H9jCOwJgRs+EWusoQ24vVpvJ5c f5NPZT7g6jqasTrQu4pFEWpkeLnCDNPk+L9r9rqFTUo6yE19SiZWpNltuFQA489I kNuAyxAryVE+x0Li+PQZ5dDqTwRDOM7H6l8+rPBwDouKoU16t/GEzuN6lrEuG3l0 YWJUntOa6BjK8p1jLTQKi/CWWon3eeAsJoUWJbGWKoYcGsAZUpbk0qFKIswbev/Q WzkIs693gbMVYvWbU/3SuzhYSJJM0Fj2qIMzyfAqpAo0KfiJ2NGTg/wancerFPxY K8KAjWvu2NAjc6wgcpLTBCUH/Sg4CgS5h5c2MCfXSu8MhxCgHBqWXjLt2u88f1pS moJdC4D/agLbICgLyk/ejENeR7860m2ogScYlREHZVE/Bw+ysCj8ZRSXveKkxgTj MenLbBRnY1HoqZ8AgHyuSaNjIKpOEXq9w/i05I1nhccTuyyDEAM5OkbOdTtUFX5C f+MApCF5mSYj4L+ZGwBLrIudOljnBRFtybb+sAFn2yqHJcV+n+ozTfMzrV8s8cA2 3eUxXOYYUSJAUPnVEqejq+PHsijS9IKJ2Q1SJo8/xJ5Md/HrUvcTL8ucBIZ/tTaz zs4uFvoHNneOJbbhGr7kkrXddB8zkn3//W/tPZmCK5hpq78T6dg= =oZ2F -----END PGP SIGNATURE----- --WULFXluBVDDoUPOd--