[Qt-creator] "-j" options to make. Where do they come from? Can I change the value?

Toralf Lund toralf.lund at pgs.com
Wed Feb 16 09:17:02 CET 2022

On 09/02/2022 21:41, André Hartmann wrote:
> Dear Toralf,
> The jobs option was introduced in response to
> https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugreports.qt.io%2Fbrowse%2FQTCREATORBUG-18414&data=04%7C01%7Ctoralf.lund%40pgs.com%7Cbc00aac1d6054ce496ad08d9ec0c952d%7C51d05d6147e9480b93b298dc84f1ed06%7C0%7C0%7C637800361057252353%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=NYSX42x36iDpgwQUut0dYWM16oHZumflQ6a29LELNUI%3D&reserved=0 
Fair enough.
> You can fine tune that in the Projects > Build & Run > Build > Build
> Steps. It should also be possible to add a smaller jobs option (e.g.
> -j2) to the MAKEFLAGS variable so new projects use that.

I now notice that there is a "Parallel Jobs:" spinbox in that GUI.

I must have been blind or something, as I completely overlooked that 
earlier. Perhaps I was looking to hard for an actual reference to "-j"...

Maybe it would be nice to be able to define the option in terms of the 
available CPUs/cores, as opposed to setting a fixed value, but I can 
live with the current solution.

> > If I have 4 jobs with 4 cores, that can mean all of them are
> > saturated, and the system becomes completely unresponsive.
> I only have this problem if I specify more jobs than available cores.


I guess a job often won't be able to use all the full core capacity on 
its own as it will also frequently have to wait for I/O. Apparently, 
it's not like that for some of my projects/builds, however...

- Toralf

> Best regards,
> André
> Am 09.02.22 um 11:13 schrieb Toralf Lund:
>> I'm using Qt Creator on a system that has 4 CPU cores. It seams like
>> that means "make" will always be run with argument "-j4". Is there a way
>> I can change the number 4 to something smaller? Where does the option
>> come from anyway?
>> A problem I have is that certain compile or link steps will use all the
>> capacity of one core, and parallel jobs typically start on separate
>> cores. If I have 4 jobs with 4 cores, that can mean all of them are
>> saturated, and the system becomes completely unresponsive. Meaning I
>> have to just sit and wait for the build to finish, while I prefer to run
>> it "in the background" (even if it it takes longer that way) and
>> continue to work on something else.
>> OS is CentOS Stream 8.
>> - Toralf
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-creator at qt-project.org
>> https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.qt-project.org%2Flistinfo%2Fqt-creator&data=04%7C01%7Ctoralf.lund%40pgs.com%7Cbc00aac1d6054ce496ad08d9ec0c952d%7C51d05d6147e9480b93b298dc84f1ed06%7C0%7C0%7C637800361057252353%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=VPy8pamLmBbJm002IwBZtsZ4PQ70skeCda5HEvZbPhQ%3D&reserved=0 

More information about the Qt-creator mailing list