Skip to content

Node-agent deferred init scan + OBI v0.6.0#124

Merged
paweljw merged 3 commits into
mainfrom
pawel/node-agent-deferred-scan
Mar 25, 2026
Merged

Node-agent deferred init scan + OBI v0.6.0#124
paweljw merged 3 commits into
mainfrom
pawel/node-agent-deferred-scan

Conversation

@paweljw
Copy link
Copy Markdown
Member

@paweljw paweljw commented Mar 17, 2026

Summary

  • Patch node-agent to defer filesystem init scan, reducing startup overhead
  • Upgrade OBI from v0.5.0 to v0.6.0, parameterized as a build arg

🤖 Generated with Claude Code

paweljw added 2 commits March 17, 2026 11:19
node-agent does an incredibly greedy scan on boot. this makes the caches fill up faster, at the cost of massive memory spike. also `init` holds all the data in memory by default until it's done.

- new knob: `--init-scan=<enabled>|deferred|disabled`
- new knob: `--init-scan-delay=<30s>`

Plus a new batched init behavior with gc passes in between. By default does what upstream does.

**When deferred**:

- allows new containers to be discovered from ebpf immediately on boot, slowly expanding "known state"
- after deferring for init-scan-delay seconds, runs batched init, filling caches carefully with gc passes

Pros: lower moment-to-moment memory usage, reducing peak
Cons: slower "full picture" (should still grab full state by about 60s since boot though)

**When disabled**:

- no walking /proc at all
- memory impact _only_ from ebpf detections
- possibly missing detections on non-networked processes

I'm not aiming to use --init-scan=disabled, but I want to have it as an option. releasing new binaries comes with a time-to-adoption cost; I want the knob ready to go _if_ I ever need it.
@paweljw paweljw requested a review from curusarn March 17, 2026 10:54
Copy link
Copy Markdown
Contributor

@curusarn curusarn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good! 🤞

@paweljw paweljw merged commit c6a54c7 into main Mar 25, 2026
5 checks passed
@paweljw paweljw deleted the pawel/node-agent-deferred-scan branch March 25, 2026 14:52
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.

2 participants