Bug 5594

Summary: Add documentation on optimising build performance
Product: [Documentation] General Docs Reporter: Paul Eggleton <bluelightning>
Component: docs-generalAssignee: Scott Rifenbark <srifenbark>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: bluelightning, richard.purdie, sjolley.yp.pm, srifenbark
Version: unspecified   
Target Milestone: 1.8 M1   
Hardware: All   
OS: Multiple   
Whiteboard: 21 November 2014: RESOLVED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Paul Eggleton 2013-11-25 13:34:31 UTC
If you want to speed up a build, there are a number of ways to do that - usually by disabling items that you don't need. We should have a section that outlines what you can do to optimise build performance and the tradeoffs in reduced functionality (if any) for each option.
Comment 1 Scott Rifenbark 2013-12-06 19:42:01 UTC
Paul, 

Besides using PARALLEL_MAKE and BB_NUMBER_THREADS, what else do we want to suggest?

Scott
Comment 2 Scott Rifenbark 2014-01-02 21:36:32 UTC
Paul, 

When you get back we can look at this... I still need some information for it. 

Thanks, 
Scott
Comment 3 Scott Rifenbark 2014-01-02 21:36:53 UTC
Adding me to the cc list.
Comment 4 Scott Rifenbark 2014-04-01 22:52:25 UTC
Enhancement - moving to 1.7
Comment 5 Scott Rifenbark 2014-06-03 09:19:39 UTC
Setting target to 1.7 M3.  Need to work with Paul to investigate this.

scott
Comment 6 Scott Rifenbark 2014-06-04 15:52:51 UTC
Hi, 

If you need more in here we need more information.  Please provide.

Scott
Comment 7 Scott Rifenbark 2014-10-09 15:37:13 UTC
I think the best place to add this information is in the ref-manual in Chapter 2, which discusses "Using the Yocto Project."  This chapter is a more detailed look at running YP.  I am going to add a new sub-section that details out how to optimize or set things up for speed.  The dev-manual has a brief overview of running a build and we can cross-reference into this new sub-section where the user can find gritty details on achieving the fastest build times given the situation they are building under.

I have received raw information from Richard Purdie that will allow me to get information down for this enhancement.

Scott
Comment 8 Scott Rifenbark 2014-10-09 21:30:18 UTC
Hi, 

I took Richard's raw material and created a first draft of a new section in the ref-manual.  The section is called "Speeding Up the Build."  I published the version of the manual in a temporary spot for now just for review purposes.  It is not in the 1.7 area yet:

http://www.yoctoproject.org/docs/temp/ref-manual/ref-manual.html#speeding-up-the-build

It seemed that lists of considerations and trade offs was the way to go based on the raw information.  I made my best guesses for some of the material to try and elaborate.  I will clearly need some more information to probably elaborate and/or correct.

This is just the main section.  When it is settled down I will also add some cross-referencing to appropriate sections in the dev-manual where we overview the build process.

Please look it over and provide some review.

Thanks, 
Scott
Comment 9 Richard Purdie 2014-10-30 15:30:58 UTC
I don't like the positioning of the section. This should be something users come to later, not immediately walking them through using the project. Moving to the end of the section would seem better to me.

Addressing your comments:

Using the commit= mount option increases the interval the between disk cache writes (in seconds). Setting this from the default of 5 seconds to something longer increases the risk of data loss but decreases the need to write to the disk. Increasing the value can improve the build performance.

Otherwise looks good.
Comment 10 Scott Rifenbark 2014-11-10 21:37:55 UTC
Richard, 

I moved this to the end of the section and implemented your comments.  You can see it at http://www.yoctoproject.org/docs/temp/ref-manual/ref-manual.html#speeding-up-the-build.  If it is good I will merge into the 1.8 manual.

Scott
Comment 11 Scott Rifenbark 2014-11-21 12:52:34 UTC
Hi, 

This section has been reviewed.  I have merged it from the temporary branch into master and am marking the bug RESOLVED with the doc flag set to "done."

See http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#speeding-up-the-build

Thanks, 
Scott