# How best to utilize 24 core CPU?

**URL:** https://www.finalbuilder.com/forums/t/how-best-to-utilize-24-core-cpu/2597
**Category:** Discussion
**Created:** [March 5, 2018, 1:02am UTC](https://www.finalbuilder.com/forums/t/how-best-to-utilize-24-core-cpu/2597 "2018-03-05T01:02:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chillefeld](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/chillefeld/32/1333_2.png) [@chillefeld](https://www.finalbuilder.com/forums/u/chillefeld)
#### Post date: [March 5, 2018, 1:02am UTC](https://www.finalbuilder.com/forums/t/how-best-to-utilize-24-core-cpu/2597/1 "2018-03-05T01:02:16Z")

</div>

Hi,  
  
we currently use 4 core desktop CPUs in our Build servers.   
In order to use these our FB scripts define a queue with all projects that need to be built and then use an async action group to start 4 tasks that each contain a queue iterator.   
(I have attached&nbsp; a sample project to better illustrate what I mean)  
  
This works on our old build servers but now management is planning to buy a couple new 24 core machines.  
I could manually extend the project to use 24 tasks but this would mean a lot of work and would not be particularly future proof either.   
So I was wondering if anyone had any experience with using many cores in FB and could share it with me.  
  
Regards,  
Christoph[\_\_42138\_\_0\_\_ParallelBuild.zip](https://www.finalbuilder.com/forums/uploads/default/original/2X/2/2115a6eb62dc11d9deaf6ac9174ef177dfc9aa4d.zip) (1.679 KB)

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [March 6, 2018, 4:08am UTC](https://www.finalbuilder.com/forums/t/how-best-to-utilize-24-core-cpu/2597/2 "2018-03-06T04:08:49Z")

</div>

Hi Christoph   
  
 Adding more threads would not necessarily improve performance, or get more work done in the same time period. Most builds are I/O bound, so at some point you will hit a roadblock where more thread don’t improve things, and may even make things worse. Running multiple threads is not free, there is a cost associated with thread/context switching, and logging in particular becomes a bottleneck.   
  
 Your project looks to be based on this example - [https://github.com/VSoftTechnologies/FinalBuilder.Examples/tree/master/FB8/ParallelQueue](https://github.com/VSoftTechnologies/FinalBuilder.Examples/tree/master/FB8/ParallelQueue)   
  
 On my 8 core desktop machine, I get pretty much the same result with 2 or 4 or 8 threads, but when that example is actually put to work running real tasks, which use i/o and cpu, the results are extremely variable.   
  
 The only real advice I can give on this would be to try it.   
  
 FWIW, we’ve been load testing/profiling/optimising Continua CI for the last few weeks. We have made some significant improvements to cpu usage and database i/o, but it’s a lot hard to improve file system i/o performance, that eventually comes down to hardware choices. If you haven’t read this blog post (mostly about Continua, but some of it applies to FinalBuilder as well.   
  
 TL;DR - Buy Fast SSD’s, that will give you more bang for buck than buying more cpu cores!

---

<div class="post-metadata">

### Author: ![chillefeld](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/chillefeld/32/1333_2.png) [@chillefeld](https://www.finalbuilder.com/forums/u/chillefeld)
#### Post date: [March 6, 2018, 5:40am UTC](https://www.finalbuilder.com/forums/t/how-best-to-utilize-24-core-cpu/2597/3 "2018-03-06T05:40:45Z")

</div>

I understand that fast I/O quickly becomes more important than more threads but sadly hardware selection is beyond my control.   
  
 Your answer confirmed my suspicions though.   
 I’ll see if I can’t at least get a few SSDs added to the machines so we can run multiple build VMs with fewer cores simultaneously instead.
