Skip to content

Conversation

@fricklerhandwerk
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk commented Dec 10, 2024

evaluations write garbage, which we don't use, to disk if we hit the physical store, so this should speed things up a bit

@RaitoBezarius
Copy link
Member

TODO to unblock:

  • add tmpfs creation in the nixos modules
  • configure that evaluation store dir
  • configure it for the staging deployment

@Erethon
Copy link
Collaborator

Erethon commented Dec 12, 2024

Something to keep in mind if we're to implement this (and we might need to document it even if we keep using /nix/store): The tracker produces a lot of derivations, currently in the production instance we have ~1.3 million files in /nix/store and that's only with 24.11 and part of 24.05 ingested. This makes it easy for a filesystem to run out of inodes (it happened earlier in the production instance and I had to intervene).

A tmpfs with default settings has number_of_pages / 2 inodes. This means that on a typical system with 16GB of memory and a pagesize of 4096, we get ~4 million pages, which means ~2 million inodes. Two million inodes might not be enough for our usecase, so we'll have to mount the tmpfs with more inodes instead of the default.

Then again assuming a derivation is ~3kB in size (which I think is fairly typical) and we have ~1.5m of those, that's already almost 5GB of data, so we'll face memory issues as well as inode issues. If we really don't need those derivations, we should have a way to clean them as soon as we're done with them. And ideally not have them touch the disk but use a tmpfs, as per the original idea.

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

Successfully merging this pull request may close these issues.

3 participants