Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get paths faster #3

Closed
deemp opened this issue Jul 3, 2023 · 1 comment
Closed

Get paths faster #3

deemp opened this issue Jul 3, 2023 · 1 comment

Comments

@deemp
Copy link
Collaborator

deemp commented Jul 3, 2023

Currently, I use nix copy to copy paths from a cached chroot store from and into root store.

Copying takes a lot of time at the start of a job.

Possible solution

  • daemon 1 with low priority copies paths that aren't yet in /nix/store.
  • daemon 2 with high priority substitutes paths on demand.
  • Daemons run during all steps of a job until after saving cache to GitHub Actions cache.
  • If a daemon 2 needs to substitute and lock the store, daemon 1 stops for a while, then continues.

Advantages

  • Get necessary paths selectively.
  • Utilize time of other steps (there are 2+ CPUs - docs).

Disadvantages

  • Other steps may require all CPUs

Alternatives

@deemp deemp changed the title Faster store copying Restore store from cache faster Jul 3, 2023
@deemp deemp changed the title Restore store from cache faster Get store from cache faster Jul 3, 2023
@deemp deemp changed the title Get store from cache faster Get paths faster Jul 4, 2023
@deemp
Copy link
Collaborator Author

deemp commented Jul 7, 2023

Solved by https://github.com/deemp/cache-nix-too/tree/use-nix-quick-install-action as it becomes possible to restore and save store paths directly without copying from an intermediate store.

@deemp deemp closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant