-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Nixpkgs eval time is increasing too fast #320528
Comments
Eval HistoryCommand measured:
release-24.05 (ff91973)user 1m50,262s release-23.11(f0d1115)user 1m26,884s release-23.05 (9a333ea)user 1m26,971s release-22.11 (ea4c80b)user 0m59,795s release-22.05 (380be19)user 0m43,354s release-21.11 (2766f77)user 0m36,231s |
Did the number of derivations that we build also grow linear over this time frame? |
Packages increase ~8k per release.
Also packages 'by-name' is dynamic.
Or some other hack, 'by-name' could be generated and static, also optimized/cached. Would that help? Needs to be confirmed. Lockfiles and it's bundled dependencies in nixpkgs being bad, yes. It's hard to point to a single problem here. This is only getting worse unless we do something. Question is what? |
Reduce the size of nixpkgs
Make nixpkgs evaluation faster or at least don't regress
|
cc @Ericson2314 since I know you're interested in improving this |
From what I've got told, those are usually a bit wonky unless and only round about. |
Self-promotion :)
my two cents: https://discourse.nixos.org/t/monorepos-dont-map-to-our-social-structure/44162/39 |
I think we must do some profiling to know which lines are the worst hitters and where we need to optimize the most. Also it would be cool to compare, which parts got the biggest increase over time. I think right now we are just guessing, it could be nix, it could be lib, it could be finalAttrs or meta or splicing or it could be anything else. |
Parallel Nix evaluation |
I just want to point out that, for darwin at least, there has seen substantial eval regressions even for a single package. I brought this up in matrix and was told that its probably because the bootstrapping chain getting longer. I'm sure that evaluation performance of all packages is very important for NixOS maintainers, but just want to add that even little people like me are feeling eval performance pain in narrower context, and that won't be fixed by removing unmaintained packages :) |
I also noticed that macOS takes significantly longer to evaluate the same nix-shell as on my Linux machine. |
Yeah we need to do some profiling, the fact is no one has any idea why it is so slow. 10,000s of packages should not be this slow to evaluate! |
I had a hunch
"" and making all Cargo.lock files empty (fd Cargo.lock -X sh -c 'echo | tee {}' ). I then tested before and after.
We spend about 30% of our eval time and 15% of our heap size on parsing/handling
a62a011 (stubbed):
Delta side-by-side
|
Anyone up for a spring clean? NixOS/rfcs#180 |
So I just found out that the 20s delta we see here is caused by just ~300 packages. This means an average of 76.67ms for each More details about the problem with |
At
Mar 25, 2023
, eval time was at1m5s
:#221716 (comment)
Now,
Jun 17, 2024
, it is:1m53,458s
, same host, my hostCI is also getting slower.
The text was updated successfully, but these errors were encountered: