Skip to content

--idle-timeout never fires on an untouched default instance: system background I/O is 10-40x the 100 KB/min disk threshold #1093

Closed

Description

@scttfrdmn

Found in the v0.131.1 launch-and-idle test. t4g.small, AL2023 (ami-04048e843b318bc37), us-east-1, --ttl 1h --idle-timeout 10m --on-idle stop, nothing running and nobody connected from 21:46 to 22:11 UTC. It never idle-stopped; terminated explicitly at the end.

spored judged every one of 30 ticks active (/var/log/spored.log):

21:48:33 Not idle: Disk I/O 1204224 bytes
21:49:33 Not idle: Disk I/O 2846720 bytes
...  (disk 1.1–4.3 MB on most ticks)
21:55:33 Not idle: Network traffic 112840 bytes
22:00:33 Not idle: Network traffic 104931 bytes
22:10:33 Not idle: Network traffic 186387 bytes

Both thresholds are 100 KB per one-minute tick (idleDiskBytesThreshold = 100000 in pkg/agent/agent.go; network the same).

Who is writing: a 60-second per-process /proc/<pid>/io delta on the idle instance:

1097728 systemd-journal
  16384 chronyd
   8192 spored
   8192 amazon-ssm-agen

Network peers at the time: only ssm-agent-worker (443) and chronicled (AL2023 telemetry, 443), besides the measuring SSH session.

Probably a regression from #937 (v0.129.0). Before it the disk counter dropped every NVMe device, so on Nitro instances disk read ~0 and never blocked idle; #937 made the count correct, and correct is 10–40× the threshold on an idle box. Network at 105–186 KB/min sits right on its threshold too, so even without disk it would rarely see 10 consecutive idle minutes.

Effect: --idle-timeout and --on-idle stop|hibernate do nothing on a default Linux spore; it runs to its TTL. The default when neither --ttl nor --idle-timeout is given is --idle-timeout 1h, which therefore never ends the instance. This is the demo's idle-stop step.

Fix needs a measured baseline, not a guess (CLAUDE.md rule 4): thresholds set from what idle instances of the supported AMIs actually do, with margin, and an idle test that runs a real untouched instance through to its stop. Options to weigh: raise the per-tick thresholds well above the measured baseline; or count only writes that aren't the system's own logging (journald/chrony/ssm) — more precise, more machinery.

Also see #1090: spawn status cannot show any of these readings, so a user has no way to see why an instance isn't stopping.

Activity

  1. added 4 commits that reference this issue on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions