Skip to content

Optimize restore network setup#250

Merged
sjmiller609 merged 0 commit into
codex/restore-network-telemetryfrom
codex/restore-network-latency
May 30, 2026
Merged

Optimize restore network setup#250
sjmiller609 merged 0 commit into
codex/restore-network-telemetryfrom
codex/restore-network-latency

Conversation

@sjmiller609
Copy link
Copy Markdown
Collaborator

@sjmiller609 sjmiller609 commented May 30, 2026

Summary

  • collapse CreateAllocation from separate name/IP/MAC allocation scans to one ListAllocations pass
  • replace bridge isolation subprocess with netlink.LinkSetIsolated
  • avoid the post-create TAP LinkByName lookup by reusing the Tuntap object populated by LinkAdd
  • adjust perf output for the optimized path: add network_list_allocations_ms and remove the removed link_lookup_tap field

Benchmarks

From the prior 20-sample deft run on the VMGenID/mailbox fast-return path:

  • fork_total_ms: avg 175.9, median 156, p90 238, p95 257, max 268
  • restore_network_ms: avg 5.4, median 3, p90 7, p95 18, max 19
  • network_create_tap_ms: avg 4.0, median 2.5, p90 5, p95 16, max 18
  • network_link_add_ms: avg 2.3, median 1, p90 3, p95 14, max 16
  • network_set_isolation_ms: 0ms in final sample

Validation

  • git diff --check
  • GOCACHE=/private/tmp/hypeman-go-build GOOS=linux go test -c -o /private/tmp/hypeman-network.test ./lib/network
  • GOCACHE=/private/tmp/hypeman-go-build go test ./lib/instances -run 'TestVMGenIDResumeSignal|TestApplyForkTargetStateStoppedRefreshesSnapshotForkCID' -count=1

@sjmiller609 sjmiller609 force-pushed the codex/restore-network-latency branch from 56c18e2 to c0f6ea3 Compare May 30, 2026 18:35
@sjmiller609 sjmiller609 changed the title Instrument and optimize restore network path Optimize restore network setup May 30, 2026
@sjmiller609 sjmiller609 changed the base branch from codex/avoid-first-vsock-after-resume to codex/restore-network-telemetry May 30, 2026 18:35
@sjmiller609 sjmiller609 force-pushed the codex/restore-network-latency branch from c0f6ea3 to adf2d85 Compare May 30, 2026 19:09
@sjmiller609 sjmiller609 merged commit adf2d85 into codex/restore-network-telemetry May 30, 2026
@sjmiller609 sjmiller609 force-pushed the codex/restore-network-telemetry branch from 3054930 to da2c4a7 Compare May 30, 2026 19:09
@sjmiller609 sjmiller609 deleted the codex/restore-network-latency branch May 30, 2026 19:09
@sjmiller609 sjmiller609 restored the codex/restore-network-latency branch May 30, 2026 19:10
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.

1 participant