Bug 15111

Summary: Expand documentation of BB_PRESSURE_* variables
Product: [Documentation] BitBake User Manual Reporter: Randy MacLeod <randy.macleod>
Component: bitbake-manualAssignee: Antonin Godard <antonin.godard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: paulg
Version: Future   
Target Milestone: 5.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Randy MacLeod 2023-05-03 18:59:57 UTC
We have some basic documentation of the bitbake pressure regulation but I've heard from Paul Gortmaker that additional info would be helpful.

Now that pressure regulation has been shown to be useful we should explain how it is used and what it's impact can be at greater length. I will work on an initial version of the patch if we can agree on whether it's in the bitbake docs or a YP doc.
Comment 1 Paul Gortmaker 2023-05-03 22:43:14 UTC
Additional info like reasonable sane defaults for hardware an average hobbyist person might have in 2023.  Obviously error on the low side of things, since one wouldn't be looking for these settings unless they are suffering swap-death or OOM kill.

Maybe also add them to the autogenerated conf/local.conf template like "make -j" settings and threads - commented out but there ready and easily deployed.
Comment 2 Randy MacLeod 2024-10-24 15:03:58 UTC
Bulk move of 5.1 M4 to 5.2 M2 as approved by AlexB.
Comment 3 Antonin Godard 2024-12-26 12:58:59 UTC
Hello,

This seems to have been done with following commit from Michael:
https://git.openembedded.org/bitbake/commit/?id=72e9847dd578c3cbed52a9c16fea23ebbeef5046

Can you confirm/deny? So I can update the bug status accordingly.

Thanks,
Antonin
Comment 4 Paul Gortmaker 2025-01-13 17:59:14 UTC
The addition helps, but still it seems what is there is a rather clinical description of the variable.  And maybe that is what we want in the section that documents all the variables.

What is missing is the "How do I effectively use this?"

For example, I found out (by trial and error) that I had to start with values more like 25k just to even get in the ballpark.  Makes the example value of 500 seem wrong, or seem like the user is doing something wrong?

And where does it say that the console will output state changes with true/false status for each metric (CPU, i/o, ...) so that a person can adjust/tune their initial starting point?

And do they have to ^C the build and manually hack the config file every time they want to tweak and hone in on a good value?  That seems super klunky and tedious - esp. if the example value is way off.   Or can it be done on the fly from the build console?

And once satisfactory values are reached, how does one turn off the pressure state change messages - as they overwhelm the build console otherwise.

The feature might be awesome, but if people aren't guided how to use it effectively, it might as well not exist outside of the sphere of AutoBuilder folks.
Comment 5 Antonin Godard 2025-06-06 07:42:31 UTC
Bulk move of bugs I am assigned to from Milestone 5.2M4 to 5.3M1.
Comment 6 Antonin Godard 2025-06-24 14:46:19 UTC
(In reply to Paul Gortmaker from comment #4)
> The addition helps, but still it seems what is there is a rather clinical
> description of the variable.  And maybe that is what we want in the section
> that documents all the variables.
> 
> What is missing is the "How do I effectively use this?"
> 
> For example, I found out (by trial and error) that I had to start with
> values more like 25k just to even get in the ballpark.  Makes the example
> value of 500 seem wrong, or seem like the user is doing something wrong?
> 
> And where does it say that the console will output state changes with
> true/false status for each metric (CPU, i/o, ...) so that a person can
> adjust/tune their initial starting point?
> 
> And do they have to ^C the build and manually hack the config file every
> time they want to tweak and hone in on a good value?  That seems super
> klunky and tedious - esp. if the example value is way off.   Or can it be
> done on the fly from the build console?
> 
> And once satisfactory values are reached, how does one turn off the pressure
> state change messages - as they overwhelm the build console otherwise.
> 
> The feature might be awesome, but if people aren't guided how to use it
> effectively, it might as well not exist outside of the sphere of AutoBuilder
> folks.

Hi Paul,

Here's my take on trying to summarize how one can limit the resources used on the host:
https://lore.kernel.org/r/20250624-resource-limiting-v1-1-f8f5edbdaf03@bootlin.com

For the BB_PRESSURE variables specifically, I found that setting a low value first and then gradually increasing the value using the information printed on the console is helpful - I wouldn't know of any other way to do it for now.

Antonin
Comment 7 Antonin Godard 2025-07-17 08:37:50 UTC
The following commit is now in master: https://git.yoctoproject.org/yocto-docs/commit/?id=584b8b30cd884ff6c62efcff9e9b566476a84589

This is a first document to gather information on how to limit the resources used by the host, include pressure information.

I'm closing this bug as it includes more in-depth explanation on BB_PRESSURE variables.