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: Guix Devel <guix-devel@gnu.org>
Subject: Re: Persistent heap usage when computing derivations
Date: Sat, 30 Nov 2024 16:53:35 +0100	[thread overview]
Message-ID: <87jzckyayo.fsf@gnu.org> (raw)
In-Reply-To: <87a5e8tc9i.fsf@cbaines.net> (Christopher Baines's message of "Sat, 09 Nov 2024 19:53:13 +0000")

Hi Christopher,

Apologies for not answering earlier.

Christopher Baines <mail@cbaines.net> skribis:

> One of the memory problems I'm having relates to the Guix inferior
> processes that the data service uses when computing derivations. The
> data serivce goes through the list of systems (x86_64-linux,
> aarch64-linux, ...) and because the data cached for x86_64-linux
> probably doesn't relate to aarch64-linux, there's some code that
> attempts to clear the caches [1].
>
> 1: https://git.savannah.gnu.org/cgit/guix/data-service.git/tree/guix-data-service/jobs/load-new-guix-revision.scm#n1970
>
> Unfortunately this code has to reach in to Guix internals to try and do
> this, and it does reduce the heap usage significantly, but this doesn't
> result in stable memory usage. Each system processed seems to add about
> 250MiB of data to the Guile heap that isn't cleared out. To me that
> sounds like a lot of memory, but there's also a lot of systems/targets,
> so overall this leads to the inferior process using with around 6GiB of
> data in the heap after processing all the systems/targets. This peak
> memory usage really limits how much the machine can do.

Did you consider running one inferior per system type, as a way to
sidestep the problem?

This is what ‘cuirass evaluate’ does and it manages to run typically 4
of them in parallel (x86_64-linux, i686-linux, aarch64-linux, and
powerpc64le-linux).  Memory usage may be high but at least it’s not a
blocker.

  https://git.savannah.gnu.org/cgit/guix/guix-cuirass.git/tree/src/cuirass/scripts/evaluate.scm#n137

Ludo’.


      reply	other threads:[~2024-11-30 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-09 19:53 Persistent heap usage when computing derivations Christopher Baines
2024-11-30 15:53 ` Ludovic Courtès [this message]

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=87jzckyayo.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@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.