Speed up post-restore guest network reconfigure#248
Closed
sjmiller609 wants to merge 2 commits into
Closed
Conversation
9c5bbb0 to
12c4783
Compare
Collaborator
Author
|
Closing in favor of #253, which combines the main ReconfigureNetwork + mailbox/VMGenID path with the exploratory pieces trimmed out. Keeping the branch for reference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ReconfigureNetworkRPC that applies restored fork MAC/IP/route updates via netlink instead of spawning shell +ipcommandsreconfigure_guest_network, with fallback to the existing shell exec path for older guest agents/snapshotsDeft validation
On
deft-kernel-devfrom a short remote workspace (~/hmge):make build-embeddedgo test ./lib/guest ./lib/system/guest_agentgo test ./lib/instances -run "TestGuestNetworkReconfigureConfig|TestGuestNetworkReconfigureCommand|TestNetworkConfigFromAllocation|TestRequiresRestoreConfigDiskRefresh" -count=1sudo env ... HYPEMAN_RUN_RECONFIGURE_GUEST_NETWORK_PERF=1 HYPEMAN_RECONFIGURE_GUEST_NETWORK_PERF_ITERS=3 /tmp/reconfigure-perf.test -test.v -test.run TestReconfigureGuestNetworkPerf -test.count=1 -test.timeout=12msudo env ... go test ./lib/instances -run TestFirecrackerForkFromRunningNetwork -count=1 -timeout=12m -vPerf notes
Baseline reproduced
reconfigure_guest_networkaround ~797-943ms, dominated by first post-resume guest exec stream contact and shell/process execution. The netlink RPC reduced the step to ~197-214ms in the final 3-iteration run, with the successful unary apply taking ~35-53ms. Remaining cost is still first-contactgrpc_unavailableafter resume, so sub-100ms likely needs a separate guest-agent/vsock readiness change or guest-side proactive reconfigure.