From: Emmanuel Beffara <manu@beffara.org>
To: guix-devel <guix-devel@gnu.org>
Subject: performance issue with TeX Live
Date: Tue, 12 Sep 2023 17:54:10 +0200 [thread overview]
Message-ID: <20230912175410.GC1121@beffara.org> (raw)
Hello Guix devel,
I am facing a severe performance issue with TeX Live: compilation of any
document is an order of magnitude slower with a Guix installed system as
compared to a manual installation. Is anyone confronted to this phenomenon, or
is there a way to fix this ?
I suspect the problem comes from kpathsea, but I may be misinterpeting my
observations. The fact is that there is an enormous amount of file accesses
for any compilation.
As an experiment, I compared two installations.
- One is a pure Guix installation, managed with `guix home`, that contains a
rather large collection of packages that I include through a custom package:
(define-public texlive-scheme-eb
(package
(name "texlive-scheme-eb")
(version (number->string %texlive-revision))
(source #f)
(build-system trivial-build-system)
(arguments (list #:builder #~(mkdir #$output)))
(propagated-inputs
(list texlive-scheme-medium
texlive-collection-fontsextra
texlive-collection-latexextra
texlive-collection-pictures))
(home-page "https://www.tug.org/texlive/")
(synopsis "EB's custom installation scheme")
(description "This my a TeX Live scheme with what I use.")
(license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
- The other is manual, I set up a container with
$ guix shell --container -F --network --share=$HOME/opt=/opt bash coreutils curl grep gzip ncurses perl sed tar wget
in which I installed TeX Live using `install-tl` as found on
<https://tug.org/texlive/>, in the folder `/opt` exposed in the container.
I installed the same package set by selecting the medium scheme in
`install-tl` and installing the collections above with the provided `tlmgr`.
On my machine (a rather recent and powerful Dell Latitude 7410 with 16GiB RAM
and 12 cores), I observe the following timings:
- For a minimal LaTeX document (title, author and one word of body text)
running `time pdflatex doc.tex` I get the following timings in the Guix
version:
real 0m4,288s
user 0m3,140s
sys 0m1,148s
and in the manual version:
real 0m0.773s
user 0m0.729s
sys 0m0.044s
- For a small beamer slideshow with nothing exotic (474 source lines, 17
slides, no tikz graphics or anything), I get the following timings in the
Guix version:
real 1m0,122s
user 0m14,337s
sys 0m44,279s
and in the manual version:
real 0m4.554s
user 0m4.446s
sys 0m0.108s
I tried doing `strace` on the pdflatex calls to investigate further and it
appears that the behaviours of the two versions are largely different.
Counting the number of system calls of each kind gives the following, for the
most frequent calls:
- minimal document, Guix version:
112860 newfstatat
10491 getdents64
5247 openat
5246 close
4397 access
3141 read
- minimal document, manual version:
2772 read
90 openat
72 access
64 close
64 newfstatat
60 getdents64
- slideshow, Guix version:
2831722 getdents64
1538560 newfstatat
1498287 access
1415296 openat
1415295 close
4283 read
- slideshow, Guix version:
3913 read
1288 getdents64
1136 access
960 openat
925 close
920 newfstatat
So apparently no file hash is used in the Guix version and a large part of the
`texmf-dist` folder is browsed, probably several times.
--
Emmanuel
next reply other threads:[~2023-09-12 17:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 15:54 Emmanuel Beffara [this message]
2023-09-12 17:11 ` performance issue with TeX Live Olivier Dion
2023-09-13 12:42 ` Emmanuel Beffara
2023-09-13 12:39 ` Nicolas Goaziou
2023-10-09 9:11 ` Emmanuel Beffara
2023-10-09 14:03 ` Nicolas Goaziou
2023-10-10 8:04 ` Emmanuel Beffara
2023-10-11 16:16 ` Ricardo Wurmus
2023-10-14 16:06 ` Maxim Cournoyer
2023-10-16 12:22 ` Emmanuel Beffara
2023-10-16 13:46 ` Maxim Cournoyer
2023-10-16 15:16 ` Emmanuel Beffara
2023-10-16 16:23 ` Maxim Cournoyer
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=20230912175410.GC1121@beffara.org \
--to=manu@beffara.org \
--cc=guix-devel@gnu.org \
/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.