# No more missed slots (during epoch) after changing one setting

**URL:** <https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924>\
**Category:** Operate a Stake Pool\
**Created:** [31 July 2021 22:31 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924 "2021-07-31T22:31:32Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![mini1pool](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/mini1pool/32/39655_2.png) [@mini1pool](https://forum.cardano.org/u/mini1pool)\
**Post date:** [3 August 2021 13:03 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/21 "2021-08-03T13:03:21Z")

</div>

Should the ‘+RTS -N -RTS’ not be set before the …run? Means “cardano-node +RTS -N -RTS run …”

I run it this way and it works!

---

<div class="post-metadata">

**Author:** ![Ruslan\_Sendecky](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ruslan_sendecky/32/39545_2.png) [@Ruslan\_Sendecky](https://forum.cardano.org/u/Ruslan_Sendecky)\
**Post date:** [3 August 2021 14:07 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/22 "2021-08-03T14:07:07Z")

</div>

@mini1pool  
It doesn’t really matter.  
+RTS signals to the runtime that this is the start of the rts options.  
-RTS signals the end of the rts options array.  
In theory, you should be able to stick it anywhere as long as you wrap it around with +RTS and -RTS  
But, saying that, when I was testing, setting it before the run errored out for me for some reason. I don’t know why. Setting it after the run worked.  
Go figure…

---

<div class="post-metadata">

**Author:** ![rene\_securestaking](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/rene_securestaking/32/20592_2.png) [@rene\_securestaking](https://forum.cardano.org/u/rene_securestaking)\
**Post date:** [3 August 2021 20:58 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/23 "2021-08-03T20:58:48Z")

</div>

Not sure if it’s related but we recently went through a similar issue with missed slots, which we solved by increasing cpu. We believe it to be caused by io\_wait during the node taking ledger snapshots. Missed slots correspond to snapshot taking in logs.

Issue is on github.

---

<div class="post-metadata">

**Author:** ![ADA4Good](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ada4good/32/39440_2.png) [@ADA4Good](https://forum.cardano.org/u/ADA4Good)\
**Post date:** [3 August 2021 22:33 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/24 "2021-08-03T22:33:12Z")

</div>

> [@rene\_securestaking](#):
>
> We believe it to be caused by io\_wait during the node taking ledger snapshots.

so during epoch switch right? You were able to totally avoid missing slots during the first 5 min of the epoch by increasing cpu? Can you explain a bit more please?  
And the github issue says it will be looked at after alonzo  
Could you please share the github issue link?

---

<div class="post-metadata">

**Author:** ![Ruslan\_Sendecky](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ruslan_sendecky/32/39545_2.png) [@Ruslan\_Sendecky](https://forum.cardano.org/u/Ruslan_Sendecky)\
**Post date:** [4 August 2021 01:20 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/25 "2021-08-04T01:20:48Z")

</div>

Yes, looks like it. But we need to phrase it differently otherwise the solution might not be understood correctly. Just increasing the CPUs doesn’t cut it. Haskell will still use only one by default no matter how many physical CPUs you have. You actually need to get the binary to use the available cores. Setting RTS finally did it for me.

I can confirm that after setting the RTS core options, I have no more missing slots during the epoch and only 62 missed slots during the epoch change.

---

<div class="post-metadata">

**Author:** ![IRF160](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/irf160/32/25241_2.png) [@IRF160](https://forum.cardano.org/u/IRF160)\
**Post date:** [4 August 2021 02:04 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/26 "2021-08-04T02:04:29Z")

</div>

For Coincashew setup you will want to make the change in your script startBlockProducingNode.sh

vi or favorite editor startBlockProducingNode.sh  
cardano-node +RTS -N4 -RTS run --Topology ${TOPOLOGY}…

then restart the service  
sudo systemctl restart cardano-node

---

<div class="post-metadata">

**Author:** ![IRF160](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/irf160/32/25241_2.png) [@IRF160](https://forum.cardano.org/u/IRF160)\
**Post date:** [4 August 2021 02:11 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/27 "2021-08-04T02:11:24Z")

</div>

I took second snaphots of the 8 core BP 4 dedicated to cardano usage during the epoch change when I was missing blocks

Started 09:45:51 - 09:47:27 UTC

Happy to share the logs with you but there was no %iowait during this period. Question though you mentioned ledger snpashots that you saw on the logs of snapshot taking. What logs were you viewing?

---

<div class="post-metadata">

**Author:** ![cardsfan7189](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/cardsfan7189/32/26736_2.png) [@cardsfan7189](https://forum.cardano.org/u/cardsfan7189)\
**Post date:** [4 August 2021 02:42 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/28 "2021-08-04T02:42:08Z")

</div>

I posted three days ago that I was going to try updating the setting, and so far it has worked for me. No missed slots since then other than those missed at the epoch change. Fingers crossed there are no missed slots this epoch.

And fewer missed slots during today’s epoch change compared to the last

. /home/xxxxx/.profile  
CPU\_CORES=4  
[[-n ${CPU\_CORES}]] && CPU\_RUNTIME=( “+RTS” “-N${CPU\_CORES}” “-RTS” ) || CPU\_RUNTIME=()  
/home/xxxxx/.local/bin/cardano-node “${CPU\_RUNTIME[@]}” run \

---

<div class="post-metadata">

**Author:** ![Ruslan\_Sendecky](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ruslan_sendecky/32/39545_2.png) [@Ruslan\_Sendecky](https://forum.cardano.org/u/Ruslan_Sendecky)\
**Post date:** [4 August 2021 04:50 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/29 "2021-08-04T04:50:40Z")

</div>

You don’t need to specify the number of cores. Just use “-N” without the number and it will use all available cores

---

<div class="post-metadata">

**Author:** ![rene\_securestaking](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/rene_securestaking/32/20592_2.png) [@rene\_securestaking](https://forum.cardano.org/u/rene_securestaking)\
**Post date:** [4 August 2021 05:09 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/30 "2021-08-04T05:09:45Z")

</div>

I am not talking about the epoch cutover. The node keeps the chain in memory and dumps that on disk on a regular interval called ledger snapshot. Default is about every 75 minutes or so. That is when I would see one or two missed slots sometimes

---

<div class="post-metadata">

**Author:** ![IPIB\_Pool](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ipib_pool/32/30593_2.png) [@IPIB\_Pool](https://forum.cardano.org/u/IPIB_Pool)\
**Post date:** [4 August 2021 07:46 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/32 "2021-08-04T07:46:37Z")

</div>

The settings seem to work fine. I got a few missed blocks after epoch change (150), but the number is not increasing, I’ll monitor the value along the epoch to see.  
I have a question: since everyone is experiencing missing blocks at epoch change, does that mean that systematically the first few blocks of every epoch are not minted by anyone? What happens to the TXs belonging to those blocks?

---

<div class="post-metadata">

**Author:** ![Xpriens](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/xpriens/32/45030_2.png) [@Xpriens](https://forum.cardano.org/u/Xpriens)\
**Post date:** [4 August 2021 08:15 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/33 "2021-08-04T08:15:16Z")

</div>

> [@IPIB\_Pool](#):
>
> The settings seem to work fine. I got a few missed blocks after epoch change (150), but the number is not increasing, I’ll monitor the value along the epoch to see.  
> I have a question: since everyone is experiencing missing blocks at epoch change, does that mean that systematically the first few blocks of every epoch are not minted by anyone? What happens to the TXs belonging to those blocks?

They are transferred to next blocks that will be solved.

Great work on all xSPO alliance members. 🥰

---

<div class="post-metadata">

**Author:** ![ADA4Good](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ada4good/32/39440_2.png) [@ADA4Good](https://forum.cardano.org/u/ADA4Good)\
**Post date:** [4 August 2021 08:43 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/34 "2021-08-04T08:43:22Z")

</div>

Got it! thanks for the explanation. This is exactly what I can confirm too. I had regular missed slots during the epoch. increased cores and never had any again, except the epoch switch

---

<div class="post-metadata">

**Author:** ![brouwerQ](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/brouwerq/32/28193_2.png) [@brouwerQ](https://forum.cardano.org/u/brouwerQ)\
**Post date:** [4 August 2021 13:09 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/36 "2021-08-04T13:09:24Z")

</div>

> [@ADA4Good](#):
>
> If that “real” leader is not online or misses that slot I don’t actually know if the other leader is allowed to mint or the block is skipped.

VRF values and slot leader schedule are only known by the pool. Unless it mints and propagates a block; then the pool’s VRF value for that slot (and only that slot) will be included in the block (alongside a proof that it’s the right value).

So in your example, the other pool’s block will get adopted and no one will ever know that their was another pool elected as slot leader for that same slot with a lower VRF value. Except that other pool’s SPO (who will be very frustrated) and everyone he/she told.

On a side note, while playing with RTS, it’s interesting to also read this post about memory usage: [Solving the Cardano node huge memory usage - done](https://forum.cardano.org/t/solving-the-cardano-node-huge-memory-usage-done/67032)

---

<div class="post-metadata">

**Author:** ![Ruslan\_Sendecky](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ruslan_sendecky/32/39545_2.png) [@Ruslan\_Sendecky](https://forum.cardano.org/u/Ruslan_Sendecky)\
**Post date:** [4 August 2021 13:43 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/37 "2021-08-04T13:43:56Z")

</div>

Hi,

Can you please elaborate on the snapshot? What do you mean it keeps the chain in memory?  
Did you mean it caches a portion of it (like any other database) and flushes it to disk periodically? Otherwise I don’t know how it is possible. Average per node instance memory consumption is around 7.5Gb. Cardano db size is 12Gb at the moment.

---

<div class="post-metadata">

**Author:** ![USONE\_SJPMurphy](https://avatars.discourse-cdn.com/v4/letter/u/da6949/32.png) [@USONE\_SJPMurphy](https://forum.cardano.org/u/USONE_SJPMurphy)\
**Post date:** [5 August 2021 05:19 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/38 "2021-08-05T05:19:00Z")

</div>

> [@Ruslan\_Sendecky](#):
>
> I believe you have to pass these options to cabal. This should be enough. I think…
> 
> -rtsopts  
> -threaded

Just wondering if the multicore has to be enabled by passing the above options to cabal (ie recompile cardano-node with this params) or will setting the runtime options “+RTS -N4 -RTS” work without recompiling?

Thanks

---

<div class="post-metadata">

**Author:** ![brouwerQ](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/brouwerq/32/28193_2.png) [@brouwerQ](https://forum.cardano.org/u/brouwerQ)\
**Post date:** [5 August 2021 06:32 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/39 "2021-08-05T06:32:27Z")

</div>

I think he means the collection of UTxOs (and stake address balances), because that’s enough for the snapshot. The whole chain isn’t needed for that. Also, the actual memory usage is much less than 7.5 gig, a big chunk of it is due to how GHC manages memory and garbage collection. See the link in my previous reaction to this post.

---

<div class="post-metadata">

**Author:** ![Ruslan\_Sendecky](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ruslan_sendecky/32/39545_2.png) [@Ruslan\_Sendecky](https://forum.cardano.org/u/Ruslan_Sendecky)\
**Post date:** [6 August 2021 09:10 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/40 "2021-08-06T09:10:15Z")

</div>

No, it will not work.  
The program will run concurrently without any options, but the threads will not run in parallel on multiple physical cores. You need to set the -threaded at compile time to link it with the correct library.  
You can set your cores at compile time as well and not bother setting it at runtime. In this case you will need:  
-rtsopts  
-threaded  
-with-rtsopts=-N

---

<div class="post-metadata">

**Author:** ![hanswurst](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/hanswurst/32/21722_2.png) [@hanswurst](https://forum.cardano.org/u/hanswurst)\
**Post date:** [6 August 2021 13:31 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/41 "2021-08-06T13:31:06Z")

</div>

Since today I personally use the following in `cabal.project.local`:

```auto
executable cardano-node
  ghc-options: -O3
                        -threaded
                        -rtsopts
                        -with-rtsopts=-N
                        -with-rtsopts=-qg1

package cardano-crypto-praos
  flags: -external-libsodium-vrf

```

Maybe this is helpul for someone 🙂

---

<div class="post-metadata">

**Author:** ![\_2072](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/_2072/32/2314_2.png) [@\_2072](https://forum.cardano.org/u/_2072)\
**Post date:** [8 August 2021 09:13 UTC](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924/42 "2021-08-08T09:13:36Z")

</div>

Note that the `-threaded` option is there by default in `cardano-node.cabal`:

```auto
executable cardano-node
  hs-source-dirs: app
  main-is: cardano-node.hs
  default-language: Haskell2010
  ghc-options: -threaded
                       -Wall
                       -rtsopts
                       -Wno-unticked-promoted-constructors
  if arch(arm)
    ghc-options: "-with-rtsopts=-T -I0 -N1 -A16m"
  else
    ghc-options: "-with-rtsopts=-T -I0 -N2 -A16m"

```

> [@hanswurst](#):
>
> Since today I personally use the following in `cabal.project.local` :

Why do you disable the parallel GC in generation 0?

[Previous page](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924.md?page=1)

[Next page](https://forum.cardano.org/t/no-more-missed-slots-during-epoch-after-changing-one-setting/67924.md?page=3)
