CMLFS icon indicating copy to clipboard operation
CMLFS copied to clipboard

Tip for new contributors, testers or users: "MAKEOPTS=”-j${core} +1″ is NOT the best optimization"

Open takusuman opened this issue 4 years ago • 5 comments

I've read this some time ago, and i thought it would be cool to share this article with you guys. Here Agostino tests and benchmarks if using -j $(( n + 1 )) is any better than just using -j $n, and the conclusion is that its not.

https://blogs.gentoo.org/ago/2013/01/14/makeopts-jcore-1-is-not-the-best-optimization/

takusuman avatar Sep 12 '21 12:09 takusuman

Sure, it's overload.

owl4ce avatar Sep 12 '21 13:09 owl4ce

And, for some reasons e.g doing multitask, consider to set the load average. The value same as core/thread.

owl4ce avatar Sep 12 '21 13:09 owl4ce

Also, I've test building a package with realtime (RT) priorities, the results is bad.

owl4ce avatar Sep 12 '21 13:09 owl4ce

The way I look at it, each job thread should be assigned per cpu thread. An extra job thread on a CPU thread would be cumbersome and likely slow down the overall compilation.

Hopefully I'm using the correct terminology. There are some CPU's that have 1 thread for every CPU core and others may have 2 threads instead. My i3-3220 CPU is dual core but has a total of 4 threads. So, I build with -j4.

dslm4515 avatar Sep 12 '21 14:09 dslm4515

Also, I've test building a package with realtime (RT) priorities, the results is bad.

Thanks for the heads up. I will consider it when I start Optimux-C (optimized CMLFS)

dslm4515 avatar Sep 12 '21 14:09 dslm4515