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

Increase nix-instantiate heap size in eval-release.sh #50990

Merged
merged 2 commits into from Jan 25, 2019

Conversation

nlewo
Copy link
Member

@nlewo nlewo commented Nov 24, 2018

Motivation for this change

Make this script working.
Note, there could be a more clever way to make it working but...

Things done

Locally executed.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Since this script can also be used for non testing purposes.
Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How I understand it setting a good heap size depends on the available memory of a machine. This makes it impossible to change if necessary.

@nlewo
Copy link
Member Author

nlewo commented Nov 26, 2018

@LnL7 I don't understand what is exactly the impact of variable, but if I don't set it to 2G, this script fails. Does it work for you without this change?

@LnL7
Copy link
Member

LnL7 commented Nov 29, 2018

Setting it to a higher value by default is probably reasonable, but it should still be overridable. eg.

export GC_INITIAL_HEAP_SIZE=${GC_INITIAL_HEAP_SIZE:-2000000000}

Otherwise, nix-instantiate fails with
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
@nlewo
Copy link
Member Author

nlewo commented Jan 25, 2019

@LnL7 Applied.
I'll merge it tomorrow (if nobody complains).

@Mic92 Mic92 merged commit 21bb1b0 into NixOS:master Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants