From: Ferry Toth <fntoth@gmail.com>
To: Randy MacLeod <randy.macleod@windriver.com>,
Alexander Kanavin <alex.kanavin@gmail.com>,
contrib@zhengqiu.net
Cc: Janne Kiiskila <janne.kiiskila@izumanetworks.com>,
Quentin Schulz <quentin.schulz@theobroma-systems.com>,
"yocto@lists.yoctoproject.org" <yocto@lists.yoctoproject.org>,
richard.purdie@linuxfoundation.org, martin.jansa@gmail.com,
Trevor Gamblin <tvgamblin@gmail.com>
Subject: Re: [yocto] bitbake controlling memory use
Date: Sat, 14 Jan 2023 23:33:30 +0100 [thread overview]
Message-ID: <ff270ff7-1014-78eb-55e3-cc5c8ced050d@gmail.com> (raw)
In-Reply-To: <77731899-2e25-e55b-e7c9-0eec0a0c6ed1@gmail.com>
Hi,
Op 10-01-2023 om 10:24 schreef Ferry Toth:
> Hi,
>
> On 10-01-2023 02:57, Randy MacLeod wrote:
>> Add Zheng.
>> Switch to Trevor's gmail since he might still be interested in this.
>>
>> On 2023-01-09 05:49, Ferry Toth via lists.yoctoproject.org wrote:
>>> Hi
>>>
>>> On 09-01-2023 11:39, Alexander Kanavin wrote:
>>>> On Sun, 8 Jan 2023 at 23:13, Ferry Toth <fntoth@gmail.com> wrote:
>>>>
>>>>> Now it works I'm not sure what to do. Richard marked the original
>>>>> patch
>>>>> as WIP. Maybe it's not appropriate for including into poky? If so I
>>>>> wouldn't mind carrying it in meta-intel-edison.
>>>>>
>>>>> Or may be with a little work (from me) and a run on the CI servers we
>>>>> could make it go in?
>>>> I'd rather teach make/ninja upstream to watch memory consumption
>>>> and/or host pressure directly (e.g. similar to how it handles -l). And
>>>> offer any resulting patches to upstream first.
>>
As there is already a clone of ninja available with jobserver support
available I added another patch to update to that version and make an
intercept to actually pass the named pipe to ninja.
Find it here: https://github.com/htot/poky/commits/kirkstone
This makes both make and ninja threads running from a shared thread
pool. As cmake relies on ninja recipies are covered as well.
I guess this takes care of the majority of recipes.
In my case this new patch shaves no more then 1 minutes from my image
build time (1h46) as the recipes built using ninja are not consuming
that much memory (like nodejs). I hope others will benefit more.
Todo: location of the pipe as mentioned by Richard
>> Zheng and I *started* on that for make over the Xmas holiday.
>> See the (poorly formatted) thread:
>> Add support for limiting CPU pressure, contrib, 2022/12/20
>> in:
>> https://lists.gnu.org/archive/html/bug-make/2022-12/threads.html
>>
>> There were mixed reviews upstream with the maintainer, Paul Smith,
>> seeming to prefer that we investigate the job server approach and the
>> current
>> load averaging. I'll happily try to find time to play with Ferry's
>> job server work.
>>
> The work is actually Richard's. I only fixed what broke over time.
>> I've been thinking about the various workflows and as Richard said,
>> it seems
>> that for many people who only do one build at a time, the job server
>> and maybe
>> a little linker restraint, would be all that's needed. For activities
>> such
>> as YP AB, we could teach the main job server to also look at
>> /proc/pressure
>> as a way to limit the pool size we could make a meta-jobserver for
>> those who don't
>> want/need to worry about non-compile tasks such as tests and build
>> clean-up.
>>
>>
>> Note that cargo has the notion of a job server:
>> https://github.com/rust-lang/cargo/issues/1744
>> https://github.com/rust-lang/cargo/pull/4110
>>
>>
>> and ninja has an open issue:
>> https://github.com/ninja-build/ninja/issues/1139
>> and an initial implementation:
>> https://github.com/stefanb2/ninja/tree/topic-jobserver-fifo
>>
>> What other build tools are in need of regulation and/or job server
>> patches?
>>
> What I read, gcc has already -flto=jobserver.
>
> Other (single threaded CPU intensive) might just be started from
> jobclient?
>
>> ../Randy
>>
>>
>>>>
>>>> Alex
>>>
>>> Yeah, I'd rather teach the kernel to consider thrashing when
>>> scheduling jobs. As is now any user process can slow down any other
>>> users process and even the kernel itself to a standstill.
>>>
>>> But kernel developers consider those issues "orthogonal" (i.e. they
>>> don't want to make the scheduler aware of io).
>>>
>>>
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> View/Reply Online (#58943):
>>> https://lists.yoctoproject.org/g/yocto/message/58943
>>> Mute This Topic: https://lists.yoctoproject.org/mt/82015730/3616765
>>> Group Owner: yocto+owner@lists.yoctoproject.org
>>> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
>>> [randy.macleod@windriver.com]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>
>>
next prev parent reply other threads:[~2023-01-14 22:33 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.12d167de-8268-4441-bd03-b78a3e04713e@emailsignatures365.codetwo.com>
[not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.0d2bd5fa-15cc-4b27-b94e-83614f9e5b38.a8aa18ca-4a64-4525-851c-c6d34f355f1f@emailsignatures365.codetwo.com>
2021-04-11 15:23 ` bitbake controlling memory use Gmane Admin
2021-04-11 15:27 ` [yocto] " Alexander Kanavin
2021-04-11 15:49 ` Gmane Admin
2021-04-11 15:55 ` [yocto] " Alexander Kanavin
2021-04-11 16:08 ` Gmane Admin
2021-04-11 16:19 ` [yocto] " Alexander Kanavin
2021-04-14 1:14 ` Randy MacLeod
2021-04-14 3:14 ` Khem Raj
2021-04-14 4:59 ` Richard Purdie
2021-04-17 22:17 ` Gmane Admin
2021-04-18 9:59 ` [yocto] " Richard Purdie
2021-04-18 19:34 ` Gmane Admin
[not found] ` <16770AD5E94DEAE5.1089@lists.yoctoproject.org>
2022-12-24 18:58 ` Ferry Toth
2022-12-26 2:11 ` [yocto] " Randy MacLeod
2022-12-27 16:56 ` Ferry Toth
2021-06-05 13:35 ` Gmane Admin
2021-06-08 19:08 ` [yocto] " Trevor Gamblin
2021-06-10 7:09 ` Gmane Admin
[not found] ` <1685B30F5819A655.13459@lists.yoctoproject.org>
2021-06-07 19:27 ` Gmane Admin
2021-06-08 19:12 ` [yocto] " Trevor Gamblin
2021-06-10 9:22 ` Ferry Toth
2021-06-10 19:06 ` [yocto] " Trevor Gamblin
2021-06-10 20:35 ` Ferry Toth
2021-06-12 16:31 ` Ferry Toth
2021-06-13 0:38 ` Randy MacLeod
2021-06-13 10:58 ` Ferry Toth
2023-01-03 14:15 ` Ferry Toth
2023-01-03 14:18 ` [yocto] " Alexander Kanavin
2023-01-03 14:29 ` Ferry Toth
2023-01-03 14:36 ` Quentin Schulz
2023-01-03 14:41 ` Ferry Toth
2023-01-03 15:03 ` Janne Kiiskila
2023-01-03 15:12 ` Ferry Toth
2023-01-03 15:24 ` Alexander Kanavin
[not found] ` <1736D5DCC66BC3DE.4716@lists.yoctoproject.org>
2023-01-03 15:37 ` Alexander Kanavin
2023-01-03 15:58 ` Ferry Toth
2023-01-03 17:33 ` Alexander Kanavin
2023-01-08 22:13 ` Ferry Toth
2023-01-09 10:39 ` Alexander Kanavin
2023-01-09 10:43 ` Richard Purdie
2023-01-09 10:54 ` Ferry Toth
2023-01-19 19:59 ` Ferry Toth
2023-01-09 10:49 ` Ferry Toth
2023-01-10 1:57 ` Randy MacLeod
2023-01-10 9:24 ` Ferry Toth
2023-01-14 22:33 ` Ferry Toth [this message]
2023-08-28 12:56 ` Martin Hundebøll
2023-01-03 15:44 ` Martin Jansa
2021-04-12 2:25 ` Chen Qi
2021-04-12 18:45 ` Gmane Admin
2021-04-12 8:13 ` [yocto] " Robert Berger
2021-04-12 18:47 ` Gmane Admin
2021-04-12 8:28 ` [yocto] " Mike Looijmans
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=ff270ff7-1014-78eb-55e3-cc5c8ced050d@gmail.com \
--to=fntoth@gmail.com \
--cc=alex.kanavin@gmail.com \
--cc=contrib@zhengqiu.net \
--cc=janne.kiiskila@izumanetworks.com \
--cc=martin.jansa@gmail.com \
--cc=quentin.schulz@theobroma-systems.com \
--cc=randy.macleod@windriver.com \
--cc=richard.purdie@linuxfoundation.org \
--cc=tvgamblin@gmail.com \
--cc=yocto@lists.yoctoproject.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.