Configuring GHC Runtime System Options
Depending on hardware specifications, in some implementations of Cardano Node configuring runtime system (RTS) options available for the Glasgow Haskell Compiler (GHC) may improve performance and/or stability.
The RTS offers many options for controlling behaviour. For example, depending on system specifications and Cardano Node version, a block-producing node sometimes may miss checking every second whether to prepare a block. Cardano Node reports missed checks using the cardano.node.metrics.slotsMissed_int EKG metric. Using custom RTS options, you may seek to reduce the number of checks that the block-producing node in your stake pool configuration misses, for example due to time spent in garbage collection (GC).
Note | For more details as well as suggestions on reducing the number of missed checks to prepare a block, see the topic Improving Cardano Node Performance. |
To display the default RTS options for Cardano Node:
- Using a terminal window, type:cardano-node +RTS --info
In the results, the value of the Flag -with-rtsopts key displays the default RTS options. For example:
-T -I0 -A16m -N2 --disable-delayed-os-memory-return
Challenge | Using the GHC User's Guide, investigate the default RTS options, as well as additional available RTS options. Specifically, refer to the sections RTS Options for SMP Parallelism and Runtime System Options. |
For example, to produce runtime system statistics for each garbage collection in addition to using default RTS options, include the following RTS option in the cardano-node run command where <FileName> is the name of the file in the current folder where you want to output statistics and <Options> is the list of options to use when running Cardano Node:
/usr/local/bin/cardano-node +RTS -S<FileName> -RTS run <Options>
Different stake pool operators report improved performance and/or system stability using different RTS options. If you are not satisfied with the performance or stability of an instance of Cardano Node, then subjectively you may notice improvement when adding custom RTS options. For example:
+RTS -N -qg -qb -RTS
+RTS -I0.3 -Iw600 -F1.5 -H2500M -RTS
+RTS -M12g -N -RTS
Using similar syntax, you can configure custom RTS options for Cardano CLI.
To display the default RTS options for Cardano CLI:
- Using a terminal window, type:cardano-cli +RTS --info
If you identify different RTS options that noticably seem to improve the performance or stability of a Cardano Node instance, then please consider Contributing the RTS options to the How to Set Up a Cardano Stake Pool guide so that other stake pools may potentially also benefit.

