Skip to content

Dependency evaluation on resource-constrained systems #296

@Sammcb

Description

@Sammcb

Background

Recently, I have been looking to migrate from GitHub to Codeberg. One of the main challenges I'm dealing with is moving my GitHub Actions to Codeberg's Forgejo Actions. This is because, while GitHub offers most runners with 16Gb of RAM, Codeberg has many fewer resources available and the largest hosted runners they currently offer only have 6Gb of RAM. This causes issues when using a nix-based development workflow because nix can require a lot of resources to install dependencies.

Issue

I use Flakes for development, and if a dependency is available from a Flake I prefer to use that vs. nixpkgs. Here is a simple Flake I have in a test repository I'm using to evaluate Codeberg. One of the packages I use in the flake is flake-checker, which I install from the available flake.nix. Unfortunately, even on Codeberg's largest runner, simply trying to install flake-checker uses up all 6Gb of available memory and results in the process being killed.

Help

I would love help figuring out how best to use nix on resource-constrained systems. For upstream nix, I found some issues discussing memory usage control and management (NixOS#14088, NixOS#8621) and was wondering if Determinate Nix is incorporating these upstream improvements? I would also love to know if there are any existing options you all recommend setting to help limit the memory usage of nix? I know there are options for controlling CPU usage, but I've been having difficulty finding ways to control memory usage.

I really appreciate any help! Thank you all so much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions