mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[GH-ISSUE #101] [RFC] Exploring an end-to-end ARM64 support path for AgentENV: findings from a validated DGX Spark deployment #35
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @leether on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/kvcache-ai/AgentENV/issues/101
Affected component
Cross-cutting / other
RFC intent and possible closure
This is a request for design feedback, not a request to declare ARM64 supported
or to merge one large implementation. A useful outcome could be any of the
following:
with that position recorded.
that tier and its compatibility boundary are recorded and focused follow-up
issues or PRs are identified.
close or be deferred with the missing validation and revisit conditions
recorded.
Problem statement
This RFC asks whether ARM64 server/runtime support is within AgentENV's scope
and, if so, what initial level of support the project might intend to provide
and test.
A server that compiles on
aarch64is an important milestone, but it does notby itself prove that the selected Firecracker build, guest kernel, tools drive,
ublk/OverlayBD path, seccomp policy, and snapshot lifecycle work together.
There are two adjacent open contributions as of 2026-07-31:
artifacts, installer selection, and multi-architecture container publishing.
source-build path, architecture-aware Firecracker and guest-kernel downloads,
ARM tools-drive construction, and openEuler recognition.
This issue is not a replacement for either PR. It first asks whether the
project would like to pursue ARM64 server/runtime support. If the answer is
yes, this case study may help distinguish a build or installation milestone
from an end-to-end supported runtime.
We independently assembled and operated one complete AgentENV stack on an
NVIDIA DGX Spark. This work did not use or validate #86 or #94. It demonstrates
that one full ARM64 combination is feasible, but it does not prove that every
ARM64 host, kernel, or distribution is compatible.
Related work and scope
One dependency observation may be relevant when reviewing those paths. At the
current #94 head (
3134f27), its manifest selectsfirecracker-1.15.1-patch-v1-aarch64andvmlinux-6.1.175-aarch64from theaenv-depsrelease. That release tag resolves to source commit
90288c3,whose serial restore path predates
#5764 and does
not save and restore the full UART device state.
This is a source/provenance comparison, not a claim that I executed #94's
published binary or reproduced a failure through #94. It is evidence that an
ARM snapshot baseline should be selected and tested explicitly instead of
being inferred from an asset name.
Use case
The concrete case is a single-node AgentENV server on a native ARM64 host. If
the project later chooses to pursue an end-to-end ARM runtime tier, a supported
profile would need to:
architecture;
envdRPCs and console output after restore;envdafter a crash orSIGKILL; andFirecracker.
The independently validated profile was:
Cortex-X925/Cortex-A725), 4 KiB pages6.17.0-1021-nvidia,aarch64/dev/kvmpresent;CONFIG_BLK_DEV_UBLK=m; realuvm-ublk-daemonand OverlayBD data path0.1.0-arm64.11d79fd2dleether/arm64-assembly-linekvcache-ai/firecracker-nextv1.17.0-next.1/fee2681b792de1,aarch64-unknown-linux-gnufc-v1.17.0-next.1+agentenv.arm64.1.b792de1agentenv-v1.17.0-next.1-arm64.16.17.0-1021-nvidiaARM64 kernel image0.1.0-arm64.3envd0.6.13/bfdbb24This is one validated combination, not a proposal that AgentENV adopt these
exact versions.
Current behavior and workarounds
End-to-end runtime evidence
The public reference branch contains a native ARM regression that deliberately:
envdstderr is not/dev/console;/dev/consoleafter restore, so log redirectioncannot hide a broken virtual UART;
envdRPCs after restore; andenvdand verifies supervisor recovery without recreating the sandbox.The automated gate is documented in
arm64-assembly.mdand implemented in
uart_snapshot.rs.Separate production-promotion observations on this single DGX host recorded
three snapshot-based starts at 90 ms, 79 ms, and 71 ms; 300/300 repeated execs;
two 16 KiB console-write checks; pause/resume; and
envdsupervisor recovery.These are operator-recorded observations, not additional iterations encoded in
the public automated test.
Preliminary single-host performance context
End-to-end CLI pilot
We also ran a small warm-cache pilot on the same DGX host, using the same 2
vCPU / 1024 MiB sandbox size. Snapshot starts used the default
alpinetemplate; cold starts used
localhost:5000/alpine:3.20from the local registry.The modes were interleaved, and no vLLM requests were running during the
measurement.
start -dp50start -drangeWithin this one host and measurement boundary, snapshot start p50 was about
5.1x faster than cold start, and time to first successful exec was about 3.4x
faster. Both modes had a slower first iteration, so this sample is too small to
claim p95 or p99. A publishable benchmark should first run five warm-up
iterations per mode and then measure at least 100 iterations.
This pilot reports only two end-to-end measurements:
start -d, and start tofirst successful
exec. Those values include CLI, API, orchestration, andreadiness overhead and are not used below to judge the README latency targets.
Repository snapshot benchmark
AgentENV's current
READMEstates that snapshot-backed environments boot or resume in under 50 ms, pause
in under 100 ms, and create incremental snapshots in under 100 ms even under
heavy disk modification. The same repository now contains a direct backend
snapshot_benchmark.rswith explicit operation boundaries. The README does not say that this file
produced the published numbers, so this is a reproduction of the repository's
closest code-defined benchmark, not a claim about the maintainers' original
benchmark environment.
We copied that benchmark file unchanged at commit
a33198eand verified thesource SHA256 (
abc15b944e54639774868a43a4ebf46c52b8fe62309878de4f98418565d6aa6b)before building it against the ARM reference branch. The timed operations,
1-vCPU setting, base 128 MiB guest, and heavy-data preparation were unchanged.
Firecracker, the guest kernel, tools drive, and envd were the same artifacts as
the validated production assembly. The benchmark used an isolated AgentENV
home, runtime directory, ublk daemon, image cache, network CIDRs, and
ubuntu:24.04rootfs. Other production services remained running.We then ran the repository's full Criterion mode unchanged: 3 seconds of
warm-up, a 20-second target measurement window, and 10 samples per benchmark.
Criterion extended several windows when necessary. Its output reports
[lower bound, point estimate, upper bound]:snapshot_resumesnapshot_creation(sandbox.pause())snapshot_creation_1gdisk(1 GiB direct write,sync, drop caches)snapshot_resumesnapshot_creation_1gmemconcurrent_resumeTo check repeatability outside Criterion's aggregation, we launched three new
benchmark processes and retained all 30 bounded samples for both cold and hot
resume. Each round produced exactly one roughly 30-second stall: cold sample 6
and hot sample 7. Across all samples, cold resume had median 106.2 ms and hot
resume median 80.9 ms, but each had a 3/30 stall rate. The 27 sub-second cold
samples were 91.70–118.71 ms (mean 103.51 ms); the 27 sub-second hot samples
were 61.55–85.06 ms (mean 76.95 ms). The retained stalls were
30.91–31.04 seconds cold and 30.52–30.54 seconds hot. Their duration is close
to the benchmark's explicit 30-second socket timeout, but the current logs do
not establish which wait consumed it; that is correlation, not a root-cause
claim. Criterion's summarized interval did not expose this periodic stall, so
both the central estimate and the bounded raw-sample behavior are reported.
The benchmark times
FirecrackerSandbox::resume_from_snapshot_config()andsandbox.pause()directly. It excludes CLI/API/orchestrator latency and doesnot separately time user-facing persistent snapshot publication or object
storage. The file also has no separate snapshot-boot case; hot and cold resume
are the closest code-defined paths. Within that exact backend boundary, the
base and heavy-disk capture paths met the two numerical under-100-ms thresholds,
while hot resume did not meet the under-50-ms threshold. This is code-path
evidence, not a full reproduction of every README lifecycle boundary. It is
also not an ARM-versus-x86 comparison; that requires the same commit, artifacts,
runner, and background-load policy on a comparable x86 host.
Compatibility lessons from the bring-up
AgentENV needs its patched Firecracker API. A same-numbered upstream
binary may run but reject AgentENV's downstream drive fields such as
direct, as #63 demonstrates.Snapshot behavior has a minimum baseline. Our earlier
v1.15.1-patch-v1-lineage assembly reproduced a deterministic UART TX stallafter snapshot restore. The behavior matches the bug fixed by Firecracker
#5764 and disappeared after moving to a
v1.17.0-next.1lineage containingthat fix. We did not perform a single-commit bisect, so this should be read
as a strong compatibility finding, not proof that only one commit differed.
A guest workaround can mask a device bug. Keeping
envdlogs away from/dev/consoleprevents the original HTTP 504 symptom, but it does not provethat UART TX survived restore. The regression therefore exercises the
console device directly.
The build target and seccomp policy are coupled. The validated
Firecracker is an ARM GNU build. Reusing the ARM musl policy unchanged did
not cover libc-specific signal and process behavior; an empty fallback would
silently weaken isolation. The release therefore carries a reviewed,
default-deny ARM GNU policy and fails if it is missing.
The guest kernel is part of the product. Our selected distribution
kernel has
CONFIG_IP_PNPdisabled, so the tools init applies the finalAgentENV-injected
ip=argument in userspace. The 6.1 ARM reference configin
kvcache-ai/firecrackerenablesCONFIG_IP_PNP. Either approach can bemade to work, but the required capability or fallback needs to be explicit.
Snapshot identity is larger than a version string. A downstream runtime
ID is useful provenance, but it is not by itself a complete compatibility
key. ARM restore compatibility can also depend on CPU features, GIC version,
host/KVM behavior, Firecracker snapshot format, guest kernel, and guest tools.
Restoring multiple clones also duplicates guest userspace state. Firecracker's
VMGenID helps the kernel RNG only when the ARM guest has DeviceTree VMGenID
support (upstream Linux added it in 6.10; a 6.1 guest needs a backport), and
it does not generically rotate userspace tokens, machine identity, or cached
random state.
Desired behavior
If the project chooses to pursue ARM64 server/runtime support, a possible
outcome would be a documented set of support tiers with observable acceptance
criteria:
artifacts are architecture-correct and checksummed.
complete dependency set with preflight checks and a reproducible BOM.
OverlayBD/ublk attachment, active-UART snapshot restore, repeated
envdexecution, pause/resume, and supervisor recovery.
provenance, security policy, upgrade/rebuild rules, rollback guidance, and
downloadable test evidence.
Disabling ublk may be a valid reduced profile, as #94 proposes for openEuler
kernels without
CONFIG_BLK_DEV_UBLK, but the documentation should identifywhich snapshot, on-demand-loading, and OverlayBD guarantees are then
unavailable. A build-only profile and an end-to-end runtime profile should not
share the same unqualified support label.
Proposed approach
Would maintainers be open to discussing whether ARM64 server/runtime support
belongs in AgentENV's roadmap? If so, the following questions may help define a
staged path:
would like to pursue? If so, should the initial goal be build-only, source
installation, prebuilt releases, or an end-to-end supported runtime? Which
tier would #86 or #94 satisfy if merged?
versions, CPU/GIC combinations, page sizes, cgroup mode, and ublk capability
should be supported or checked before host setup?
coordinates for Firecracker, guest kernel, tools/
envd, ublk daemon, andOverlayBD? Who would own downstream patches, upstream synchronization,
provenance, and end-of-life?
should a userspace
ip=fallback be supported, and how should ARM snapshotclones handle VMGenID, entropy,
boot_id, machine identity, andapplication-level unique state before user code runs?
the compatibility key? How should placement avoid incompatible hosts, and
should legacy or mismatched snapshots fail closed, warn, or use an explicitly
tested compatibility map?
target be GNU, musl, or both? Should production startup fail closed when a
matching default-deny seccomp policy is absent? What checksum, signing, and
SBOM model should release artifacts use?
where could KVM + ublk ARM tests run, and which results should block release?
Suggested coverage includes clean install, real OverlayBD/ublk I/O, template
build, active-UART restore, repeated
envdRPCs, pause/resume,clone-uniqueness checks, snapshot mismatch, missing seccomp policy, and a
clearly defined latency benchmark.
If maintainers consider ARM64 support in scope and indicate an initial tier,
the public reference can be split into focused contributions. We can provide
the tested case, help validate #86/#94 on DGX Spark, and implement or review
agreed pieces; this issue does not ask for one large downstream merge.
Compatibility and operational impact
API/config changes:
Firecracker runtime ID.
Snapshot or storage format changes:
policy.
New host/runtime requirements:
Upgrade and rollback considerations:
template rebuilds.
but need not be ARM-specific acceptance criteria for an initial source-build
tier.
Alternatives considered
review of one source-build implementation and could be misread as validation
of that PR.
release scope does not define runtime compatibility.
the remaining AgentENV question is dependency selection and regression
ownership.
portable support tiers, snapshot placement, clone uniqueness, or lifecycle
policy.
Non-goals
kernels, page sizes, or distributions.
resume samples as a cross-architecture or production tail-latency benchmark.
methodology behind the README numbers; it reports the exact code boundary
and commit used for comparison.
set, release scripts, or runtime-ID implementation unchanged.
ARM source-build contribution.
Contribution
I can help test or review it.
Pre-submission checklist
adjacent work, but none currently defines the possible end-to-end ARM64
runtime support path discussed here.
technology.
particular implementation.
@yingdi-shan commented on GitHub (Aug 1, 2026):
Thank you, this analysis and the arm64 benchmark data are very valuable!
@yingdi-shan commented on GitHub (Aug 8, 2026):
Fixed in PR #86.