From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WE1mOgxudmNQlwAAbAwnHQ (envelope-from ) for ; Thu, 17 Nov 2022 18:23:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UKd5OQxudmPivgAAG6o9tA (envelope-from ) for ; Thu, 17 Nov 2022 18:23:24 +0100 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 7592830E37 for ; Thu, 17 Nov 2022 18:23:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovibd-0005mH-1M; Thu, 17 Nov 2022 12:23:18 -0500 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 1ovibS-0005kd-Hj for guix-patches@gnu.org; Thu, 17 Nov 2022 12:23:10 -0500 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 1ovibO-0005ky-9j for guix-patches@gnu.org; Thu, 17 Nov 2022 12:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovibO-00050z-3U for guix-patches@gnu.org; Thu, 17 Nov 2022 12:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59078] [PATCH] lint: Split the derivation lint checker by system. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 17 Nov 2022 17:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59078 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 59078@debbugs.gnu.org Received: via spool by 59078-submit@debbugs.gnu.org id=B59078.166870577319246 (code B ref 59078); Thu, 17 Nov 2022 17:23:02 +0000 Received: (at 59078) by debbugs.gnu.org; 17 Nov 2022 17:22:53 +0000 Received: from localhost ([127.0.0.1]:34224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovibE-00050M-Mw for submit@debbugs.gnu.org; Thu, 17 Nov 2022 12:22:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovibB-000506-Ho for 59078@debbugs.gnu.org; Thu, 17 Nov 2022 12:22:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovib6-0005gx-7f; Thu, 17 Nov 2022 12:22:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=IDEz3EsCy9TPnfsPZVcnWX7/J8OlFq8kBCh15P1Pa54=; b=NFCZucqDYuVq6MbGlb3y CkSKbPsfAakFhjRiQ3LgkBkg/7p2Jq12UnvNnFiczh98Te+ri3JiH2CmumBnMVPxdqWxnUMsczV/o G1O3buMDKUeN54cH3aCfYLRAYfRQ4htqKbpHK52qzNm6wvVZWnUpF4oCE+6y9G5jRJ0QsVDsH5EEG Ff5A8YD0UPhjAMKvScdCB72nExIcQ4UwkWkVl69ORvrb/QydcsPxd/BO9MgfNMvtQJgxZ0o05I2aB mE23d4KF698Iwh57Iz5ysIjcy3iw0cPIQqIJ9d88pjp7AxwIa2ymjAC4zYb8ujppfj+8KuV2IxpYm ZWZTL1wm/8VbwQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovib5-0008EA-Rq; Thu, 17 Nov 2022 12:22:44 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20221106135532.5724-1-mail@cbaines.net> <87k041dui7.fsf@gnu.org> <87bkpau4kl.fsf@cbaines.net> <87h6z1puli.fsf@gnu.org> <87leocfsnm.fsf@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 27 Brumaire an 231 de la =?UTF-8?Q?R=C3=A9volution, ?= jour du Macjon X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 17 Nov 2022 18:22:41 +0100 In-Reply-To: <87leocfsnm.fsf@cbaines.net> (Christopher Baines's message of "Tue, 15 Nov 2022 08:35:42 +0000") Message-ID: <87a64ph4wu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668705804; 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=IDEz3EsCy9TPnfsPZVcnWX7/J8OlFq8kBCh15P1Pa54=; b=a/EKk2aUv+NNWDPU6mR/s8FAPsphfOrGCx+3kVNFE05x9h+qtP4GM+M/x0syX0VSiqypdo X/gTo1X1ciLIqNLpH5KqkLMBvfUnlzSQY/yU90qELP7hrmbHkqlaEmvgchH0C5PFlo2Aiu hjqZyeipnL+UdfFmStXAvOIiaclqWtoj6OIYUK34tSoBXOQBJCfI6Q3SOsJaOiQsUGjsSp sp4Rlc69XRw5I1QlfNHf1lhWFG+WtJiN7S6vQz9qwCEeyoEGbHgBuzzZmuABOq7uJMiXhb RVJVCVm9TO+SZ23TzMulaVs1VHcW9EnA4UtzDrhsotJQ+s8Ntn6AdRal4In3Pg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668705804; a=rsa-sha256; cv=none; b=NRPLI9SuOGNNkKZ3d9yRXfJNJLHexyHbEt1EusBkZ/WAUYBAQv5Ba+Ydsw3dkd2LQ3RlXO vV+7vRMIOCVEiuQo6iOHdURObzIqmX3lTdfKfZumu4aPe5XqmI/rfGTKqTYpRZO0XfXDBF dl38TlCKP1E97qchaujfWq3mRryVO7rqIQ0xRjf5dUyhgxPHuBkzw9lFqCGtR6VhA4/229 /5xkJ8WtvNAYjHRYwQKl5hecpx3Zlmzg6eE6dj9ghHkaD6RpfASoWRvS2ZZFly6rcZNd2c HzgpLVhS3ATgm58oGd1WFPfur3iwR0ZoaQo02iijPvOCndnJDHOLcHK6xQYGJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=NFCZucqD; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=NFCZucqD; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7592830E37 X-Spam-Score: -5.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: kVZz629mHMGV Hi, Christopher Baines skribis: > I've put some numbers below, with no changes the last batch to finish > processing leaves the heap at 7755MiB [1], then Guile crashes after > that. > > With the patch you sent, the heap size seems to stabilise at 4042MiB > [2]. It also crashes at the end due to the match block not matching '(), > but that's not important. > > I also hacked the lint script to run the checkers in the same manor as > the Guix Data Service, so one checker at a time rather than one package > at a time. That led to a max heap size of 3505MiB [3]. Thanks for testing and reporting back! > Reducing the memory usage helps reduce the cost/improve the throughput > of loading data in to the Guix Data Service which is my primary > motivation here. I'm also not only concerned with reducing the peak > memory usage, but trying to have an implementation that'll gracefully > handle more systems being supported in the future. Understood. From the viewpoint of core Guix, I=E2=80=99d like to understand where all this memory is going; this is unreasonable. The heap profiler I posted recently=C2=B9, coupled with =E2=80=98gcprof=E2=80=99, might help = us understand what=E2=80=99s going on. =C2=B9 https://lists.gnu.org/archive/html/guile-user/2022-11/msg00012.html > 1: no batching, one derivation checker [...] > 7755.0 MiB > > 2: batches of 1000 with fresh store connection, one derivation checker > 1057.0 MiB > 1137.0 MiB > 1481.0 MiB > 1481.0 MiB > 1481.0 MiB > 1481.0 MiB > 1697.0 MiB > 1697.0 MiB > 1697.0 MiB > 1761.0 MiB > 1761.0 MiB > 1761.0 MiB > 1937.0 MiB > 1977.0 MiB > 1985.0 MiB > 3065.0 MiB > 3633.0 MiB > 4041.0 MiB > 4042.0 MiB > 4042.0 MiB > 4042.0 MiB This seems to indicate a memory leak outside , such as a static cache. =E2=80=9CGUIX_PROFILING=3Dmemoization=E2=80=9D may give a = hint. I=E2=80=99d really like to get it solved before we come up with workarounds= like those we=E2=80=99re talking about. (However I=E2=80=99ll postpone this one= because I=E2=80=99d like to focus on the release for now.) Thanks, Ludo=E2=80=99.