Skip to content

Commit 54ff0d7

Browse files
Gerrrtclaude
andauthored
fix(sensor): measure the memory bounds; zeek's halves to 2048m (#1575)
Alloy's 1024m is confirmed by 12 days of its own RSS (peak 297 MiB). Zeek's 286 MiB peak comes from only 25 h on the box, with no attack exercise in it, so its limit drops to about 7x that rather than the estate's 3.5x, and the comment says when to tighten it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7da5e12 commit 54ff0d7

2 files changed

Lines changed: 36 additions & 11 deletions

File tree

‎docs/changelog.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@ docstring gives: it is a record, not a claim about now.
1919

2020
## 2026-11-18
2121

22+
- **The sensor stack's memory limits are measured, and Zeek's halves to
23+
2048m.** The audit of 2026-11-13 asked for the bounds its compose comments
24+
said to re-derive after a fortnight. The lab's Prometheus keeps only the
25+
root cgroup for `fenrir`, so Zeek was read on the box.
26+
- **Alloy:** `process_resident_memory_bytes{job="fenrir-alloy"}` peaked at
27+
297 MiB over the 12 days of history, median 286. Its 1024m stays, now as
28+
a measurement.
29+
- **Zeek:** `VmHWM` was 286 MiB over the 25 h since the reboot of
30+
2026-11-17, 103 MiB of it anonymous. The days before are hidden in the
31+
guest's whole-host RSS, which the workstation tooling then on it held at
32+
about 1 GiB with spikes to 1.4. 2048m is about 7x rather than the estate's
33+
3.5x, because a day is thin, it held no attack exercise, and an OOM-kill
34+
only restarts Zeek with nothing alerting on it. The compose comment says
35+
to tighten it once a fortnight that includes an exercise has been read.
36+
37+
Of the audit's next steps, this leaves a drift check for `fenrir`, and its
38+
finding 10's leftovers.
2239
- **`fenrir`'s re-check with sudo finds nothing the audit could not see.**
2340
The audit of 2026-11-13 left a list "not checked without sudo, so these are
2441
skipped, not passed", and "`fenrir`'s audit of 2026-11-13 is closed on the

‎stacks/sensor/compose.yaml‎

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,18 @@ services:
8282
read_only: true
8383
tmpfs:
8484
- /tmp
85-
# A bound, not a measurement: re-derive from container_memory_rss in the
86-
# lab's Prometheus after a fortnight, as stacks/soc says of its own.
87-
mem_limit: 4096m
88-
memswap_limit: 4096m
85+
# Measured on fenrir, not in the lab's Prometheus: its cAdvisor series
86+
# are the root cgroup only. Zeek's VmHWM was 286 MiB (103 MiB anonymous,
87+
# the rest the mapped binary and scripts) over the 25 h since the reboot
88+
# of 2026-11-17; the audit of 2026-11-13 read 144 MiB. Earlier days are
89+
# hidden in the guest's whole-host RSS, which the workstation tooling
90+
# then on it pushed to 1 GiB and more. 2048m is about 7x, not the
91+
# estate's ~3.5x (#114), because a day is thin, none of it held an attack
92+
# exercise, and Zeek's state grows with connections: a scan is what it
93+
# is here for. An OOM-kill only restarts it, and nothing alerts on that.
94+
# Tighten once a fortnight of VmHWM includes an exercise.
95+
mem_limit: 2048m
96+
memswap_limit: 2048m
8997
working_dir: /zeek/logs
9098
command:
9199
- zeek
@@ -205,13 +213,13 @@ services:
205213
logging: *default-logging
206214
init: true
207215
pids_limit: 1024
208-
# A bound, not a measurement: re-derive from process_resident_memory_bytes
209-
# {job="fenrir-alloy"} in the lab's Prometheus after a fortnight, as zeek's
210-
# says. (Per-container container_memory_rss is not kept there: the lab's
211-
# cAdvisor series are the root cgroup only.) 293 MiB was the peak over
212-
# the 6.2 days fenrir had run on 2026-10-07, median 280 — flat, with no
213-
# excursion yet — and 1024m is the estate's ~3.5x on top (#114).
214-
# The neighbour is zeek's 4096m on an 8 GiB guest (#845).
216+
# Measured: process_resident_memory_bytes{job="fenrir-alloy"} in the
217+
# lab's Prometheus peaked at 297 MiB over the 12 days to 2026-11-18,
218+
# median 286, as flat as the 293 and 280 of the 6.2 days to 2026-10-07.
219+
# (Per-container container_memory_rss is not kept there: the lab's
220+
# cAdvisor series are the root cgroup only.) 1024m is the estate's ~3.5x
221+
# on top (#114), so the bound stands. The neighbour is zeek's 2048m on
222+
# an 8 GiB guest (#845).
215223
mem_limit: 1024m
216224
memswap_limit: 1024m
217225
networks: [sensor]

0 commit comments

Comments
 (0)