CPU usage during compilation
-
Not using IPP. I think it's a crappy CPU :p
-
@d-healey I've spent a fair while thinking about getting another machine - so I spent another fair while looking at the Task Manager and performance manager in Windows as I run a compile(I'd like to find out if I'm CPU, memory or disk bound) , and there's all sorts of strangeness's going on.....CPU does spike at 100% here (i5 family but on windows) but so does memory and the disk (tho its not SSD so hey...)
-
@Lindon Mac Mini 2018 i7 here, cpu and temp always go way up when compiling. Only takes about 5 mins to compile though and its a very big plugin. Don't know if that's good or not...
-
@DanH Doesn't help me :p
-
i have just built scriptnode and compiled a plugin on neon latest linux dist with dual xeon 2680 v3 it's a 24 core systemwith 32 gb ddr4 ram and still incredibly slow, on the same hardware running win 10 seems to fly but on a linux distro seems slow for some reason
-
@ospfeigrp Did you enable all threads? i.e
-j 44
(assuming 2 threads per core) ? -
@d-healey nope, i did not thanks for that. so i would use:
make CONFIG=Release -j 48
Edit: i just compiled the plugin version of hise scriptnode with -j40 and it finished in around one minute
-
@ospfeigrp I usually leave a few threads available for the system to do other things but use all 48 if you want :)
-
@d-healey thanks, I just try recompiling HISE standalone with -j 40 and it's very slow around "Linking HISE standalone - App" this time it took 8 minutes for the standalone.
-
Linking is always single threaded with gcc/g++
-
This might be a solution worth investigating for multi-threaded linking - https://lld.llvm.org/
-
I found what was causing my CPU issues. The CPU was power throttling. I've increased the power limits and now I'm getting much better clock speed when compiling.
-
I just tried lld, seems it might be a bit faster at linking but I'd need to do some proper benchmarks to know for certain.
In case anyone else (or future Dave) is thinking of using lld (or gold) for linking here is what you need to do:
Put the following in the Extra Linker Flags box in Projucer
For lld: -fuse-ld=lld
With lld you need to use Clang instead of GCC. So the make command will look something like:
make CXX=clang++ CONFIG=Release -j 6
For gold: -fuse-ld=gold -Wl,--threads -Wl,--thread-count=6
-
I've tried both of these linkers so far and have had no success in improving compile times.
For some reason, which I can't work out, clang + lld will compile and link but the linking is still only single threaded. @Christoph-Hart Any ideas?
With gold the compiling via GCC works but the linking fails with an error - I haven't dug into this one much more because it seems lld is the better of the two.
-
I think the newest script node version compiles a little bit faster because the template system is a little bit less complex, but in my experience the only way to really speed up compile times is to get a better system :)
-
@Christoph-Hart Compile time is fine, it's the linking that's the problem, it only uses a single thread.
-
Finally solved the linker threading thing.
Add this to the Extra Linker Flags section
-flto=auto
:D -
@d-healey Nice one! Is that linux only?
EDIT: oh yes it's linux... I wonder if I can speed up the process on mac too...
-
@ustk I think Xcode already does multi-threaded linking.
-
@ustk mac je met 1h pour un vst. Windows 4 minutes. Ça rend ouf