From 0dbcf4b90d43520acd11703eb32f41bd6235fb4d Mon Sep 17 00:00:00 2001 From: Dionysis Grigoropoulos Date: Fri, 11 Jul 2025 16:26:05 +0300 Subject: [PATCH 1/2] docs: Add info about storage space requirements --- docs/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..8e7f9994 --- /dev/null +++ b/docs/README.md @@ -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. From a4764e3d420909724f28094e29bd24210604d946 Mon Sep 17 00:00:00 2001 From: Dionysis Grigoropoulos Date: Fri, 11 Jul 2025 15:42:53 +0300 Subject: [PATCH 2/2] infra: Add links to Grafana dashboards in the docs --- infra/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/README.md b/infra/README.md index afc04f7c..576be616 100644 --- a/infra/README.md +++ b/infra/README.md @@ -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).