public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: "Moessbauer, Felix (T CED INW-CN)" <felix.moessbauer@siemens.com>
Cc: "isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: Better way to handle apt cache needed
Date: Mon, 2 Jan 2023 17:15:57 +0100	[thread overview]
Message-ID: <20230102171557.42d08791@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <371e4d826cca6aaba11a4222fef547b134ed6ce7.camel@siemens.com>

Am Wed, 28 Dec 2022 10:02:13 +0100
schrieb "Moessbauer, Felix (T CED INW-CN)"
<felix.moessbauer@siemens.com>:

> Hi,
> 
> when working with builds that have both many recipes, as well as many
> build dependencies, disk usage explodes during the build. As both
> preconditions somehow correspond, this results in a quadratic disc
> consumption in the number of tasks during the build.
> 
> The root cause for that behavior is the apt cache
> (deb_dl_dir_(import|export)), that copies all previously downloaded
> apt packages into the WORKDIR of each (bitbake) package.
> Given, that a common apt-cache is around 2GB and 8 tasks are run in
> parallel, this gives already 16GB for the tasks, and 7 * 2GB for the
> buildchroots (host and target), in total ~30GB.
>
> In one of my projects, we have to work with huge debian packages,
> leading to apt-cache sizes around 20GB. As these projects usually also
> have to be built on big machines with many cores, you easily get 500GB
> of required scratch disk space + a lot of disc accesses for the copy,
> making it basically impossible to build the project except by limiting
> the number of tasks that run in parallel.
> 
> Given that, we should really think about a way to get the disc
> consumption back to a linear level. Ideally, we would only use
> symlinks or maybe hardlinks to deduplicate. Another option would be
> to use the POSIX atomicity guarantees by just renaming packages when
> inserting into the cache.
> 
> Anyways, we need a better solution.
> Putting Henning as the author of that logic in CC.

Thanks for bringing that up. I did not yet realize that problem but it
sounds very real and valid.

That thread here is already very long just looking at it and not having
read much of it.

All i can say in my defense is that sbuild is likely what took as from
linear to multiplication. So technically i have nothing to do with any
of this ;).

Henning

> Best regards,
> Felix


  parent reply	other threads:[~2023-01-02 16:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28  9:02 Moessbauer, Felix
2022-12-28  9:21 ` Baurzhan Ismagulov
2022-12-28  9:45   ` Moessbauer, Felix
2022-12-28 10:23     ` Uladzimir Bely
2022-12-28 11:04       ` Moessbauer, Felix
2022-12-29 23:15         ` Roberto A. Foglietta
2022-12-30  4:38           ` Uladzimir Bely
2022-12-30  7:08             ` Roberto A. Foglietta
2022-12-30  6:05           ` Moessbauer, Felix
2022-12-30  8:27             ` Roberto A. Foglietta
2022-12-30 10:04               ` Moessbauer, Felix
2022-12-30 13:11               ` Moessbauer, Felix
2022-12-30 13:33                 ` Roberto A. Foglietta
2022-12-30 13:47                   ` Roberto A. Foglietta
2022-12-31  8:59                     ` Roberto A. Foglietta
2022-12-31 21:03                       ` Roberto A. Foglietta
2023-01-09  8:12                       ` Roberto A. Foglietta
2023-01-09  9:58                         ` Roberto A. Foglietta
2023-01-19 18:08                           ` Roberto A. Foglietta
2023-01-25  4:48                             ` Roberto A. Foglietta
2023-02-10 16:05                               ` Roberto A. Foglietta
2023-02-14 10:01                                 ` Roberto A. Foglietta
2023-02-14 16:46                                   ` Roberto A. Foglietta
2022-12-30 12:29           ` Roberto A. Foglietta
2022-12-28  9:22 ` Florian Bezdeka
2023-01-02 16:15 ` Henning Schild [this message]
2023-01-05  6:31 ` Uladzimir Bely
2023-01-05 17:10   ` Roberto A. Foglietta

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=20230102171557.42d08791@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox