public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* Better way to handle apt cache needed
@ 2022-12-28  9:02 Moessbauer, Felix
  2022-12-28  9:21 ` Baurzhan Ismagulov
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Moessbauer, Felix @ 2022-12-28  9:02 UTC (permalink / raw)
  To: isar-users; +Cc: Schild, Henning

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.

Best regards,
Felix

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2023-02-14 16:47 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-28  9:02 Better way to handle apt cache needed 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
2023-01-05  6:31 ` Uladzimir Bely
2023-01-05 17:10   ` Roberto A. Foglietta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox