mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Increase the initial Boehm GC mark stack size
If the mark stack size is too small, it greatly inhibits parallel marking, which is very bad for performance on multi-core systems.
This commit is contained in:
parent
4c1c4f79a3
commit
0d559f0c13
1 changed files with 13 additions and 3 deletions
|
|
@ -50,9 +50,19 @@ scope: {
|
|||
requiredSystemFeatures = [ ];
|
||||
};
|
||||
|
||||
boehmgc = pkgs.boehmgc.override {
|
||||
enableLargeConfig = true;
|
||||
};
|
||||
boehmgc =
|
||||
(pkgs.boehmgc.override {
|
||||
enableLargeConfig = true;
|
||||
}).overrideAttrs
|
||||
(attrs: {
|
||||
# Increase the initial mark stack size to avoid stack
|
||||
# overflows, since these inhibit parallel marking (see
|
||||
# GC_mark_some()). To check whether the mark stack is too
|
||||
# small, run Nix with GC_PRINT_STATS=1 and look for messages
|
||||
# such as `Mark stack overflow`, `No room to copy back mark
|
||||
# stack`, and `Grew mark stack to ... frames`.
|
||||
NIX_CFLAGS_COMPILE = "-DINITIAL_MARK_STACK_SIZE=1048576";
|
||||
});
|
||||
|
||||
# TODO Hack until https://github.com/NixOS/nixpkgs/issues/45462 is fixed.
|
||||
boost =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue