sbcl: Increase default heap size to 3GB.#298034
sbcl: Increase default heap size to 3GB.#298034aadcg wants to merge 1 commit intoNixOS:masterfrom aadcg:increase-default-heap-size-sbcl
Conversation
|
|
||
| buildArgs = [ | ||
| "--prefix=$out" | ||
| "--dynamic-space-size=3072" |
There was a problem hiding this comment.
- Why? What is the reason behind changing the default?
- Make it configurable. Something like an argument
dynamicSpaceSize ? 3 * 1024, plus something like
| "--dynamic-space-size=3072" | |
| "--dynamic-space-size=${dynamicSpaceSize}" |
There was a problem hiding this comment.
-
The goal is to increase the default heap size when
sbclis launched, which defaults to 1GB. Given today's machines, it is an unfit default. Note that on Guix it also defaults to 3GB. -
The suggestion makes little sense since
sbclcan be started viasbcl --dynamic-space-size <megabytes>. In other words,sbclis already flexible enough in that regard.
There was a problem hiding this comment.
It depends on how many SBCL's you want to launch at the same time (and is it nicer or not to skip the extra argument), so I'd say that if we want to override a default without a clear justification for an exact number, we should make it configurable.
There was a problem hiding this comment.
- The goal is to increase the default heap size when
sbclis launched, which defaults to 1GB. Given today's machines, it is an unfit default. Note that on Guix it also defaults to 3GB.
I do not like the idea of changing defaults, but I find it acceptable here.
2. The suggestion makes little sense since `sbcl` can be started via `sbcl --dynamic-space-size <megabytes>`. In other words, `sbcl` is already flexible enough in that regard.
Not OK.
The argument "the user can set it by itself" can be used against your own PR.
In other words, your PR makes as little sense as my suggestion.
If your next argument will be "almost everyone sets it at 3GB, so let's do it ourselves", then the same can be said about some niche examples like "in my rig of machine learning we can set this to 64GB": the niche user can tweak an argument instead of overriding the code.
There was a problem hiding this comment.
I am not a fan of changing the default [edit: in nixpkgs]. This should be taken up with SBCL devs, it's not for us to decide. They say 1GiB, we do 1GiB.
I do like the idea of allowing this to be more easily configured, but it should probably be a setuphook and a wrapper to do so, just as how nix controls e.g. GCC.
|
After taking all views into account, I believe that the best move is to close the PR. Thanks. |
Thanks for your PR though, and maybe it helps to know I constantly run into the 1GiB heap limit as well. Allowing for controlling the heap size through a setup hook has been on my todo list for ages so I completely empathize. If you manage to convince upstream SBCL to change the default you have my +1. |
|
For the record: SBCL from Nix can now have its memory controlled using an envvar: |
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.