# Compilation speed - parallelization

**URL:** https://discourse.paraview.org/t/compilation-speed-parallelization/8713
**Category:** ParaView Support
**Created:** [December 29, 2021, 3:53am UTC](https://discourse.paraview.org/t/compilation-speed-parallelization/8713 "2021-12-29T03:53:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![crohr](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c57346/32.png) [@crohr](https://discourse.paraview.org/u/crohr)
#### Post date: [December 29, 2021, 3:53am UTC](https://discourse.paraview.org/t/compilation-speed-parallelization/8713/1 "2021-12-29T03:53:35Z")

</div>

I have tried looking for information about how to take advantage of multiple cores when compiling ParaView but haven’t had any luck.

Using ninja or make spawns processses on all (or specified) cores, but I get barely more than 1 core’s worth of utilization out of the overall build. Is this just the way it is with PV or is there something I’m missing?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 29, 2021, 12:14pm UTC](https://discourse.paraview.org/t/compilation-speed-parallelization/8713/2 "2021-12-29T12:14:45Z")

</div>

Apart from the cmake configuration at the beginning, ninja uses all your cores:

 ![ninja](https://discourse.paraview.org/uploads/default/original/2X/2/293ae93d4298098e2eb35caac2580ff4a18bf945.png)

---

<div class="post-metadata">

### Author: ![aron.helser](https://discourse.paraview.org/user_avatar/discourse.paraview.org/aron.helser/32/13_2.png) [@aron.helser](https://discourse.paraview.org/u/aron.helser)
#### Post date: [December 29, 2021, 4:09pm UTC](https://discourse.paraview.org/t/compilation-speed-parallelization/8713/3 "2021-12-29T16:09:53Z")

</div>

I think the ParaView compilation is largely IO bound - are your source and build directories on a fast SSD? That can make a significant difference.

---

<div class="post-metadata">

### Author: ![crohr](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c57346/32.png) [@crohr](https://discourse.paraview.org/u/crohr)
#### Post date: [December 29, 2021, 9:21pm UTC](https://discourse.paraview.org/t/compilation-speed-parallelization/8713/4 "2021-12-29T21:21:55Z")

</div>

Thanks for taking the time to show this and confirm it for me.

For some reason I am not getting the same behaviour. It spawns a lot of gcc processes, but they each only add up to one core’s worth of CPU usage throughout the build process. If I ever get to the bottom of this I will report back. As the other reply says perhaps this is caused by IO but it’s so perfectly restricted to a single core (out of 64) that that seems unlikely.

---

<div class="post-metadata">

### Author: ![crohr](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c57346/32.png) [@crohr](https://discourse.paraview.org/u/crohr)
#### Post date: [December 29, 2021, 11:16pm UTC](https://discourse.paraview.org/t/compilation-speed-parallelization/8713/5 "2021-12-29T23:16:02Z")

</div>

I’ve switched architectures from ARM to x86\_64 and all cores are now fully utilized. Not sure if there’s something wrong with my build tools for ARM. I also increased my disk throughput from about 200 MB/s to 500. So no conclusive answer but hopefully that’s a hint to anyone more knowledgeable coming across this.

---

<div class="post-metadata">

### Author: ![aron.helser](https://discourse.paraview.org/user_avatar/discourse.paraview.org/aron.helser/32/13_2.png) [@aron.helser](https://discourse.paraview.org/u/aron.helser)
#### Post date: [December 30, 2021, 3:09pm UTC](https://discourse.paraview.org/t/compilation-speed-parallelization/8713/6 "2021-12-30T15:09:34Z")

</div>

I think you mean that you switched the machine you were compiling on from ARM to x86\_64? You weren’t cross-compiling, were you? So perhaps this is a bug in ninja/gcc on ARM?
