Code Monkey home page Code Monkey logo

Comments (4)

zhaofengli avatar zhaofengli commented on June 20, 2024 1

Now that console-rs/indicatif#325 is merged, we can use the git version and close this now.

from colmena.

zhaofengli avatar zhaofengli commented on June 20, 2024 1

This has to do with how Colmena builds the system profiles. Instead of evaluating each node individually, it writes a text file containing the system.build.toplevels and evaluates that instead, because from my experience calling nix-instantiate individually consumes much more memory in total (presumably because of the inability to reuse common nodes in their evaluation graphs). When there are a lot of nodes, it splits all selected nodes into chunks and evaluates one chunk at a time, firing off evaluation for the next one while we build and deploy those in the current chunk.

By building that text file directly, there is this unfortunate situation where some nodes can take much longer to build than others in the chunk, bogging down the deployment process (some nodes can be deployed already while we wait for others to build). That's the issue we are seeing here, and the build time is accurate in the sense that they are actually stuck for that long ๐Ÿ˜›

I think we can address that by doing nix-store -q --references on the derivation of the text file, and calling nix-build for the profile derivations individually. No work is duplicated since a lock is held in the Nix store for each derivation that is being built, and for cases like this the deployment can be much faster for nodes that don't require a kernel build.

from colmena.

lheckemann avatar lheckemann commented on June 20, 2024
..........o โœ… 2h Built "/nix/store/bbrq6v7bzvwp2gd226jprfyih2ipg2ij-nixos-system-...
..........o โœ… 2h Built "/nix/store/6h2fk3i113f923ribnilw4ypz5sqgjky-nixos-system-...
..........d โœ… 2h Built "/nix/store/a4jidxyalfa7f442jdhv85w3hppi0kck-nixos-system-...
..........o โœ… 2h Built "/nix/store/hsyp9szbzsmyab8pims4inb8m2m836im-nixos-system-...
..........e โœ… 2h Built "/nix/store/7ny4gicf404968z5jk5l2wbw6j3dgyx3-nixos-system-...
..........e โœ… 2h Built "/nix/store/s48rbjkw91pdh0kankqif3h6ckn4gahj-nixos-system-...
..........t โœ… 2h Built "/nix/store/050n5m5732lv1m48ixhjdqhhrbl13igx-nixos-system-...
..........e โœ… 2h Built "/nix/store/6ilkng1p2s1j16niwbf2l9rmv698hmmv-nixos-system-...
..........h โœ… 2h Built "/nix/store/rbshji0r9wbph0b5zq5pkiv56y2y3ind-nixos-system-...
..........l โœ… 2h Built "/nix/store/mmz5i8kz2727k1xqxcgczrfsskpvpx64-nixos-system-...

I'm still not sure if the times reported are correct, given that most of these should have finished within a minute or two while only two of them were blocked on kernel builds :/

from colmena.

lheckemann avatar lheckemann commented on June 20, 2024

Makes sense, thanks for the detailed response and new issue!

from colmena.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.