diff --git a/docs/changelog.md b/docs/changelog.md index e9e7a4b1..837d2349 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,23 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-18 +- **The sensor stack's memory limits are measured, and Zeek's halves to + 2048m.** The audit of 2026-11-13 asked for the bounds its compose comments + said to re-derive after a fortnight. The lab's Prometheus keeps only the + root cgroup for `fenrir`, so Zeek was read on the box. + - **Alloy:** `process_resident_memory_bytes{job="fenrir-alloy"}` peaked at + 297 MiB over the 12 days of history, median 286. Its 1024m stays, now as + a measurement. + - **Zeek:** `VmHWM` was 286 MiB over the 25 h since the reboot of + 2026-11-17, 103 MiB of it anonymous. The days before are hidden in the + guest's whole-host RSS, which the workstation tooling then on it held at + about 1 GiB with spikes to 1.4. 2048m is about 7x rather than the estate's + 3.5x, because a day is thin, it held no attack exercise, and an OOM-kill + only restarts Zeek with nothing alerting on it. The compose comment says + to tighten it once a fortnight that includes an exercise has been read. + + Of the audit's next steps, this leaves a drift check for `fenrir`, and its + finding 10's leftovers. - **`fenrir`'s re-check with sudo finds nothing the audit could not see.** The audit of 2026-11-13 left a list "not checked without sudo, so these are skipped, not passed", and "`fenrir`'s audit of 2026-11-13 is closed on the diff --git a/stacks/sensor/compose.yaml b/stacks/sensor/compose.yaml index 6c87ef00..bd6b0b84 100644 --- a/stacks/sensor/compose.yaml +++ b/stacks/sensor/compose.yaml @@ -82,10 +82,18 @@ services: read_only: true tmpfs: - /tmp - # A bound, not a measurement: re-derive from container_memory_rss in the - # lab's Prometheus after a fortnight, as stacks/soc says of its own. - mem_limit: 4096m - memswap_limit: 4096m + # Measured on fenrir, not in the lab's Prometheus: its cAdvisor series + # are the root cgroup only. Zeek's VmHWM was 286 MiB (103 MiB anonymous, + # the rest the mapped binary and scripts) over the 25 h since the reboot + # of 2026-11-17; the audit of 2026-11-13 read 144 MiB. Earlier days are + # hidden in the guest's whole-host RSS, which the workstation tooling + # then on it pushed to 1 GiB and more. 2048m is about 7x, not the + # estate's ~3.5x (#114), because a day is thin, none of it held an attack + # exercise, and Zeek's state grows with connections: a scan is what it + # is here for. An OOM-kill only restarts it, and nothing alerts on that. + # Tighten once a fortnight of VmHWM includes an exercise. + mem_limit: 2048m + memswap_limit: 2048m working_dir: /zeek/logs command: - zeek @@ -205,13 +213,13 @@ services: logging: *default-logging init: true pids_limit: 1024 - # A bound, not a measurement: re-derive from process_resident_memory_bytes - # {job="fenrir-alloy"} in the lab's Prometheus after a fortnight, as zeek's - # says. (Per-container container_memory_rss is not kept there: the lab's - # cAdvisor series are the root cgroup only.) 293 MiB was the peak over - # the 6.2 days fenrir had run on 2026-10-07, median 280 — flat, with no - # excursion yet — and 1024m is the estate's ~3.5x on top (#114). - # The neighbour is zeek's 4096m on an 8 GiB guest (#845). + # Measured: process_resident_memory_bytes{job="fenrir-alloy"} in the + # lab's Prometheus peaked at 297 MiB over the 12 days to 2026-11-18, + # median 286, as flat as the 293 and 280 of the 6.2 days to 2026-10-07. + # (Per-container container_memory_rss is not kept there: the lab's + # cAdvisor series are the root cgroup only.) 1024m is the estate's ~3.5x + # on top (#114), so the bound stands. The neighbour is zeek's 2048m on + # an 8 GiB guest (#845). mem_limit: 1024m memswap_limit: 1024m networks: [sensor]