From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wASyC+HYNWHNZwEAgWs5BA (envelope-from ) for ; Mon, 06 Sep 2021 11:01:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uDl1B+HYNWHYbwAAB5/wlQ (envelope-from ) for ; Mon, 06 Sep 2021 09:01:21 +0000 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 E1489F6AE for ; Mon, 6 Sep 2021 11:01:20 +0200 (CEST) Received: from localhost ([::1]:54422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNAVD-0007rb-UO for larch@yhetil.org; Mon, 06 Sep 2021 05:01:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNAUx-0007ni-4e for guix-patches@gnu.org; Mon, 06 Sep 2021 05:01:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNAUw-0002Sk-Bc for guix-patches@gnu.org; Mon, 06 Sep 2021 05:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNAUw-0005nB-AO for guix-patches@gnu.org; Mon, 06 Sep 2021 05:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50384] [PATCH v2] Optimise search-patch (reducing I/O) Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 09:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50384 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 50384@debbugs.gnu.org Received: via spool by 50384-submit@debbugs.gnu.org id=B50384.163091883722223 (code B ref 50384); Mon, 06 Sep 2021 09:01:02 +0000 Received: (at 50384) by debbugs.gnu.org; 6 Sep 2021 09:00:37 +0000 Received: from localhost ([127.0.0.1]:51738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNAUW-0005mN-PM for submit@debbugs.gnu.org; Mon, 06 Sep 2021 05:00:37 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:56019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNAUU-0005m8-Sg for 50384@debbugs.gnu.org; Mon, 06 Sep 2021 05:00:35 -0400 Received: by mail-wm1-f46.google.com with SMTP id g135so4017334wme.5 for <50384@debbugs.gnu.org>; Mon, 06 Sep 2021 02:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=OR2HCCMMGVfuJiMIlzY60l1onkYa1ky8Q0yAGLWn+eQ=; b=n5ZojW2TEF5eguA6VwXjKOwJwrX+4w3MblYJHWC5yXEs2OGse0bo+Na3pfCGfWxGLO qOcKoWeK4jA6oAebPbrcatf6tWaXreJHpRBUslZtNK1ycZCb50mJ6G/pmCw3oMlXR4yG ojdM273dqVBh0IZFCiEv4/HdhM5HeAH4MEAQJ9acCXN3RvQIaSpFLEOGdaYNbx2Yr7TO K/hcDyJi/BcdlAqTlpKLtE8uc6h5elt1eKkBvcmZ9RyftvHukGN6aISobZmR8KbvdWtw AaHEfvegBxIGCgqoVnmEE8oPEJZUnNl+8WP9H4oxBva8sYFQcLHGP+0ty4T3PU+dZqPv F+hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=OR2HCCMMGVfuJiMIlzY60l1onkYa1ky8Q0yAGLWn+eQ=; b=NAhccR1HvEkYsJGBK4/sAy1B3oD753PZDTssPxZXvc0mCLptP0TkanRzO9vDMiUhUH juHJE67b9RiHpiMN9fzx5RsCMFrnDhfNvnouPkNmk8koD5FehDMiwQtFYA21GJcNnbEM 3Ips4XVP8glWNDsp/EMgnqGdmHOvdx07HM/0zS1a2BMUoLGFunIx+54W4zD1cOWWFw6f +cn6E798JMk8Ta54UK+FwHCt+zea32i6yHGwDJLzjB132/DnM0oTrB3R0oGmgTj6e0G3 uTdizhHBRmYTFHiGtxlB7acaYhQYWG9OiSn8RR+PAyJnDXP+BbWHs+LVrJ01boIRSPF/ omcw== X-Gm-Message-State: AOAM531DDKO82JO+BTwvcMKR2TtQkgZIjLKQpye6bEJQd0uuRd+Z9BQh dMi6HYOVVlQ3UHOCPBmYprUsN5i3RIc= X-Google-Smtp-Source: ABdhPJw4/CO7bAbz358yCkuZe0xVOAG59rORxB8PpMNO1XKjcCwUN6OSoJzNd/+SXoD/H0KQD47UQg== X-Received: by 2002:a05:600c:220f:: with SMTP id z15mr10103869wml.74.1630918828865; Mon, 06 Sep 2021 02:00:28 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id g1sm7554000wrc.65.2021.09.06.02.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 02:00:28 -0700 (PDT) From: zimoun In-Reply-To: <0ec7f0270fcccec730808f9210f074cd5339961f.camel@telenet.be> References: <8900fa8c8eef7f72fc97adc2408be26c88de7803.camel@telenet.be> <87tuj0xaja.fsf@gnu.org> <0ec7f0270fcccec730808f9210f074cd5339961f.camel@telenet.be> Date: Mon, 06 Sep 2021 10:39:40 +0200 Message-ID: <864kayjdwz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630918880; 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: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=OR2HCCMMGVfuJiMIlzY60l1onkYa1ky8Q0yAGLWn+eQ=; b=OtiXuQsHdmGGwn0xN6hUfoZDIzBPyakaMaf2wzMMrrOv3rGFTBSVm67b1zm2erjS8Yp1P7 z/+WJWg0Mx/yH1FwA1hycWLXZJ75fZ+/KUmXw+I+AzvauKl++qeNMN9XWOJPEmJ82ezc9z m2b18EjJE+qyRNpFzEo/TPXVzwYf+8ZAckiVAO8GJ1FuIFeAZ2lQPizQI3wfRosU4oe1jU gmbYon4COQLARl9z+Spu/bWQD2MHwySKhU2SXbcl/b33dy9G+zKb7ij6mf6ZJeve/pzd2k HXafV6eM3mJyFX1yt+pLorJwagPjpfRNiOo952UempKchUmAvcvqs+drkJhEHQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630918880; a=rsa-sha256; cv=none; b=s+9iJQyZVCalj84JcqJKRNt7HWRGzw71Zls4EG2LunijQ5ou8O28dYYwd08UkNYVzLKzuh Vi55GoR/6pjvOEJPU1jzKKi/JUB83THwMAQ1yeV3+LOvlBhL+HJ9l1Q+aqYpVup6sVXBMo pO7xrVobHc4Bt2mLSX8iLb2u/29x/tFv3G0ini1PXQQN+2pjdhBgE2WW10gWb+PS6dkhda 3YCKoh9M5IRH7h9Y6UTEJEktF9kp138uQhYNyN1ZeUOjjgQXc3F0MQ80f7KdRL2NKCso5M BY0pQvgeV0P72jroJ0PCMDxS22dCEw8lt5qDwNmahT389PTwX14JEJbDeCFYQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=n5ZojW2T; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=n5ZojW2T; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E1489F6AE X-Spam-Score: -1.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: BuvquQG0dOjT Hi Maxime, Thanks for looking at optimising stuff. :-) On Sun, 05 Sep 2021 at 21:48, Maxime Devos wrote: > Let's compare the numbers again! This time, I've run > > echo powersave |sudo tee /sys/devices/system/cpu/cpufreq/policy{0,1,2,3}/= scaling_governor > > to make sure the CPU frequency doesn't change. On a hot (disk) cache: > > # After the patch series > time GUIX_PROFILING=3D"rpc gc" ./the-optimised-guix/bin/guix build -d --n= o-grafts pigx [...] > So on a hot disk cache, there doesn't appear to be any improvement > (except for =E2=80=98time spent in GC=E2=80=99 -- presumably that's due t= o the optimisations > to guix/base32.scm). Which kind of disk do you have? SSD, spinning HDD, other? > What about a cold cache? > > # After the patch series > > sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > ./the-optimised-guix/bin/guix --help > time GUIX_PROFILING=3D"rpc gc" ./the-optimised-guix/bin/guix build -d --n= o-grafts pigx > /gnu/store/fq6x8d2vcm6sbjkimg7g8kcgb4c5xv1b-pigx-0.0.3.drv > Remote procedure call summary: 5949 RPCs > built-in-builders ... 1 > add-to-store ... 3 > add-to-store/tree ... 26 > add-temp-root ... 195 > valid-path? ... 195 > add-text-to-store ... 5529 > Garbage collection statistics: > heap size: 93.85 MiB > allocated: 312.03 MiB > GC times: 17 > time spent in GC: 3.37 seconds (23% of user time) > > real 1m39,178s > user 0m14,557s > sys 0m0,990s How the average (against 3 examples) looks like? > It seems that if the disk cache is cold, the time-to-derivation decreases > a little by this patch series. Much less than I had hoped for though; I'= ll > have to look into other areas for interesting performance gains ... Please update the number using your diff showed in [1]. :-) 1: All the best, simon