From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2KqnFkqEkGRCBAEASxT56A (envelope-from ) for ; Mon, 19 Jun 2023 18:37:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uPGjFkqEkGSIcwEAauVa8A (envelope-from ) for ; Mon, 19 Jun 2023 18:37:30 +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 220AD155BD for ; Mon, 19 Jun 2023 18:37:30 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBHsG-0003I7-DZ; Mon, 19 Jun 2023 12:37:04 -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 1qBHsF-0003HS-AW for bug-guix@gnu.org; Mon, 19 Jun 2023 12:37:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBHsF-0008Ew-0U for bug-guix@gnu.org; Mon, 19 Jun 2023 12:37:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qBHsE-0004rN-Rm for bug-guix@gnu.org; Mon, 19 Jun 2023 12:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63986: Julia is very slow Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 19 Jun 2023 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63986 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Cayetano Santos Cc: 63986@debbugs.gnu.org, Nicolas Graves , Efraim Flashner Received: via spool by 63986-submit@debbugs.gnu.org id=B63986.168719258718615 (code B ref 63986); Mon, 19 Jun 2023 16:37:02 +0000 Received: (at 63986) by debbugs.gnu.org; 19 Jun 2023 16:36:27 +0000 Received: from localhost ([127.0.0.1]:57145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBHre-0004q2-IT for submit@debbugs.gnu.org; Mon, 19 Jun 2023 12:36:27 -0400 Received: from mail-wm1-f49.google.com ([209.85.128.49]:41367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBHrd-0004pb-0q for 63986@debbugs.gnu.org; Mon, 19 Jun 2023 12:36:25 -0400 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3f99aa36d18so3589905e9.1 for <63986@debbugs.gnu.org>; Mon, 19 Jun 2023 09:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687192579; x=1689784579; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ZcUH8qQXjO1AO6zqsBgLlZlizTYB9gGb6Q13jkadH1Y=; b=auB/dNZRAzyahfDZHsnpI8rxRCtDvT4Mwi5eYVDzVITa3OzBcMLuap7LoZV+ytMavr h6G5PhH3voj2PCRQ8tQ9UEdfJwYBSWI6NiFe96cwL39lj8kbiU+988Akq+yPXKw8tq0C Av4MHegCowNyBl/7PH3LQ/1CS0Wyrw6sSpDPQ79FRiVwu2evPNQo+UTYZpOBuI/agTa6 znEQ7E8rqBIV8mOijccCHYjry7hWPyjsvQWpttZBqUi+iV59BSCB62meReEbvlj24Lxm u0DcYyZiPGK/VQqoQlfDsoLpTpmoSF2+WG45qkecuaoUZz4TpfHJjtQm4loYwQVNL5/U tw5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687192579; x=1689784579; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZcUH8qQXjO1AO6zqsBgLlZlizTYB9gGb6Q13jkadH1Y=; b=iLEiH78ICK9Y2BzG27W+1PqrsALL0G2T5a0j3Nmhs0vbzR/puVG2ciHCpOR8sS5PAG YkUduH1OS5kaand8gQzFcy0d7TNTIp9mTFFyKT5O8lnmNxIgsP/IQCzhpgt35z8/kHWR X6SCwor2mqt9+xXX7jte0YoKLvGmEua6GtXYdMLQgLTIgy/yESk9eAH1ppnZZIwtTkal rskd+7daofFGejDcMf8EL/vivgR8VrbslTyuRy97Yw6uckE89R1mfWx9gVkGqfwBnN59 5lTiE8j+SBYhEDmHQhhxXh4GhcpveBhIFrIQb8S1doDeUWuGFKPHlT3Wk2OnvIFQk4ky qEEg== X-Gm-Message-State: AC+VfDz2+BjjX6q2GKc2SH+LQSHg4rMVZz23TwJqyHaGqfsFEuphnYzQ dqQSLZwu5mivADzQSZ9NWhs= X-Google-Smtp-Source: ACHHUZ5CuFQyiWvDxlNgMQuajmqdoE5Pp1wyarVC6Gh5BrreiCFWnyy+9ow2FJ2QMj6jW9kQimsZuQ== X-Received: by 2002:a1c:ed17:0:b0:3f5:f543:d81f with SMTP id l23-20020a1ced17000000b003f5f543d81fmr11017421wmh.3.1687192579107; Mon, 19 Jun 2023 09:36:19 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id v8-20020a05600c214800b003f42314832fsm173372wml.18.2023.06.19.09.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 09:36:18 -0700 (PDT) From: Simon Tournier In-Reply-To: <87jzw6rq48.fsf@gnu.org> References: <87legsl3cm.fsf@inventati.org> <87jzw6rq48.fsf@gnu.org> Date: Mon, 19 Jun 2023 18:13:48 +0200 Message-ID: <871qi7a0qr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687192650; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZcUH8qQXjO1AO6zqsBgLlZlizTYB9gGb6Q13jkadH1Y=; b=mcMjBNWz0BqnjgIF1oP2QFwLYx+99ywpndb01bs2Ke1S+kMMjlGz1k5W6obGYK5/iz0lVY hN9jH2Dxhk7LT/iBVsx56krSwh+36qDqQ76PpKpY5FEOKr0Y9mVKEm6zZseH8l/6PtChLL h5I3cZyI7fxZqDmAsakKAr7BfTsjt5E7bVMaoeNzAdhVPRdEDiwx2nz8eblsHd4TcBErYU CZImWNrWPtwQhwNkIbAPC4UHbIbswM9I15hDz1DzPeWuAZAJUEk1z5T4ZAC4MYxtRaW4Q7 MT8LtSf8pyJeJtju2y8FMsxpk1lIM/ydC0FfKIPpHMyVicMmdmlYzcSRd+f1AQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="auB/dNZR"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687192650; a=rsa-sha256; cv=none; b=gBk8CIgT9NEZr4aI5wVuGYH9Xwv2BSN5VKvpoxYMzC0LDkmdlg5kSMQ/8iwdrqKGm0d+ye Qn3Gd0uD5obTocNMwIvYym2TIxfKD8lmj2jZ9r6KiOOKbydGqFLkUGoCN2ef53k2aNMrnV XDxafRv4WkJo7r3unNIjra5Wt0TBOFHr813vmrFY6KICO3LYzDt3wTJfGdPFNzdUasLP6n mjZhG0MgZH1mqRhNjlxIbCEZZxqUnvlSfFVs4GRCLZN1ghpcrzV+75deBcBi0klH18XB4d S/cOCol7Hs3l7mpKQPrCBJFY2Bo1gO0ViazkZz4fTNM/kr+QYlxowXwIUkMXww== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.65 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="auB/dNZR"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 220AD155BD X-Spam-Score: -0.65 X-TUID: jAau6Q0W21Dh Hi, On Wed, 14 Jun 2023 at 18:00, Ludovic Court=C3=A8s wrote: > Cc=E2=80=99in Efraim, Simon, and Nicolas who=E2=80=99ve looked into Julia= packaging in > the past. Hopefully we can get inspiration from Arch=E2=80=99s build rec= ipe! Hum, the difference seems: USE_SYSTEM_DSFMT=3D0 USE_SYSTEM_LIBUV=3D0 which are set to 1 in our Guix recipe; I guess it does not come from that. And we link against OpenBLAS and they link against some NETLIB; I guess it does not come from that. Well, the other difference could be =E2=80=9Cmake release=E2=80=9D that we do not run. Maybe? Somehow, it seems from the ability to exploit the multicore, IIUC. Using the binary generated by upstream: --8<---------------cut here---------------start------------->8--- $ ldd julia-1.9.1/bin/julia=20 linux-vdso.so.1 (0x00007fffd83f1000) libdl.so.2 =3D> /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f08fb274000) libpthread.so.0 =3D> /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f08fb25= 1000) libc.so.6 =3D> /lib/x86_64-linux-gnu/libc.so.6 (0x00007f08fb05f000) libjulia.so.1 =3D> /tmp/julia-1.9.1/bin/../lib/libjulia.so.1 (0x00007f08fb= 03c000) /lib64/ld-linux-x86-64.so.2 (0x00007f08fb28e000) $ ldd julia-1.6.7/bin/julia=20 linux-vdso.so.1 (0x00007fffcdbd7000) libdl.so.2 =3D> /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f822423f000) libpthread.so.0 =3D> /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f822421= c000) libc.so.6 =3D> /lib/x86_64-linux-gnu/libc.so.6 (0x00007f822402a000) libjulia.so.1 =3D> /tmp/julia-1.6.7/bin/../lib/libjulia.so.1 (0x00007f8223= e04000) /lib64/ld-linux-x86-64.so.2 (0x00007f8224259000) --8<---------------cut here---------------end--------------->8--- And please note it also contain all these binaries: --8<---------------cut here---------------start------------->8--- libamd.so -> libamd.so.2.4.6 libamd.so.2 -> libamd.so.2.4.6 libamd.so.2.4.6 libatomic.so -> libatomic.so.1.2.0 libatomic.so.1 -> libatomic.so.1.2.0 libatomic.so.1.2.0 libblastrampoline.so -> libblastrampoline.so.5 libblastrampoline.so.5 libblastrampoline.so.5.4.0 -> libblastrampoline.so.5 [...] libsuitesparseconfig.so -> libsuitesparseconfig.so.5.10.1 libsuitesparseconfig.so.5 -> libsuitesparseconfig.so.5.10.1 libsuitesparseconfig.so.5.10.1 libumfpack.so -> libumfpack.so.5.7.9 libumfpack.so.5 -> libumfpack.so.5.7.9 libumfpack.so.5.7.9 libunwind.so -> libunwind.so.8.0.1 libunwind.so.8 -> libunwind.so.8.0.1 libunwind.so.8.0.1 libuv.so -> libuv.so.2.0.0 libuv.so.2 -> libuv.so.2.0.0 libuv.so.2.0.0 libz.so -> libz.so.1 libz.so.1 -> libz.so.1.2.13 libz.so.1.2.13 sys.so --8<---------------cut here---------------end--------------->8--- I get these time: + ~7ms v1.9.1 + ~18ms v1.6.7 compared to ~500ms of v1.8.3 provided by Guix. I guess the issue is about =E2=80=9Cthreading=E2=80=9D. Most of the time i= s about =E2=80=99futex=E2=80=99 in the Guix version. --8<---------------cut here---------------start------------->8--- $ head v1.9.1.txt=20 % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 83.48 5.682198 6 926675 sched_yield 14.87 1.011882 987 1025 futex 0.42 0.028269 2 12308 rt_sigprocmask 0.35 0.023628 9 2592 madvise 0.18 0.012532 6266 2 wait4 0.18 0.012353 10 1227 epoll_wait 0.17 0.011707 2 5015 13 read 0.09 0.006235 13 448 brk $ head v1.6.7.txt 245193 ????( % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 86.41 5.870043 5 1008236 sched_yield 12.85 0.872865 467 1869 futex 0.26 0.017538 3 5165 madvise 0.09 0.006171 2 2173 12 read 0.07 0.004486 13 321 brk 0.06 0.004242 2 1772 rt_sigprocmask 0.05 0.003197 2 1554 456 statx $ head vguix.txt % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 88.96 7.843293 4621 1697 2 futex 6.88 0.606245 31 19080 sched_yield 1.74 0.153092 153092 1 1 rt_sigtimedwait 0.48 0.041975 1 26317 1 read 0.36 0.032148 1 27602 rt_sigprocmask 0.34 0.030236 10078 3 1 wait4 0.33 0.028833 1 20780 mincore 0.33 0.028801 1 22424 write --8<---------------cut here---------------end--------------->8--- Hum, I do not know=E2=80=A6 It needs some investigations. Thanks for the report. Cheers, simon