How to minimise missed slot leader checks
Are you getting a high number of missed blocks / missed slot leader checks in gLiveView or on your Grafana dashboard for your Cardano node block producer? Not to worry so are most people. There are a
Originally posted on our other site
Garbage Collection Optimisation
Assuming your node is healthy and correctly configured the usual cause for the missed slot leader check is Garbage Collection.
Default settings can see missed slot leader percentages around 4-5% which isn't great. With a bit of tuning you can get it down to around 0.4%.
To change this you will need to modify your startup script. But we will get to that in a moment firstly lets touch on a few of the key settings that can impact garbage collection
Optimise Processor Usage and Garbage Collection
Again this depends on how you have compiled and installed Haskell on your node. So long as you have compiled in threaded mode then you can pass in the additional options when starting your node.
Edit the script you use to start the cardano-node, if using coincashew guide then edit the following file, otherwise edit the script you use to start cardano-node
sudo nano $NODE_HOME startBlockProducingNode.sh
look for the part of the script containing the following
cardano-node run --topology
in between cardano-node run and --topology you want to insert the following:
+RTS -N --disable-delayed-os-memory-return -I0.3 -Iw600 -A16m -F1.5 -H2500M -RTS
so the start of the line should be looking something like this
cardano-node run +RTS -N --disable-delayed-os-memory-return -I0.3 -Iw600 -A16m -F1.5 -H2500M -RTS --topology
At this point you will need to restart your node for the settings to take effect; however, read the optional section below and if you don't feel the need to turn off TraceMempool then skip ahead to Restarting your node.
Turn off TraceMempool (optional)
If you are still having issues you can consider disabling TraceMempool which can consume additional CPU and cause issues on some installations. Typically if you are not dancing on the edge of CPU and Memory minimums you shouldn’t have a problem.
Edit mainnet-config.json and change the following line from
"TraceMempool": true,
to
"TraceMempool": false,
Once you are done with the settings changes restart your node
Restart your Block Producer
sudo systemctl restart cardano-node
Tested Configs for 1.30.1
+RTS -N -T -I0 -A16m --disable-delayed-os-memory-return --nonmoving-gc -RTS (low number of missed slot checks, stable)
+RTS -N -A16m -qg -qb -RTS (coin cashew resulted in many missed slot leader checks)
+RTS -N --disable-delayed-os-memory-return -I0.3 -Iw600 -A16m -F1.5 -H2500M -RTS (low missed slots stable, faster startup)
+RTS -N --disable-delayed-os-memory-return -I0.3 -Iw600 -A16m -F1.5 -H3000M -RTS (low missed slots stable, faster startup)
Best Config Tested for 1.30.1
+RTS -N6 -I0.3 -Iw600 -A16m -F1.5 -H2500M
Tested Configs for 1.32.1
Coming soon
Last updated