Comments (7)
Somewhat of a duplicate, but for the new CLI.
See #5200 for previous discussion including possible solutions and trade offs.
from nix.
Ugh sorry I couldn't find that issue :/ Should I close mine as a duplicate?
from nix.
Also my hypothesis is that while the heap allocation used during evaluation got free()
d afterwards, no calls to sbrk are made to unmap the allocated memory pages, causing them to still appear as being used to the OS. I don't have any experience with c++ or Boehm GC though so this is just a guess.
from nix.
You might be onto something. It doesn't seem eager to unmap when reading the code docs, although the default setting is unclear.
Could you try with GC_FORCE_UNMAP_ON_GCOLLECT=1
in the environment?
Source: https://github.com/ivmai/bdwgc/blob/8915b63d987f6034fa53d42c3a2d8a2b978f0614/include/gc/gc.h#L2150
Also if we want to run a GC before building, we should probably call GC_gcollect_and_unmap
instead of GC_gcollect
, to basically force the same effect, temporarily.
from nix.
Yes it made a significant difference. Setting the flag makes the memory usage drop from 3.5 gigs to ~800MB. Might want to turn this behavior on by default?
from nix.
@poscat0x04 could you try #10879?
from nix.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2024-06-12-nix-team-meeting-minutes-152/46958/1
from nix.
Related Issues (20)
- Upload lock held for longer than necessary HOT 3
- Building Nix fails with stack overflow during doc generation on Amazon Linux HOT 5
- Problem with the SSL CA certificate HOT 1
- Configure niceness of build tasks
- nix-build fails to look <paths> up in its arguments HOT 3
- Cannot install on OSX 14.5 (M2) HOT 1
- Flake copying performance regressed on macOS in 2.19 HOT 2
- CLI exit codes
- `nix.settings.preallocate-contents` is not enabled by default
- "Suggest an edit" link in documentation is broken for Experimental commands
- Document (and (re?)name) the "installable" concept in e.g. `nix eval`
- More structured settings in nix store URLs HOT 1
- uncaught exception: eDSRecordAlreadyExists HOT 2
- Incorrect parsing of `or` as a variable in expressions
- More explicit parser dump format for testing
- Clarify the special role of `default.nix`
- Single user installation: Using $HOME/.nix instead of /nix HOT 3
- Garbage collection fails because directory is not empty
- Add Gitea/Forgejo flake input
- enable clang's `-Wdocumentation` for doc-comments?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix.