Skip to content

Phase 2 + 3 pause-window: NVMe + io_uring + pre-emptive background snapshot #118

@WaylandYang

Description

@WaylandYang

Item 6 of meta #112. 3 weeks; technical depth.

Phase 2: NVMe + io_uring snapshot writer (1 week)

Targets the underlying memory.bin write that still bottlenecks total BRANCH API latency on SSD even with Diff mode.

  • Replace blocking std::fs::copy in branch_sandbox with an io_uring-driven async copy (ring-buffered, configurable depth)
  • Daemon flag --snapshot-writer={blocking,io_uring}, default blocking
  • Measure on NVMe + SSD; expect ~10× on SSD's full-copy path
  • Land RESULTS-v0.3.2.md or extend RESULTS-v0.3.md

Phase 3: Pre-emptive background snapshot (1-2 weeks)

Bounds pause regardless of source size, including for non-first BRANCHes.

  • Background thread flushes dirty pages on a 1 s tick to a staging memory.bin
  • At BRANCH time, only flush the dirty-since-last-tick window
  • Pause becomes O(tick) instead of O(source memory)
  • Measure; expect bounded pause ≤ 200 ms across all dirty footprints

Anomaly to profile

  • BRANCH 3-5 pause jumps from 280 ms to 1.3-1.5 s in the multi-BRANCH sweep without diff size growing. Hypothesis: KVM control-plane accumulating state. See RESULTS-v0.3.md.

Acceptance

New RESULTS section in bench/pause-window/ with phase 2 + 3 numbers. Daemon flag(s) shipped. Anomaly root-caused or escalated upstream.

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