From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dH9c3-000269-BT for guix-patches@gnu.org; Sat, 03 Jun 2017 10:01:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dH9by-0004bH-Ex for guix-patches@gnu.org; Sat, 03 Jun 2017 10:01:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51276) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dH9by-0004bC-BD for guix-patches@gnu.org; Sat, 03 Jun 2017 10:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dH9by-0006YQ-39 for guix-patches@gnu.org; Sat, 03 Jun 2017 10:01:02 -0400 Subject: bug#27097: Combining Guix, direnv and Emacs for environment customisation Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170527105641.9426-1-mail@cbaines.net> <20170527123113.1ca668e7@cbaines.net> <87tw424cap.fsf@gnu.org> Date: Sat, 03 Jun 2017 15:59:54 +0200 In-Reply-To: (Roel Janssen's message of "Thu, 01 Jun 2017 15:17:55 +0200") Message-ID: <87fufhkw85.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Roel Janssen Cc: guix-devel@gnu.org, 27097@debbugs.gnu.org Roel Janssen skribis: > Ludovic Court=C3=A8s writes: > >> I agree that we could do a lot more things with a faster =E2=80=98guix >> environment=E2=80=99. My guess is that it won=E2=80=99t be easy to go o= ptimize, and >> very hard to go below 1 second. We should profile that and see what can >> be done. > > FWIW, on our NFS-mounted /gnu, the 'guix environment' command takes at > least 20 seconds, but for any reasonably big environment it takes more > than one minute. The biggest bottleneck here is the disk latency. > Could it be that 'guix environment' accesses many files? If we could > reduce that, it would speed things up (at least for us ;)). Interesting. Does guix-daemon access /gnu over NFS too? Could you send the output of (first run the same command without =E2=80=98strace=E2=80=99): strace -c guix environment --ad-hoc coreutils --pure -- true On my laptop I get: --8<---------------cut here---------------start------------->8--- $ strace -c guix environment --ad-hoc coreutils --pure -- true % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 37.84 0.017268 1 14036 10965 stat 15.13 0.006904 1 9990 read 14.02 0.006398 1 10000 write 8.75 0.003991 3991 1 wait4 6.06 0.002764 1 5218 4 lstat 4.73 0.002157 1 1930 136 open 2.58 0.001176 1 1794 close 2.08 0.000949 1 1717 3 lseek 2.04 0.000932 1 689 mmap 1.89 0.000861 1 645 mprotect 1.71 0.000781 4 189 32 futex [=E2=80=A6] --8<---------------cut here---------------end--------------->8--- We stat a lot mostly to access all the Guix modules. Are they on NFS too? Thanks, Ludo=E2=80=99.