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

feat: daemon: automatically set GOMEMLIMIT if it is unset #9451

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 30, 2023

  1. feat: daemon: automatically set GOMEMLIMIT if it is unset

    I have a rather big collection of profiles where someone claims that Kubo is ooming on XGiB.
    Then you open the profile and it is using half of that, this is due to the default GOGC=200%.
    That means, go will only run the GC once it's twice as being as the previous alive set.
    
    This situation happen more than it should / almost always because many parts of Kubo are memory garbage factories.
    
    Adding a GOMEMLIMIT helps by trading off more and more CPU running GC more often when memory is about to run out,
    it's not healthy to run at the edge of the limit because the GC will continously run killing performance.
    So this doesn't double the effective memory usable by Kubo, but we should expect to be able to use ~1.5x~1.75x before performance drastically falling off.
    
    Closes: ipfs#8798
    Jorropo committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    8011af2 View commit details
    Browse the repository at this point in the history