Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Nix Store, storage space and filesystem considerations

The tracker requires significant storage space to run properly. In particular,
there are two different areas you'll need storage for, the database and the Nix
store.

## Database

In order to store three diffent Nixpkgs releases, you'll need around 80GB of
space for the Postgresql database. This is the case right now for storing
24.05, 24.11 and 25.05.

As the number of CVEs and packages increases, the storage space requirement
will most likely increase as well.

## Nix Store and filesystem

Since the tracker builds derivations for all packages, it creates a lot of
small files in the filesystem. You need to make sure you have both enough space
for this and enough inodes on your filesystem. We suggest you [optimise the nix
store](https://wiki.nixos.org/wiki/Storage_optimization) and turn on automatic
optimisation.

If you're using ext4, read this [Nix issue](https://github.com/NixOS/nix/issues/1522)
as you'll need to enable support for `large_dir`in your filesystem for
optimisation to work.
4 changes: 2 additions & 2 deletions infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ Then commit `secrets/name_of_secret.age` as usual.

## Metrics

A [Prometheus Node Exporter](https://github.com/prometheus/node_exporter) is running exposing host specfic metrics. These are scraped by the nixos.org [Prometheus](https://prometheus.nixos.org/graph) and are also available under [Grafana](https://grafana.nixos.org/).
A [Prometheus Node Exporter](https://github.com/prometheus/node_exporter) is running exposing host specfic metrics. These are scraped by the nixos.org [Prometheus](https://prometheus.nixos.org/graph) and are also available under [Grafana](https://grafana.nixos.org/d/rYdddlPWk/node-exporter-full?orgId=1&from=now-24h&to=now&timezone=browser&var-datasource=default&var-job=node&var-node=tracker.security.nixos.org:9100&var-diskdevices=%5Ba-z%5D%2B%7Cnvme%5B0-9%5D%2Bn%5B0-9%5D%2B%7Cmmcblk%5B0-9%5D%2B&refresh=1m).

Moreover, a [Postgres Exporter](https://github.com/prometheus-community/postgres_exporter) and a [SQL exporter](https://github.com/justwatchcom/sql_exporter) run in the host exposing Postgres and application specific metrics.
Moreover, a [Postgres Exporter](https://github.com/prometheus-community/postgres_exporter) and a [SQL exporter](https://github.com/justwatchcom/sql_exporter) run in the host exposing Postgres and application specific metrics. A dashboard for these metrics is [here](https://grafana.nixos.org/d/beo2uotj65lvkb/nix-security-tracker?orgId=1&from=now-6h&to=now&timezone=browser&var-Instance=tracker.security.nixos.org:9237).