Skip to content

Add benchmarks for end-to-end compilation of NixOS/Nix for perf work #7

@elpdt852

Description

@elpdt852

ninja takes ~6m with ninja -j16

$ time ninja -j16 src/nix/nix
[134/290] Generating src/libexpr/lexer-tab.cc with a custom command
../src/libexpr/lexer.l:329: warning, -s option given but default rule can be matched
[290/290] Linking target src/nix/nix

real	6m12.504s
user	37m32.650s
sys	2m25.418s

nix-ninja takes ~6m with nix build -j16:

time nix build -j16 --store /home/tmp-dyn-drv/ .#example-nix
________________________________________________________
Executed in  371.88 secs    fish           external
   usr time   32.97 mins  815.00 micros   32.97 mins
   sys time    6.23 mins    0.00 micros    6.23 mins

How come it's the same..? Generating the derivations along takes ~2m12s alone (benchmarked in #4) so I find it hard to believe that nix-ninja is faster than ninja. Especially since nix-ninja strictly does more work with nix protocol overhead and sandboxing.

Regardless, we should setup a benchmark for it so it can be used as test bed for improvements to nix-inja and upstream perf work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions