From unknown Sat Jun 21 05:07:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62899: Performance regression in cached =?UTF-8?Q?=E2=80=98guix_?= =?UTF-8?Q?shell=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 17 Apr 2023 12:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62899 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 62899@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1681734692962 (code B ref -1); Mon, 17 Apr 2023 12:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Apr 2023 12:31:32 +0000 Received: from localhost ([127.0.0.1]:53928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poO16-0000FS-0Q for submit@debbugs.gnu.org; Mon, 17 Apr 2023 08:31:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:54504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poO13-0000FK-Qh for submit@debbugs.gnu.org; Mon, 17 Apr 2023 08:31:30 -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 1poO10-0000jN-52 for bug-guix@gnu.org; Mon, 17 Apr 2023 08:31:27 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poO0u-00062F-A6 for bug-guix@gnu.org; Mon, 17 Apr 2023 08:31:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=W9BG2CUw1MnkoZTXC7z7nHKK1P24Zh+XKMOyjM8rMtA=; b=c3xx31dcJhHuH2FYQ7oaS0aJuo+ZD8cJfuVSybHCbUoqs1pdzA26GOD4 B3LlWSZnCcJI5846VZ0Bb7MtVmmge7FXNvO7XQz3wsG/wG4EpwKGFCJvQ NX7jKg6bfXpFvvsUCtg7sy+sAATGd+XybrY5XmzyJAdBVX7mwR3xqz2bM k=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludovic.courtes@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.99,204,1677538800"; d="scan'208";a="103420003" Received: from unknown (HELO ribbon) ([193.50.110.118]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2023 14:31:14 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 28 Germinal an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour de la =?UTF-8?Q?Pens=C3=A9e?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 17 Apr 2023 14:31:14 +0200 Message-ID: <87ildug06l.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello! I noticed that =E2=80=98guix shell=E2=80=99 had become relatively slow on c= ache hits, as in this example: --8<---------------cut here---------------start------------->8--- $ time guix shell -D guix -- true real 0m0.596s user 0m0.716s sys 0m0.064s $ strace -c guix shell -D guix -- true % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ------------------ 21.35 0.005453 37 147 20 futex 18.17 0.004641 4641 1 wait4 13.58 0.003470 4 837 mmap 11.59 0.002960 493 6 clone 11.51 0.002940 1 1835 326 newfstatat 9.26 0.002365 2 950 290 openat 7.85 0.002005 3 641 mprotect 2.05 0.000524 0 661 close 2.01 0.000514 3 135 read 1.15 0.000295 0 601 3 lseek 0.33 0.000085 3 25 rt_sigprocmask 0.25 0.000065 3 20 brk 0.22 0.000055 1 28 pread64 0.13 0.000033 4 7 munmap 0.10 0.000025 5 5 rt_sigaction 0.08 0.000020 20 1 arch_prctl 0.08 0.000020 6 3 prlimit64 0.06 0.000016 2 6 1 ioctl 0.06 0.000016 5 3 pipe2 0.05 0.000012 0 16 clock_gettime 0.03 0.000007 2 3 fcntl 0.03 0.000007 7 1 set_tid_address 0.03 0.000007 7 1 set_robust_list 0.02 0.000005 2 2 sched_getaffinity 0.01 0.000002 0 4 write 0.01 0.000002 0 14 getpid 0.00 0.000000 0 2 2 access 0.00 0.000000 0 3 madvise 0.00 0.000000 0 1 execve 0.00 0.000000 0 1 uname 0.00 0.000000 0 1 getcwd 0.00 0.000000 0 115 97 readlink 0.00 0.000000 0 1 sysinfo 0.00 0.000000 0 2 getuid 0.00 0.000000 0 2 geteuid 0.00 0.000000 0 1 utimensat 0.00 0.000000 0 2 getrandom ------ ----------- ----------- --------- --------- ------------------ 100.00 0.025544 4 6084 739 total $ guix describe Generation 255 Apr 16 2023 22:56:42 (current) guix 9a5e1dc repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 9a5e1dc1f16f5f8c056e64f2077b035784003673 --8<---------------cut here---------------end--------------->8--- The 950 =E2=80=98openat=E2=80=99 calls stem from opening lots of gnu/packag= es/* files, which is unnecessary. This, in turn, comes from (guix scripts pack), which has become a hard dependency of (guix scripts environment) with commit b31ea797edb4f6e8c14e8fe790da1319607c5cb1. I think we should stick to ~0.1s startup time for cached =E2=80=98guix shel= l=E2=80=99, as described in . Ludo=E2=80=99. From unknown Sat Jun 21 05:07:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62899: Performance regression in cached =?UTF-8?Q?=E2=80=98guix_?= =?UTF-8?Q?shell=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 17 Apr 2023 22:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62899 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 62899@debbugs.gnu.org Received: via spool by 62899-submit@debbugs.gnu.org id=B62899.168177202231953 (code B ref 62899); Mon, 17 Apr 2023 22:54:02 +0000 Received: (at 62899) by debbugs.gnu.org; 17 Apr 2023 22:53:42 +0000 Received: from localhost ([127.0.0.1]:57145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poXjC-0008JI-E3 for submit@debbugs.gnu.org; Mon, 17 Apr 2023 18:53:42 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:7155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poXjA-0008Iy-82 for 62899@debbugs.gnu.org; Mon, 17 Apr 2023 18:53:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:references:date:in-reply-to:message-id: mime-version:content-transfer-encoding; bh=pd9qTVJe0NgzLXzQDUpJvHnxxcAJTLyQ7eIKh6SP3iA=; b=pj0Kzi51epM2dusOkIJ6NSAUm+2CMezxwtI4Tsv57+ris8MU00bmm68G J04OQ0fnifyGdOXHOBd+jTM8HKkxVELsjOBIxpMBv5PbozD0BtvTjp5n1 pfkuI173G0Bd4czdYqzL3Uwt81VkMIsKfp5QUaiLDWmf2AXNXKcBW+/2+ w=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludovic.courtes@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.99,205,1677538800"; d="scan'208";a="53596586" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 00:53:34 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ildug06l.fsf@inria.fr> Date: Tue, 18 Apr 2023 00:53:32 +0200 In-Reply-To: <87ildug06l.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 17 Apr 2023 14:31:14 +0200") Message-ID: <875y9uazo3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s skribis: > $ time guix shell -D guix -- true > > real 0m0.596s > user 0m0.716s > sys 0m0.064s > $ strace -c guix shell -D guix -- true > % time seconds usecs/call calls errors syscall > ------ ----------- ----------- --------- --------- ------------------ [...] > 100.00 0.025544 4 6084 739 total [...] > This, in turn, comes from (guix scripts pack), which has become a hard > dependency of (guix scripts environment) with commit > b31ea797edb4f6e8c14e8fe790da1319607c5cb1. Fixed with 9fad6067d914066e3b80bc9da6a2cb8bb060b96d. --8<---------------cut here---------------start------------->8--- $ /tmp/prof/bin/guix describe Generation 1 Apr 18 2023 00:49:35 (current) guix 84bd7cf repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 84bd7cf9189574d9a966c4583f95bfe843e4b56a $ strace -c /tmp/prof/bin/guix shell -D guix -- true % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ------------------ 36.04 0.002646 2646 1 wait4 20.68 0.001518 16 93 12 futex 10.97 0.000805 2 364 mmap 10.11 0.000742 1 522 281 openat 8.20 0.000602 0 1001 328 newfstatat 4.15 0.000305 1 236 mprotect 3.39 0.000249 1 133 read 1.59 0.000117 1 104 88 readlink 1.43 0.000105 0 242 close 0.79 0.000058 9 6 clone 0.53 0.000039 0 195 3 lseek 0.44 0.000032 1 21 rt_sigprocmask 0.38 0.000028 1 22 brk 0.31 0.000023 0 28 pread64 0.23 0.000017 8 2 munmap 0.16 0.000012 1 10 clock_gettime 0.12 0.000009 1 5 rt_sigaction 0.12 0.000009 3 3 pipe2 0.08 0.000006 3 2 sched_getaffinity 0.07 0.000005 1 3 prlimit64 0.04 0.000003 0 6 1 ioctl 0.04 0.000003 3 1 set_tid_address 0.04 0.000003 3 1 set_robust_list 0.03 0.000002 0 3 write 0.03 0.000002 2 1 getcwd 0.01 0.000001 0 2 getrandom 0.00 0.000000 0 2 2 access 0.00 0.000000 0 14 getpid 0.00 0.000000 0 1 execve 0.00 0.000000 0 1 uname 0.00 0.000000 0 3 fcntl 0.00 0.000000 0 1 sysinfo 0.00 0.000000 0 2 getuid 0.00 0.000000 0 2 geteuid 0.00 0.000000 0 1 arch_prctl 0.00 0.000000 0 1 utimensat ------ ----------- ----------- --------- --------- ------------------ 100.00 0.007341 2 3035 715 total $ time /tmp/prof/bin/guix shell -D guix -- true real 0m0.155s user 0m0.143s sys 0m0.049s --8<---------------cut here---------------end--------------->8--- There=E2=80=99s still room for improvement but at least no gnu/packages/* f= iles are being loaded now. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 18:53:43 2023 Received: (at control) by debbugs.gnu.org; 17 Apr 2023 22:53:43 +0000 Received: from localhost ([127.0.0.1]:57147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poXjC-0008JK-PS for submit@debbugs.gnu.org; Mon, 17 Apr 2023 18:53:43 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:7155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poXjB-0008Iy-J5 for control@debbugs.gnu.org; Mon, 17 Apr 2023 18:53:41 -0400 Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludo@gnu.org; dmarc=fail (p=none dis=none) d=gnu.org X-IronPort-AV: E=Sophos;i="5.99,205,1677538800"; d="scan'208";a="53596589" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 00:53:38 +0200 Date: Tue, 18 Apr 2023 00:53:37 +0200 Message-Id: <874jpeazny.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #62899 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) close 62899 quit