tweag / nix-hour

Questions for the weekly Nix Hour
MIT License
77 stars 3 forks source link

Nix eval performance #74

Open infinisil opened 3 months ago

infinisil commented 3 months ago

Let's investigate Nix evaluation performance! We could cover things like:

We will focus on this topic this week at Wednesday 15:00 CEST! If anybody has any extra questions about this topic, either:

asymmetric commented 3 months ago

Is IFD in scope for this? Since it has an impact on evaluation performance.

infinisil commented 3 months ago

@asymmetric Good point, sounds in scope to me!

tcurdt commented 3 months ago

Interesting topic! Let's say I want to manage 100-1000 servers - how does this scale with NixOS? Even with just 3 servers in my flake it feels like a drag sometimes.

iwanb commented 3 months ago

Not directly eval performance, but I'd be interested to know more how nix can avoid recomputing things which are already in the store, or in a substituter. E.g. I expect fixed output derivations or content-addressed derivations 'prune' the evaluation that needs to happen if they're already in the store?

And somewhat related, how does the 'toFile' built-in impact evaluation

tcurdt commented 3 months ago

Not directly eval performance, but I'd be interested to know more how nix can avoid recomputing things which are already in the store

Yeah, that's a good one. I am sometimes puzzled about how much recomputing it takes to change (seemingly?) little things. Would be good to know how to "debug" this.