From: Roel Janssen <roel@gnu.org>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: guix-devel@gnu.org
Subject: Re: Performance on NFS
Date: Sat, 17 Jun 2017 09:36:56 +0200 [thread overview]
Message-ID: <87fuezkquf.fsf@gnu.org> (raw)
In-Reply-To: <87poe4c5y9.fsf_-_@gnu.org>
Hello!
Ludovic Courtès writes:
> Hello!
>
> I just pushed another improvement:
> d27cc3bfaafe6b5b0831e88afb1c46311d382a0b significantly reduces the
> number of ‘stat’ calls when discovering .scm files. I’d be curious to
> see what impact it has on NFS.
>
> Commit cbee955901b3e252ebdeb8066a2196055149198a also reduces the number
> of ‘stat’ calls.
>
> After that I have:
>
> --8<---------------cut here---------------start------------->8---
> $ ./pre-inst-env strace -c guix environment --ad-hoc coreutils -- true
> % time seconds usecs/call calls errors syscall
> ------ ----------- ----------- --------- --------- ----------------
> 27.03 0.006916 1 13585 read
> 24.64 0.006306 1 9701 8029 stat
> 21.25 0.005438 1 10698 write
> 11.05 0.002828 2828 1 wait4
> 3.60 0.000922 1 1598 122 open
> 2.88 0.000738 4 203 28 futex
> 1.79 0.000458 1 670 mmap
> 1.75 0.000448 1 642 mprotect
> 1.64 0.000419 0 1476 close
> 1.36 0.000347 0 1411 3 lseek
> 0.74 0.000190 2 107 sendfile
> 0.70 0.000180 4 51 getdents
> 0.62 0.000159 0 886 fstat
> 0.54 0.000137 1 196 lstat
> 0.22 0.000057 1 99 brk
> 0.09 0.000024 4 6 clone
> 0.02 0.000005 1 5 munmap
> 0.02 0.000005 0 19 rt_sigprocmask
> 0.02 0.000004 0 27 clock_gettime
> 0.01 0.000003 3 1 getrandom
> 0.01 0.000002 2 1 connect
> 0.01 0.000002 1 3 prlimit64
> 0.00 0.000001 1 2 2 access
> 0.00 0.000001 1 1 socket
> 0.00 0.000000 0 5 rt_sigaction
> 0.00 0.000000 0 7 1 ioctl
> 0.00 0.000000 0 1 madvise
> 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 getcwd
> 0.00 0.000000 0 1 statfs
> 0.00 0.000000 0 1 arch_prctl
> 0.00 0.000000 0 2 sched_getaffinity
> 0.00 0.000000 0 1 set_tid_address
> 0.00 0.000000 0 1 set_robust_list
> 0.00 0.000000 0 3 pipe2
> ------ ----------- ----------- --------- --------- ----------------
> 100.00 0.025590 41417 8185 total
> $ git describe
> v0.13.0-804-gf4453df9a
> --8<---------------cut here---------------end--------------->8---
>
> The number of ‘stat’ calls is a function of the number of entries in
> ‘GUILE_LOAD_PATH’ and ‘GUILE_LOAD_COMPILED_PATH’. I can’t think of any
> easy way to reduce it further.
>
> The many ‘read’ and ‘write’ are due to the unbuffered port used for
> RPCs, and definitely not great when talking to a remote store. I’ve
> tried to add some buffering but that turned out to be trickier than I
> had hoped for.
>
> To be continued!
>
> Ludo’.
I applied the patch, and here are the results:
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure -- true
The following derivations will be built:
/gnu/store/0hz8g844432b5h9zbqr9cpsjy0brg15h-profile.drv
/gnu/store/wkksb7bbx3jr0p6p5cj4kkphbwday0yd-info-dir.drv
/gnu/store/cd2mwx9qprdy23p7j3pik2zs14nifn36-manual-database.drv
Creating manual page database for 1 packages... done in 1.816 s
real 1m14.686s
user 0m5.761s
sys 0m0.498s
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure -- true
real 0m34.100s
user 0m5.599s
sys 0m0.414s
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure -- true
real 0m33.821s
user 0m5.140s
sys 0m0.432s
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure --no-substitutes --no-grafts -- true
The following derivations will be built:
/gnu/store/rvh0imjdimwm90nzr0fmr5gmp97lyiix-profile.drv
/gnu/store/5hm3v4afjf9gix92ixqzv9bwc11a608s-fonts-dir.drv
real 0m37.200s
user 0m3.408s
sys 0m0.284s
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure --no-substitutes --no-grafts -- true
real 0m19.415s
user 0m3.466s
sys 0m0.306s
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure --no-substitutes --no-grafts -- true
real 0m18.850s
user 0m3.536s
sys 0m0.346s
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure --no-grafts -- true
real 0m16.003s
user 0m3.246s
sys 0m0.301s
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure --no-grafts -- true
real 0m18.205s
user 0m3.470s
sys 0m0.314s
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure --no-substitutes -- true
real 0m33.731s
user 0m5.111s
sys 0m0.428s
[roel@hpcguix guix]$ time guixr environment --ad-hoc coreutils --pure --no-substitutes -- true
real 0m30.993s
user 0m5.049s
sys 0m0.458s
Why is grafting so slow, even if it doesn't have to graft anything?
So, because grafting is disk-intensive rather than CPU-intensive, it might
be a good idea to be able to globally disable grafting. (it would
reduce the after-we-build-it-time considerably for our cluster.)
Kind regards,
Roel Janssen
next prev parent reply other threads:[~2017-06-17 7:37 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-27 10:56 bug#27097: [PATCH] gnu: Add emacs-direnv Christopher Baines
2017-05-27 11:31 ` Combining Guix, direnv and Emacs for environment customisation Christopher Baines
2017-05-30 15:03 ` Ludovic Courtès
2017-05-30 15:03 ` bug#27097: " Ludovic Courtès
2017-06-01 13:17 ` Roel Janssen
2017-06-03 13:59 ` Ludovic Courtès
2017-06-03 13:59 ` bug#27097: " Ludovic Courtès
2017-06-03 21:08 ` Roel Janssen
2017-06-04 21:15 ` Ludovic Courtès
2017-06-04 21:15 ` bug#27097: " Ludovic Courtès
2017-06-05 22:37 ` Roel Janssen
2017-06-07 10:35 ` Performance on NFS Ludovic Courtès
2017-06-07 13:06 ` Roel Janssen
2017-06-09 13:46 ` Ludovic Courtès
2017-06-12 8:45 ` Roel Janssen
2017-06-12 8:45 ` [bug#27097] " Roel Janssen
2017-06-12 15:58 ` Ludovic Courtès
2017-06-16 15:23 ` Ludovic Courtès
2017-06-17 7:36 ` Roel Janssen [this message]
2017-06-17 22:40 ` Ludovic Courtès
2017-06-17 23:15 ` Roel Janssen
2017-06-18 8:43 ` Ricardo Wurmus
2017-06-19 8:01 ` RPC performance Ludovic Courtès
2017-06-19 8:15 ` Ludovic Courtès
2017-06-19 14:25 ` Ricardo Wurmus
2017-06-22 14:03 ` Andy Wingo
2017-06-22 16:05 ` Ludovic Courtès
2017-06-23 9:09 ` Andy Wingo
2017-06-23 9:24 ` Ludovic Courtès
2017-06-23 9:46 ` Andy Wingo
2017-06-26 11:54 ` Ludovic Courtès
2017-06-26 14:19 ` Andy Wingo
2017-06-19 21:25 ` Ludovic Courtès
2017-06-22 8:04 ` Ricardo Wurmus
2017-06-07 11:01 ` Combining Guix, direnv and Emacs for environment customisation Ricardo Wurmus
2017-06-07 12:25 ` Performance on NFS Ludovic Courtès
2017-06-07 12:59 ` Ricardo Wurmus
2017-06-07 12:59 ` bug#27097: " Ricardo Wurmus
2017-08-29 19:02 ` Combining Guix, direnv and Emacs for environment customisation Thompson, David
2017-08-29 22:30 ` Maxim Cournoyer
2017-08-30 5:52 ` Carlo Zancanaro
2017-08-30 10:09 ` Ludovic Courtès
2017-08-30 10:16 ` Ludovic Courtès
2017-05-28 20:09 ` bug#27097: [PATCH] gnu: Add emacs-direnv Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fuezkquf.fsf@gnu.org \
--to=roel@gnu.org \
--cc=guix-devel@gnu.org \
--cc=ludovic.courtes@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.