all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Christopher Baines <mail@cbaines.net>
Cc: 59078@debbugs.gnu.org
Subject: [bug#59078] [PATCH] lint: Split the derivation lint checker by system.
Date: Thu, 17 Nov 2022 18:22:41 +0100	[thread overview]
Message-ID: <87a64ph4wu.fsf@gnu.org> (raw)
In-Reply-To: <87leocfsnm.fsf@cbaines.net> (Christopher Baines's message of "Tue, 15 Nov 2022 08:35:42 +0000")

Hi,

Christopher Baines <mail@cbaines.net> 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’d like to understand
where all this memory is going; this is unreasonable.  The heap profiler
I posted recently¹, coupled with ‘gcprof’, might help us understand
what’s going on.

¹ 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 <store-connection>, such as
a static cache.  “GUIX_PROFILING=memoization” may give a hint.

I’d really like to get it solved before we come up with workarounds like
those we’re talking about.  (However I’ll postpone this one because I’d
like to focus on the release for now.)

Thanks,
Ludo’.




  reply	other threads:[~2022-11-17 17:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-06 13:55 [bug#59078] [PATCH] lint: Split the derivation lint checker by system Christopher Baines
2022-11-07 17:37 ` Christopher Baines
2022-11-11 21:57 ` Ludovic Courtès
2022-11-13 17:27   ` Christopher Baines
2022-11-14 12:51     ` Ludovic Courtès
2022-11-15  8:35       ` Christopher Baines
2022-11-17 17:22         ` Ludovic Courtès [this message]
2022-11-15  9:03       ` zimoun
2023-01-27 17:48         ` Simon Tournier
2023-01-31 16:33           ` Ludovic Courtès
2023-02-01  9:47             ` zimoun

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=87a64ph4wu.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=59078@debbugs.gnu.org \
    --cc=mail@cbaines.net \
    /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.