ateom-gvisor: emit actor usage records - #2194
Open
Tim Bai (baizhenyu) wants to merge 1 commit into
Open
Tim Bai (baizhenyu) wants to merge 1 commit into
Tim Bai (baizhenyu) wants to merge 1 commit into
Conversation
The gVisor ateom now samples its actors on its own timer (--usage-sample-interval, default 1m) and writes one ate.actor.usage_sampled record per actor per sample. An activation also gets an initial record when it starts and a final one after a checkpoint or terminate succeeds, in that order. GetActiveWorkloadStats serves the latest sample, so a poll reads no cgroup. Every read goes through the activation's own state, so a re-host during a read cannot mix two activations' numbers.
Tim Bai (baizhenyu)
force-pushed
the
ateom-usage-gvisor
branch
from
October 5, 2026 16:20
37cb011 to
b66ea27
Compare
Tim Bai (baizhenyu)
requested review from
Jeff Luo (JeffLuoo),
Da Huang (git286) and
Krisztian F (krisztianfekete)
October 5, 2026 20:53
Tim Bai (baizhenyu)
marked this pull request as ready for review
October 5, 2026 20:53
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.
Part of #1748, split out of #1984: the gVisor ateom emits the actor usage records, using #2005's building blocks. #1984 keeps the atelet side.
--usage-sample-interval(default 1m) and writes oneate.actor.usage_sampledrecord per actor per sample.initialwhen it starts, thenperiodic, thenfinalafter a checkpoint or terminate succeeds. The final reading is taken before the snapshot, because a Full checkpoint stops the sandbox's cgroup.GetActiveWorkloadStatsserves the latest sample, so atelet's poll reads no cgroup.Until #1984 lands, atelet still writes its own stdout usage record, so each gVisor actor has two usage records, with different messages and keys.
Tested: unit tests. The combined change was tested on ate-dev earlier, with
initial,periodic, andfinalper epoch for both checkpoint and terminate.