# Number of cores and number of chains

**URL:** <https://discourse.mc-stan.org/t/number-of-cores-and-number-of-chains/38463>\
**Category:** Developers\
**Created:** [January 12, 2025, 6:06pm UTC](https://discourse.mc-stan.org/t/number-of-cores-and-number-of-chains/38463 "2025-01-12T18:06:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Idowu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/idowu/32/21237_2.png) [@Idowu](https://discourse.mc-stan.org/u/Idowu)\
**Post date:** [January 12, 2025, 6:06pm UTC](https://discourse.mc-stan.org/t/number-of-cores-and-number-of-chains/38463/1 "2025-01-12T18:06:55Z")

</div>

I have a laptop that has 2 cores.  
In running my model using Rstan, I realised that some times two chains are delayed.

If I switch to the use of two chains and increase the number of iterations, will the outcome still be reliable?

---

<div class="post-metadata">

**Author:** ![mhollanders](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mhollanders/32/17623_2.png) [@mhollanders](https://discourse.mc-stan.org/u/mhollanders)\
**Post date:** [January 12, 2025, 7:57pm UTC](https://discourse.mc-stan.org/t/number-of-cores-and-number-of-chains/38463/2 "2025-01-12T19:57:56Z")

</div>

Yes, especially if there’s no multi-modality.

---

<div class="post-metadata">

**Author:** ![Bob\_Carpenter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bob_carpenter/32/9230_2.png) [@Bob\_Carpenter](https://discourse.mc-stan.org/u/Bob_Carpenter)\
**Post date:** [January 16, 2025, 11:05pm UTC](https://discourse.mc-stan.org/t/number-of-cores-and-number-of-chains/38463/3 "2025-01-16T23:05:26Z")

</div>

> [@Idowu](#):
>
> If I switch to the use of two chains and increase the number of iterations, will the outcome still be reliable?

We generally recommend running 4 chains. With only two cores you probably also don’t have fast memory, so you might want to test whether running 2 chains in parallel is faster than running them sequentially.

The reason we recommend more chains is to help diagnose problems with multimodality, etc. It’s a kind of robustness check that multiple different starting values of parameters lead to the same result.

---

<div class="post-metadata">

**Author:** ![Idowu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/idowu/32/21237_2.png) [@Idowu](https://discourse.mc-stan.org/u/Idowu)\
**Post date:** [January 16, 2025, 11:31pm UTC](https://discourse.mc-stan.org/t/number-of-cores-and-number-of-chains/38463/4 "2025-01-16T23:31:27Z")

</div>

Thank you so much Bob\_Carpenter.  
That response is helpful.

---

<div class="post-metadata">

**Author:** ![Idowu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/idowu/32/21237_2.png) [@Idowu](https://discourse.mc-stan.org/u/Idowu)\
**Post date:** [January 16, 2025, 11:32pm UTC](https://discourse.mc-stan.org/t/number-of-cores-and-number-of-chains/38463/5 "2025-01-16T23:32:58Z")

</div>

Thank you so much mhollanders, I get it now
