Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable idle GC in the default nix build #3349

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

weebl2000
Copy link

@weebl2000 weebl2000 commented Nov 8, 2021

I guess this is what's causing cardano-node constantly high CPU usage when running in Daedalus.

My suggestion would be to also add "-c" - always compact oldest generation instead of copying collection. Since most heap data is very long-lived, this can cause considerably less memory usage.

@weebl2000
Copy link
Author

@jbgi Not sure who to tag, but I've seen you've worked on this file. :)

@jbgi
Copy link
Contributor

jbgi commented Nov 8, 2021

@weebl2000
Copy link
Author

weebl2000 commented Nov 8, 2021

I think this rts option is already set at compile time:

https://github.com/input-output-hk/cardano-node/blob/2cbe363874d0261bc62f52185cf23ed492cf4859/cardano-node/cardano-node.cabal#L166

Hmm. I thought it was maybe overriding the default, but apparently not. I was trying to debug running the Daedalus / cardano-node combination but no luck so far with the nix build. But it seems cardano-node is always using 100% of one core when running from Daedalus. I'll try to investigate further.

@weebl2000
Copy link
Author

weebl2000 commented Nov 8, 2021

I think this rts option is already set at compile time:

https://github.com/input-output-hk/cardano-node/blob/2cbe363874d0261bc62f52185cf23ed492cf4859/cardano-node/cardano-node.cabal#L166

One more question. I'm not very familiar with nixos or native binaries and their linking to libraries and stuff. But do you think that running a strip and patchelf --shrink-rpath might remove the default GHC RTS options assigned at compile time?

https://github.com/input-output-hk/daedalus/blob/develop/nix/cardano-bridge.nix#L24

Such as done here.

@weebl2000
Copy link
Author

I'm getting closer, it's not here. :P

@weebl2000 weebl2000 closed this Nov 8, 2021
@weebl2000 weebl2000 reopened this Nov 10, 2021
@weebl2000
Copy link
Author

@jbgi It seems the NixOS parameters are used when running from NixOS. I think -I0 would be a good addition still.

image

@jbgi
Copy link
Contributor

jbgi commented Nov 11, 2021

bors r+

@jbgi
Copy link
Contributor

jbgi commented Nov 16, 2021

bors retry

@weebl2000
Copy link
Author

@jbgi Do I have to make any changes to fix the build?

@jbgi
Copy link
Contributor

jbgi commented Dec 9, 2021

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 9, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit f37337c into IntersectMBO:master Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants