TVL depot development (mail to depot@tvl.su)
 help / color / mirror / code / Atom feed
* Performance of 🦙 with C++ Nix and Lix
@ 2025-12-27 16:06 sterni
  0 siblings, 0 replies; only message in thread
From: sterni @ 2025-12-27 16:06 UTC (permalink / raw)
  To: depot

Hello everyone,

I performed some benchmarks of various (versions of) Nix implementations 
calculating the .drv path of //ops/pipelines/depot on nevsky. All IFD 
store paths were prepopulated in the store and the Nix daemon was the 
same in each case.

Hyperfine did 2 warmup runs and followed by 5 actual benchmark runs of

   nix-instantiate -I depot=. -I store=/nix/store --show-trace \
     --option restrict-eval true --option allowed-uris https:// \
     -A ops.pipelines.depot

on depot r/9761. The results are as follows.

//3p/cppnix (r/9761) (~ C++ Nix 2.3)
   Time (mean ± σ):     310.226 s ±  6.187 s    [User: 257.286 s, 
System: 42.878 s]
   Range (min … max):   300.664 s … 316.956 s    5 runs

C++ Nix 2.31.2
   Time (mean ± σ):     197.645 s ±  7.784 s    [User: 212.113 s, 
System: 36.639 s]
   Range (min … max):   189.609 s … 208.111 s    5 runs

C++ Nix 2.32.3
   Time (mean ± σ):     204.543 s ±  1.365 s    [User: 192.059 s, 
System: 39.068 s]
   Range (min … max):   203.058 s … 206.042 s    5 runs

Lix 2.93.3
   Time (mean ± σ):     209.785 s ± 15.477 s    [User: 159.669 s, 
System: 38.836 s]
   Range (min … max):   188.076 s … 231.488 s    5 runs


As you can see, performance has improved a lot since Nix 2.3.18, at 
least for our workload. Switching to Lix would probably make the most 
sense if we were to switch as their goals are most aligned with our desires.

In general, performance between Lix and C++ Nix >= 2.31 is pretty much a 
wash (at least it's not really possible to conclude much with just 5 
runs). C++ Nix 2.31 outperforming 2.32 is sort of expected at the moment 
(though according to Raito, we can expect this to be resolved in the 
future). 2.32 should in theory use less memory which I haven't measured 
at all, but would also be interesting to us as we recently (r/9688) had 
to reduce pipeline eval parallelism due to memory demands.

~sterni

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-27 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-27 16:06 Performance of 🦙 with C++ Nix and Lix sterni

Code repositories for project(s) associated with this public inbox

	https://code.tvl.fyi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).