Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
None
Description
There are several reasons to restrict number of max linker jobs running in parallel:
- Avoid losing the machine because of the high RAM requirements of each process
- Work more efficiently, since linking is an I/O bound process, it makes sense to keep the rest of the cores busy with CPU-bound tasks like compiling
- Take advantage of modern linkers like mold; these are designed to be highly parallel, so one process is capable of utilizing all cores and saturating I/O; more processes would only hinder the process.
LLVM as a CMake project implements such a knob (LLVM_PARALLEL_LINK_JOBS).
Qt would also benefit from restricting the number of parallel moc jobs. I am using a distributed compiler (icecream) and am used to running ninja -j 128 or similar, and currently moc is the primary reason my machine dies during compilation (hundreds of instances of moc are spawned locally and the OOM killer goes on a rampage).
I wish I could set MAX_PARALLEL_MOC_JOBS=$NCPU.
Attachments
Issue Links
- relates to
-
QTBUG-102754 moc memory usage
-
- Reported
-
- mentioned in
-
Page Loading...