question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drastically reduce cardano-node memory usage by setting RTS params

See original GitHub issue

Since most heap in use by cardano-node is long-lived stuff, passing the +RTS -c -RTS should result in roughly half the memory usage that cardano-node is currently using.

It might be possible to reduce memory usage further by setting -F1.5, but I’m not sure about that one.

Also: CPU usage is usually high when running Daedalus. I think it would be wise to set -I0 (no idle GCs) or setting -Iw600, idle GC only every 10 minutes, for the cardano-node process.

For reference:

https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/runtime_control.html#rts-options-to-control-the-garbage-collector

image

Personally I’d maybe also increase the generations.

But long story short: I think cardano-node memory usage can be drastically reduced by simply setting some RTS params. Currently I do not know how to pass RTS parameters to cardano-node from Daedalus.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:31

github_iconTop GitHub Comments

1reaction
dmitrii-gaicocommented, Feb 7, 2022

Thank you all for the participation and feedback. Daedalus 4.8.0 had been released and includes the RTS Mode feature. For now we decided to stick with “-c” option only even it is showing not the best ram usage reduction. However based on our testing results “-c” is the safest option for the Node stability. Other flag combinations showed better ram usage improvements but unfortunately the Node started to work unstable. If you are able to find a combination which is showing better ram usage and Node stability is not affected please feel free to open a new card and share your findings. It would be much appreciated. For now I’m closing the current ticket.

0reactions
weebl2000commented, Feb 3, 2022

@dmitrii-gaico I think this was implemented in Daedalus 4.8 - do we want to close this or keep it open for looking into further RTS param tuning? I’d be open to help out with that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solving the Cardano node huge memory usage - done
The trick is that to optimize things, every time a major GC occurs, the RTS system will try to delay the next one...
Read more >
Observations on memory usage of Cardano node and cli.
This command will require about 1GB of memory in the cardano-node to run. But the cardano-cli process it self will need between 5-6GB....
Read more >
Enabling RTS Flags - IOHK Support
On Daedalus 4.8.0 we introduce the cardano-node 1.33.0 and the ability to run it with preconfigured RTS flags that reduce the RAM usage....
Read more >
5 posts tagged with "consensus" | Cardano Development ...
We have a set of property tests for the backing store. ... that exercise the mempool in a way similar to how the...
Read more >
Understanding your configuration files and how to use them
The first section relates to the basic node configuration parameters. Make sure you have to Cardano as the protocol, the correct path to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found