From: Adrian Bunk <bunk@stusta.de>
To: "André Draszik" <git@andred.net>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures
Date: Tue, 25 Feb 2020 11:54:12 +0200 [thread overview]
Message-ID: <20200225095412.GA7740@localhost> (raw)
In-Reply-To: <861ecc2be15dcbfcb8cb5a6dac481561d235ddd9.camel@andred.net>
On Tue, Feb 25, 2020 at 09:16:20AM +0000, André Draszik wrote:
> On Tue, 2020-02-25 at 00:00 +0200, Adrian Bunk wrote:
>...
> > > Perhaps we just allow the number of xz threads
> > > to be set independently?
> >
> > dpkg manually reduces the number of threads until less than half
> > of the RAM is used:
> > https://sources.debian.org/src/dpkg/1.19.7/lib/dpkg/compress.c/#L566-L574
> >
> > In a script it would be possible to use --no-adjust to achieve the same:
> > $ xz -9 --memlimit=50% --no-adjust -T32 /dev/null
> > xz: Memory usage limit is too low for the given filter setup.
> > xz: 39,972 MiB of memory is required. The limit is 32,051 MiB.
> > $
>
> The problem with --no-adjust is that it also prevents xz from reducing the
> number of threads. It will do that in preference to changing compression
> parameters, so as long as you have more than 2499MiB of memory to support at
> least 2 threads (with default block size), compression will be identical.
>...
5 GB due to the 50%.
But I had something different in mind:
Similar to what dpkg is doing, you could once loop from
@oe.utils.cpu_count() down to 2 until "--memlimit=50% --no-adjust -T$(i)"
succeeds.
Then run the actual compression without --memlimit.
I would not consider anything with less than 4 GB RAM reasonable for
building Yocto (g++ also likes to use more than 2 GB).
> Cheers,
> Andre'
cu
Adrian
next prev parent reply other threads:[~2020-02-25 9:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 12:59 [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures André Draszik
2020-02-24 13:40 ` Adrian Bunk
2020-02-24 14:21 ` André Draszik
2020-02-24 14:31 ` Adrian Bunk
2020-02-24 14:58 ` André Draszik
2020-02-24 15:10 ` Adrian Bunk
2020-02-25 11:16 ` reproducible builds involving xz (was: Re: [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures) André Draszik
2020-02-25 11:23 ` Richard Purdie
2020-02-24 16:44 ` [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures Richard Purdie
2020-02-24 17:12 ` Adrian Bunk
2020-02-24 17:14 ` André Draszik
2020-02-24 17:32 ` Richard Purdie
2020-02-24 22:00 ` Adrian Bunk
2020-02-25 9:16 ` André Draszik
2020-02-25 9:54 ` Adrian Bunk [this message]
2020-02-26 15:26 ` xz threads / memlimit behaviour (was: Re: [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures) André Draszik
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=20200225095412.GA7740@localhost \
--to=bunk@stusta.de \
--cc=git@andred.net \
--cc=openembedded-core@lists.openembedded.org \
/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 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.