Skip to contentSkip to conversation

local.conf.sample: Have comments ready to go for quad-core (4 -> 8).

PATCH In review Robert P. J. Day 5 participants 6 messages Apr 18, 2013 – Apr 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 local.conf.sample: Have comments ready to go for quad-core (4 -> 8).

Have default, commented values for parallelism reflect quad-core hosts.

---

i'll admit it, i'm just lazy as i do all my work on a quad-core
system and i'm constantly changing 4 to 8. and the proper values for a quad-core system *should* be 4, not 8, anyway, isn't that right?

meta/conf/local.conf.sample +3 -3
index 85205c5..85164a0 100644
@@ -17,14 +17,14 @@
 # These two options control how much parallelism BitBake should use. The first
 # option determines how many tasks bitbake should run in parallel:
 #
-#BB_NUMBER_THREADS = "4"
+#BB_NUMBER_THREADS = "8"
 #
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-#PARALLEL_MAKE = "-j 4"
+#PARALLEL_MAKE = "-j 8"
 #
-# For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
+# For a quad-core machine, BB_NUMBER_THREADS = "8", PARALLEL_MAKE = "-j 8" would
 # be appropriate for example.
 
 #
Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw

"Robert P. J. Day" <rpjday-L09J2beyid0N/[email protected]>

Quoted 2 lines · writes:

Have default, commented values for parallelism reflect quad-core hosts.

fwiw, I use

PARALLEL_MAKE = "\
-j ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 2} \
-l ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100} \
"

BB_NUMBER_THREADS ?= "\
${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100}"

which adjusts parallelism automatically.

Enrico

#2 lore raw
Quoted 13 lines · Enrico Scholz

"Robert P. J. Day" <rpjday-L09J2beyid0N/[email protected]>

Quoted 2 lines · writes:

Have default, commented values for parallelism reflect quad-core hosts.

fwiw, I use

PARALLEL_MAKE = "\
-j ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 2} \
-l ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100} \
"

Quoted 5 lines

BB_NUMBER_THREADS ?= "\
${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100}"

which adjusts parallelism automatically.

i'd be perfectly fine with that, too, if someone wants to put that
in instead.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#3 lore raw
Quoted 15 lines · Robert P. J. Day
Quoted 13 lines · Enrico Scholz

"Robert P. J. Day" <rpjday-L09J2beyid0N/[email protected]>

Quoted 2 lines · writes:

Have default, commented values for parallelism reflect quad-core hosts.

fwiw, I use

PARALLEL_MAKE = "\
-j ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 2} \
-l ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100} \
"

Quoted 8 lines
Quoted 5 lines

BB_NUMBER_THREADS ?= "\
${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100}"

which adjusts parallelism automatically.

i'd be perfectly fine with that, too, if someone wants to put that
in instead.

I've noticed that on a quad-core machine (i7) the best setting is to leave it at 6 for BB_NUMBER_THREADS and PARALLEL_MAKE.

8, 16, etc don't have any discernable impact, perhaps save 30 to 40 seconds off a build. The 3.5Ghz standard CPU frequency can be over-clocked to as high as 4.5GHz, but I tested it out at 4.2Ghz and 3.8Ghz, and the difference was only 2 to 3 minutes between 3.8GHz and 4.2GHz over-clocked, so I currently leave it at 3.8GHz over-clocked.

I'm using two SSDs in a RAID 0 striped configuration, and build times is around 22 minutes for a Zynq-7-ZC702 build for core-image-minimal.

Elvis Dowson

#4 lore raw
Quoted 1 line · Elvis Dowson

On Apr 18, 2013, at 8:51 PM, "Robert P. J. Day" <[email protected]>

Quoted 21 lines · wrote:
Quoted 21 lines · Enrico Scholz
Quoted 20 lines

"Robert P. J. Day" <rpjday-L09J2beyid0N/[email protected]>

Quoted 2 lines · writes:

Have default, commented values for parallelism reflect quad-core hosts.

fwiw, I use

PARALLEL_MAKE = "\

-j ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 2} \
-l ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100} \

"

BB_NUMBER_THREADS ?= "\

${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100}"

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

which adjusts parallelism automatically.

i'd be perfectly fine with that, too, if someone wants to put that

in instead.

I've noticed that on a quad-core machine (i7) the best setting is to leave it at 6 for BB_NUMBER_THREADS and PARALLEL_MAKE.

maybe we need consider the hyper-threading.

CPU_PROC_NUM="grep "^processor" /proc/cpuinfo | sort -u | wc -l" CPU_CORE_NUM="grep "^core id" /proc/cpuinfo | sort -u | wc -l"

Quoted 14 lines

8, 16, etc don't have any discernable impact, perhaps save 30 to 40 seconds off a build. The 3.5Ghz standard CPU frequency can be over-clocked to as high as 4.5GHz, but I tested it out at 4.2Ghz and 3.8Ghz, and the difference was only 2 to 3 minutes between 3.8GHz and 4.2GHz over-clocked, so I currently leave it at 3.8GHz over-clocked.

I'm using two SSDs in a RAID 0 striped configuration, and build times is around 22 minutes for a Zynq-7-ZC702 build for core-image-minimal.

Elvis Dowson
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 3 lines
Nanjing Jilong
Yi Qingliang
[email protected]
#5 lore raw

All of these "solutions" assume the user wants to use all of their entire computing resources to do nothing other than their Yocto build. This isn't _always_ the case, is it? :-)

Personally, I know this build is going to take time. So I start it, then go off and do other things with my computer. In my case, I don't like it when the other things I'm trying to do on the computer are bogged down due to this all-consuming, background build task. I would much rather that whatever else I'm doing remain responsive to me. Whether the build finishes in 20 minutes or 25 is irrelevant because I'll only notice it's done 30 minutes from now :-) As such I never set my settings to "full power"... knowingly and purposefully.

This being said, I think what is currently in the sample config file (which are roughly half of full power) are good defaults. If you're new to this kind of stuff, these settings will suit just fine. If you're a power user, you'll know how to set them to 8 or 16 or any other setting which suits your needs.