Dyn Drvs Working Group - Kickoff meeting
Result of Dynamic Derivations + Dynamic build graphs: next steps - #11 by tomberek. If interested; contact @tomberek for meetup invites, Ping @Ericson2314 for org invites, join Matrix: #nix-dyn-drv:ggpeti.com for discussion.
Status
-
- @artemis has been working on rust use case w/crates per derivation
- if using one of the libraries then end user doesnβt need to know
- basic primitives are feature complete
- build integrations
- have had dyn-drvs for a while, but depended on recursive-nix
- @artemis implemented builder-rpc-v0 (unix domain socket) to interact with store and register outputs, allows for references between outputs
- Haskell has Sandstone (need to investigate Darwin failure)
-
- Q: do we have to register the outputs?
- A: @artemis: only have to register final derivation, the tree is resolved by nix-daemon
- Q: can it be used as a caching mechanims, via CA?
- A: Yes if the fine-grained derivation collides. They become valid paths.
-
@tomberek: anything else needed in Nix itself?
- A: @ericson: allow for building to get started before entire plan is done. Can implement your integration without depending on it, but can get speed up for free. Looking to remove placeholders. More work needed on signature format.
-
- lang2nix tool development can work in parallel
-
@reiss:
- sandboxing costs 30-40% (few versions ago)
- @ericson: current design doesnβt inherently have the costs, this can be optimized over time. Current approach does O(n) mounting of dependencies. Can consider file-descriptor based approachs.
- @artemis: a firecracker-based VM can do snapshot/restore, or get reused
-
- Hydra work need.
Brainstorm
Things to work on
-
@tomberek: working on a gg-style set of shims. Currently working on something to replace things like ccache + distcc.
-
@bryanhonof: we are currently investigating making Nix Bazel-like
- @tomberek: we have a similar project from pre-dyndrvs (GitHub - anduril/nixel Β· GitHub)
-
@bryanhonof: Buck2? They call it something else, but have a similar concept.
- @ericson: not yet explored
-
@bryanhonoh: intersted in a Linux kernel builder. Custom drivers and patches make rebuilding expensive.
- @tomberek: iβll try it
- @ericson: this might work with nix-ninja: GitHub - vitkyrka/kninja: Ninja build file generator for the Linux kernel Β· GitHub Kernel becomes a blob, self-references not an issue
- @jaen: in my experience with OotB Nix Chromium isnβt really practical, so the kernel probably wonβt be either (at least a fully granular build); I can throw kninja output at my fork and see what shakes out after I finish finding all the kinks in the Chromium build
-
@tomberek: Do we try to coordinate the user-facing design?
- @ericson: goal is to get this into Nixpkgs. Hydra work is for that purpose. Can focus on having this be the way various ecosystems.
- @tomberek: feature detect? (bulitins?outputOf) to turn it on/off
- @ericson: @roberth spoke of dynamic-inputs. Instead of needing a trampoline, can hook up the dependencies the other way around. Resolution of dynamic inputs happen before CA and scanning.
-
cachix is implementing support β¦ in-progress. Needs to learn about realizations. There may be a development server available.
-
@ericson: @jaen is working on an NL project related, curious about it.
- @jaen: it is, roughly, a webscale nix-ninja β I tried to build AOSP with the upstream version, it didnβt work for various reasons: at first being N2βs Ninja parser was way too slow, then it turned out a lot of things in Nix just donβt work well at scale (e.g. Make the Worker not choke on 70k derivation builds by xokdvium Β· Pull Request #15611 Β· NixOS/nix Β· GitHub which I also came across); right now Iβm fishing for optimisation at ~Chromium scale, I hope to make a document describing them soon, and we can triage what to implement and in what order
Next
- infra
- Hydra: @artemis: should work, needs further testing. A few PRs are in flight.
- @tomberek: should we setup shared infrastructure?
- @ericson: having join infra and larger scale demo would help βlive itβ. Performance issues would be felt and prioritized.
- @tomberek: I can try to get an Oxide rack. (no ARM, no KVM)
- @artemis: considering Obsidian after some TBD work
- @mschwaig: how much? (@tomberek: maybe Hydra + 2 builders)
- @waern: nixbulid recently added CA-derivation, not yet added support for DynDrvs.
- @ericson: draft of RFC to stablize the rpc format, derivation format, etc.
- Currently rpc implements the protocol as a limitted form of the regular protocol, inheriting the daemon protocolβs warts. There is some thought on other formats (CapβNβProto,Varlink, etc) might reduce toil for integrations. It is possible that the format can change.
- When do we start aggressive outreach?
- nixpkgs fork/overlay
- build farm
- cache: S3 might be best for now
- admin
- video: Jitsi Meet
- shared GitHub org with fork/overlay
- Matrix: #nix-dyn-drv:ggpeti.com
- todo move to nixos.org
- documentation/tutorials/testimonials
- benchmarks/perf
With Jaen post meeting
- derivation formats for perf
Tasks
- @tomberek: ask Oxide for a rack
- @tomberek: establish meetup cadence
- @bryanhonof: can get feedback from internal use
- @ericson: Github org
- @artemis: Hydra stand-up + infra
- @adeci happy to help here with infra
- @bryanhonof: engage on cache
- @mschwaig: build-trace implementation
- @lyndeno: explore kernel build + writeup
- all: send Github handles to @ericson