From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uFK/NZSbAGVCGAEAG6o9tA:P1 (envelope-from ) for ; Tue, 12 Sep 2023 19:10:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uFK/NZSbAGVCGAEAG6o9tA (envelope-from ) for ; Tue, 12 Sep 2023 19:10:44 +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 166D340B50 for ; Tue, 12 Sep 2023 17:54:57 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=beffara.org header.s=gm1 header.b=IGp3IvHb; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694534097; a=rsa-sha256; cv=none; b=OijYm571i4rxUSSXhszWoB0CbLV8gHu9OvV9EfITZzTZ6GCc+KoHC/VW3ZHOeDja7EMczF LTGTnp3petwyTSIiliPeBigoHsthzC85+jxugZjOeuHWmQB6rHrkrr+bioe7cl65UaSYer l9EGZ7k1sYouu6Wrjr9AecpI4K6dGtRaeTn1ruIx/f49xmGAt2Ap7aoXYbSdA4TA3ixxWC eDSpo39LpYkfnSFbzgog97CEO2ASZaGYAK4OE1gFaHvfcobCcXJ/Shw41abBs4ZvOcGTmp lfArFrXzK/5qQpMp36BkqHejKVnH0zYa1xSUke4jJp/gE7suuz65OuIiL4SWhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694534097; 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: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=dp1T1frNsSHhG+JpoTAAiMBs/qRxFH+tw7fkfDFlRdE=; b=GYsA+M3cZhfp0hhC9XmFWRUFIEXMwgAVD6iZXXdozhH3/Jfoy5xNpXdSu91siqL82Z1M56 GJOMgu9U+Jiim1Alc5WGKWvY+rmpiLFlnWy1eJhlb/+F2zdnIDtosaFeuizmpRJZ2igcTM lGkN3kGcqLFcCRW/C53hUJRrEGLQiUoBf8EZU6ti6EoslSK+ERUBn0/01RGsBX6HtPFHFo RzMjHxQc+neD+43bfe/34lXpbdjNkw4VMHcg0XDgUgS1CmbHQxLT8kma8ipLNJrqoA+62k 1VD1x5fjtSbaCNsu+SMU3aT8eBnygP9XLQ0fY7imz0zOgMxsz16rm6sX2n0V/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=beffara.org header.s=gm1 header.b=IGp3IvHb; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg5id-0005jF-4o; Tue, 12 Sep 2023 11:54:27 -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 1qg5iV-0005j0-8a for guix-devel@gnu.org; Tue, 12 Sep 2023 11:54:19 -0400 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qg5iS-0007SU-8f for guix-devel@gnu.org; Tue, 12 Sep 2023 11:54:19 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 6223E1BF207 for ; Tue, 12 Sep 2023 15:54:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beffara.org; s=gm1; t=1694534052; h=from:from: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: references:references; bh=dp1T1frNsSHhG+JpoTAAiMBs/qRxFH+tw7fkfDFlRdE=; b=IGp3IvHbUOcMQ13N/2k2FcMdaAZg1SPEJM7MSgl2P9YnWcewE044qm7nQqJo1a6Zz06hPU MZkWYc+SdagJa2xPM3JCb5+pWon+b9nEZaCVBlajBS6GLudzlDXzTGiW5PuqB5AJYfvFSv pQHnHIMj4d0KcrKWAwJyCHthmnZekCX5Wl4hibmZXOe+IAqUoj0LNu9LNYDW37T6vH7qbS S/2Z1m3aEpaLSkJlxa0uCclxrPCCNYgWEEKIyPwkx9IcQkAYNy/XuqEODmbzfNmexNZEI2 hVjBti5Pn2/EkH6gWL36sdfe4J6q+dgoPK1HAaCI1cmJsotMcoUTeD8A6TtD0w== Date: Tue, 12 Sep 2023 17:54:10 +0200 Message-ID: <20230912175410.GC1121@beffara.org> From: Emmanuel Beffara To: guix-devel Subject: performance issue with TeX Live References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-GND-Sasl: manu@beffara.org Received-SPF: none client-ip=2001:4b98:dc4:8::228; envelope-from=manu@beffara.org; helo=relay8-d.mail.gandi.net 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_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.02 X-Spam-Score: -7.02 X-Migadu-Queue-Id: 166D340B50 X-Migadu-Scanner: mx2.migadu.com X-TUID: yuoWTu08x1gx 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 , 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