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 ms9.migadu.com with LMTPS id aCnDN2k8PWR6pAAASxT56A (envelope-from ) for ; Mon, 17 Apr 2023 14:32:41 +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 2O6mN2k8PWTSIAAA9RJhRA (envelope-from ) for ; Mon, 17 Apr 2023 14:32:41 +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 A29B411714 for ; Mon, 17 Apr 2023 14:32:41 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1poO1o-0000tZ-D2; Mon, 17 Apr 2023 08:32:16 -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 1poO1c-0000s8-2U for bug-guix@gnu.org; Mon, 17 Apr 2023 08:32:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1poO1b-0006A3-5G for bug-guix@gnu.org; Mon, 17 Apr 2023 08:32:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1poO1a-0000GR-Iu for bug-guix@gnu.org; Mon, 17 Apr 2023 08:32:02 -0400 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=; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681734761; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=W9BG2CUw1MnkoZTXC7z7nHKK1P24Zh+XKMOyjM8rMtA=; b=uNi7thyPT4XCSA7TTzqv+xNIhEVOeRZlaG+9CKSU9N88d19V7iuIRJiCofjsmTK4ITtyR2 IhuKE9BAygIzg0ZmxxYN/FmVu0azoRQaydAUqk8llCAEFemCPk2FpccihHklXVXSyYLksK 3/OSx/41ArxY1Envz+CW8dOvkYDQwCwEZ6jhCuGMOcWCRWtotRHwHyH5kkogeek9l1oJ6F SwrK9uqYWgxVlJn+XHccBSvRyBYLuWfC5y2Y60zlGH3vnbEPFKjZIOtMkk8RUBRncvXLnq Iqcmrfn5nrr0CiC29BLprVZ+DHRVEFdYK7GLvOcOX9e+UgAkbFWw02eO8/n3Gw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=c3xx31dc; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681734761; a=rsa-sha256; cv=none; b=omGLKcOHfb6goobEVHdFm+fw/Qr+lS8uMlBa48lU5SQLF6J9L6ZaF7gX6UteLNI6IbRjHs 2/DKOU2NGh+yP35UaOwX9yMw/2wnTtsfEvKqIW1DRajmx088hnKB78Vsq+wmjyHjPGWeTH MMK5GDVd1OwrMSZC2FYjazuUHVw+7d2jibw0RmaN343BhwO8O6/ycS60//GAZ15nnUEHiQ V/TYYIWQjf7lEKDzaaDHRH38rGKsHob9JfjCcZ7Myw82qh8TRpg0JiN/rpl5hSAR9iS+x2 3JIvasYlq8Tv66LcCYCSkortbI1yYo6mgxBST7v9oqAaV96jDODHTIX2AJI+JQ== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=c3xx31dc; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=none) X-Migadu-Spam-Score: -2.41 X-Spam-Score: -2.41 X-Migadu-Queue-Id: A29B411714 X-Migadu-Scanner: scn1.migadu.com X-TUID: aOpqBRUbF8xD 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.