guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix environment --profile with --ad-hoc


From: zimoun
Subject: Re: guix environment --profile with --ad-hoc
Date: Fri, 12 Mar 2021 14:12:54 +0100

Hi Ricardo,

On Fri, 12 Mar 2021 at 12:23, Ricardo Wurmus <rekado@elephly.net> wrote:

> So it’s not unsurprising that it takes longer than “guix environment
> --help”, which doesn’t have to talk to the daemon at all.  The question
> is just if we can avoid some of that work and if so how much of it.

Thanks for all the explanations.  My point is the cold vs hot cache
changes a bit the analysis.

--8<---------------cut here---------------start------------->8---
$ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
$ time guix environment --help >/dev/null

real    0m1.148s
user    0m0.804s
sys     0m0.125s

$ time guix environment --help >/dev/null

real    0m0.534s
user    0m0.649s
sys     0m0.044s
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
$ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
$ time guix environment --profile=$HOME/.guix-profile -- exit

real    0m2.087s
user    0m1.681s
sys     0m0.151s

$ time guix environment --profile=$HOME/.guix-profile -- exit

real    0m1.250s
user    0m1.445s
sys     0m0.126s
--8<---------------cut here---------------end--------------->8---


In both cases, half the time is for “doing nothing“ and this “doing
nothing” is currently the major part of the slowness, especially on cold
cache: compare the attached graph.


Cheers,
simon

Attachment: cold-cache.svg
Description: cold-cache

Attachment: hot-cache.svg
Description: hot-cache


reply via email to

[Prev in Thread] Current Thread [Next in Thread]