Skip to content

perf(tfork): add opt-in residual latency probes- #11 - #7

Open
yiying-zhang wants to merge 59 commits into
mainfrom
perf/tfork-residual-probes
Open

perf(tfork): add opt-in residual latency probes- #11#7
yiying-zhang wants to merge 59 commits into
mainfrom
perf/tfork-residual-probes

Conversation

@yiying-zhang

Copy link
Copy Markdown
Collaborator

Summary

  • add aggregate CRIU_TFORK_PROFILE=1 Phase A task-loop buckets;
  • mark Phase B parent setup, restore-child phases, and every restore futex wait;
  • keep normal behavior and log volume unchanged when profiling is disabled;
  • allow the Phase B benchmark to pass extra clone arguments.

Motivation

Earlier profiling left 168.5 ms of the 100-process Phase A loop unassigned and
266–306 ms of Phase B after polling was replaced with futex wakeups. These
probes distinguish real work from synchronization slack without a per-task log
line.

Results

At 100 processes, the first-fork medians assign the 509.805 ms task loop mainly
to core/thread serialization (93.683 ms), page handoff (86.470 ms), parasite
infection (83.064 ms), VMA collection (73.169 ms), stop/thread/cure (40.064
ms), and MM/FS serialization (38.477 ms).

Phase B futex waits total 237.891 ms. The dominant waits are 190.512 ms for the
100-task restore tree and 44.549 ms for namespace preparation. This is useful
work/dependency time, not residual 100 ms polling quantization.

An interleaved overhead check found no measurable Phase A penalty (584.336 ms
enabled versus 588.673 ms disabled; -0.7% noise).

Validation

  • remote Linux build passed;
  • ten independently prepared 100-process sources completed successfully;
  • enabled/disabled overhead A/B completed successfully;
  • exact cleanup left no owned residual resources.

yiying-zhang and others added 30 commits July 10, 2026 23:44
Stabilize live tfork source freezing
yiying-zhang and others added 29 commits July 17, 2026 22:25
…-main

Stabilize single-copy tfork clone path
Rewrite tclone setup for Gensee Crate
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.

2 participants