* [PATCH] rust: Enable parallel-frontend-threads
@ 2026-03-12 4:07 sundeep.kokkonda
2026-03-12 9:02 ` [OE-core] " Alexander Kanavin
0 siblings, 1 reply; 5+ messages in thread
From: sundeep.kokkonda @ 2026-03-12 4:07 UTC (permalink / raw)
To: openembedded-core; +Cc: randy.macleod
From: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Enabled the parallel-frontend-threads for faster compilation of rust code.
Test Results:
A few tests ran by, with and without enabling this option.
- Avg. default build time (w/o this option) - 56m 50.104s
- Avg. build time with this option - 49m 17.224s
- Performance Difference - 7m 32.880s faster builds (≈ 13.3%)
Tests were performed by setting thread count as 8 & 16 but no much difference is seen.
So, the parallel-frontend-threads = 8 is set.
Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
---
meta/recipes-devtools/rust/rust_1.94.0.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-devtools/rust/rust_1.94.0.bb b/meta/recipes-devtools/rust/rust_1.94.0.bb
index 2be0bd8d89..82f42b7f50 100644
--- a/meta/recipes-devtools/rust/rust_1.94.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.94.0.bb
@@ -139,6 +139,7 @@ python do_configure() {
config.set("rust", "llvm-tools", e(False))
config.set("rust", "lld", e(False))
config.set("rust", "use-lld", e(False))
+ config.set("rust", "parallel-frontend-threads", "8")
config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}")))
# Whether or not to optimize the compiler and standard library
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] rust: Enable parallel-frontend-threads
2026-03-12 4:07 [PATCH] rust: Enable parallel-frontend-threads sundeep.kokkonda
@ 2026-03-12 9:02 ` Alexander Kanavin
2026-03-12 12:13 ` Richard Purdie
2026-03-12 13:11 ` Sundeep KOKKONDA
0 siblings, 2 replies; 5+ messages in thread
From: Alexander Kanavin @ 2026-03-12 9:02 UTC (permalink / raw)
To: sundeep.kokkonda; +Cc: openembedded-core, randy.macleod
On Thu, 12 Mar 2026 at 05:07, Sundeep KOKKONDA via
lists.openembedded.org
<sundeep.kokkonda=windriver.com@lists.openembedded.org> wrote:
> Test Results:
> A few tests ran by, with and without enabling this option.
> - Avg. default build time (w/o this option) - 56m 50.104s
> - Avg. build time with this option - 49m 17.224s
> - Performance Difference - 7m 32.880s faster builds (≈ 13.3%)
>
> Tests were performed by setting thread count as 8 & 16 but no much difference is seen.
> So, the parallel-frontend-threads = 8 is set.
It would really help to provide specifics. What tests did you run, and
how were the numbers obtained? How can these tests be reproduced? What
CPU was used and how many cores it had?
> + config.set("rust", "parallel-frontend-threads", "8")
I'd suggest we don't hardcode a number, but rather set to oe.utils.cpu_count()
(grep oe-core for examples).
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] rust: Enable parallel-frontend-threads
2026-03-12 9:02 ` [OE-core] " Alexander Kanavin
@ 2026-03-12 12:13 ` Richard Purdie
2026-03-12 13:11 ` Sundeep KOKKONDA
1 sibling, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2026-03-12 12:13 UTC (permalink / raw)
To: alex.kanavin, sundeep.kokkonda; +Cc: openembedded-core, randy.macleod
On Thu, 2026-03-12 at 10:02 +0100, Alexander Kanavin via lists.openembedded.org wrote:
> On Thu, 12 Mar 2026 at 05:07, Sundeep KOKKONDA via
> lists.openembedded.org
> <sundeep.kokkonda=windriver.com@lists.openembedded.org> wrote:
> > Test Results:
> > A few tests ran by, with and without enabling this option.
> > - Avg. default build time (w/o this option) - 56m 50.104s
> > - Avg. build time with this option - 49m 17.224s
> > - Performance Difference - 7m 32.880s faster builds (≈ 13.3%)
> >
> > Tests were performed by setting thread count as 8 & 16 but no much difference is seen.
> > So, the parallel-frontend-threads = 8 is set.
>
> It would really help to provide specifics. What tests did you run, and
> how were the numbers obtained? How can these tests be reproduced? What
> CPU was used and how many cores it had?
>
> > + config.set("rust", "parallel-frontend-threads", "8")
>
> I'd suggest we don't hardcode a number, but rather set to oe.utils.cpu_count()
> (grep oe-core for examples).
oe.utils.parallel_make() might make more sense here?
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] rust: Enable parallel-frontend-threads
2026-03-12 9:02 ` [OE-core] " Alexander Kanavin
2026-03-12 12:13 ` Richard Purdie
@ 2026-03-12 13:11 ` Sundeep KOKKONDA
2026-03-12 13:21 ` Richard Purdie
1 sibling, 1 reply; 5+ messages in thread
From: Sundeep KOKKONDA @ 2026-03-12 13:11 UTC (permalink / raw)
To: Alexander Kanavin, Richard Purdie; +Cc: openembedded-core, randy.macleod
[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]
On 12-Mar-26 14:32, Alexander Kanavin wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Thu, 12 Mar 2026 at 05:07, Sundeep KOKKONDA via
> lists.openembedded.org
> <sundeep.kokkonda=windriver.com@lists.openembedded.org> wrote:
>> Test Results:
>> A few tests ran by, with and without enabling this option.
>> - Avg. default build time (w/o this option) - 56m 50.104s
>> - Avg. build time with this option - 49m 17.224s
>> - Performance Difference - 7m 32.880s faster builds (≈ 13.3%)
>>
>> Tests were performed by setting thread count as 8 & 16 but no much difference is seen.
>> So, the parallel-frontend-threads = 8 is set.
> It would really help to provide specifics. What tests did you run, and
> how were the numbers obtained? How can these tests be reproduced? What
> CPU was used and how many cores it had?
I tested the rust build time with `time bitbake rust` (I wonder how I
missed this to put is commit msg)
Machine Info: Intel(R) Xeon(R) CPU E5-4669 v3 @ 2.10GHz with 144 CPUs.
>
>> + config.set("rust", "parallel-frontend-threads", "8")
> I'd suggest we don't hardcode a number, but rather set to oe.utils.cpu_count()
> (grep oe-core for examples).
I choose 8 here as there is no noticeable difference between 8/16. Also, the rust blog says (https://blog.rust-lang.org/2023/11/09/parallel-rustc/) -
/We recommend eight threads because this is the configuration we have
tested the most and it is known to give good results. Values lower than
eight will see smaller benefits, but are appropriate if your hardware
has fewer than eight cores. Values greater than eight will give
diminishing returns and may even give worse performance. /
Thanks,
Sundeep K
>
> Alex
[-- Attachment #2: Type: text/html, Size: 3179 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] rust: Enable parallel-frontend-threads
2026-03-12 13:11 ` Sundeep KOKKONDA
@ 2026-03-12 13:21 ` Richard Purdie
0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2026-03-12 13:21 UTC (permalink / raw)
To: Sundeep KOKKONDA, Alexander Kanavin; +Cc: openembedded-core, randy.macleod
On Thu, 2026-03-12 at 18:41 +0530, Sundeep KOKKONDA wrote:
> >
> > I'd suggest we don't hardcode a number, but rather set to
> > oe.utils.cpu_count()
> > (grep oe-core for examples).
> >
> I choose 8 here as there is no noticeable difference between 8/16.
> Also, the rust blog says
> (https://blog.rust-lang.org/2023/11/09/parallel-rustc/) -
>
> We recommend eight threads because this is the configuration we have
> tested the most and it is known to give good results. Values lower
> than eight will see smaller benefits, but are appropriate if your
> hardware has fewer than eight cores. Values greater than eight will
> give diminishing returns and may even give worse performance.
That sounds like min(oe.utils.parallel_make(), 8) then?
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-12 13:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 4:07 [PATCH] rust: Enable parallel-frontend-threads sundeep.kokkonda
2026-03-12 9:02 ` [OE-core] " Alexander Kanavin
2026-03-12 12:13 ` Richard Purdie
2026-03-12 13:11 ` Sundeep KOKKONDA
2026-03-12 13:21 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox