Skip to content

perf(agentx): make timeslice metrics opt-in for the agentx preset - #55

Closed
FrankD412 wants to merge 1 commit into
SemiAnalysisAI:masterfrom
FrankD412:fdinatale/agentx-preset-no-slices
Closed

FrankD412 wants to merge 1 commit into
SemiAnalysisAI:masterfrom
FrankD412:fdinatale/agentx-preset-no-slices

Conversation

@FrankD412

@FrankD412 FrankD412 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

The agentx preset defaults slice_duration to 1 second, so every AgentX run computes per-second request and server-metric timeslices in its final export. On long, high-concurrency runs that work dominates post-profiling time: on a 3,600-second DSV4.1-Flash 16P1D run at concurrency 13,312 (~1.46 M requests, GB300), aiperf took 1 h 38 m between the end of profiling and All results received, against 23 m with --slice-duration 3600. The server-metrics export also shrank from 1.28 GB to 1.97 MB. #53 removed timeslices from live summaries only; final exports still compute them.

InferenceX, the consumer this preset targets, reads none of the timeslice output. Its result processing uses only the run-wide server-metric stats (total, sum, max, avg), which are computed from all samples in the window and do not depend on the slice width. With either setting it produced the same result fields.

Remove slice_duration from the agentx preset so timeslicing is opt-in. Passing --slice-duration still enables it, at any width, for runs that want per-window analysis. Server-metric sampling (AIPERF_SERVER_METRICS_COLLECTION_INTERVAL) is unchanged, as is the inferencex-agentx-mvp scenario, which never set a slice duration.

Behavior change for anyone relying on the default: AgentX runs no longer write profile_export_aiperf_timeslices.{json,csv} or server-metric timeslices, and counter rate_avg/rate_min/rate_max/rate_std are no longer populated, unless --slice-duration is passed.

Companion change: SemiAnalysisAI/InferenceX#4288 adds AIPERF_SLICE_DURATION, which passes --slice-duration from a recipe to agentx profile. It is the stopgap on agentx-harness 1.0.11 and becomes the opt-in path for per-window analysis once this ships.

Measurement details

Matched srt-slurm runs on GB300, same recipe (DSV4.1-Flash FP4, Dynamo + vLLM, 16 × DEP2 prefill, 1 × DEP32 decode, concurrency 13,312, 3,600 s, tachometer off), agentx-harness 1.0.11, differing only in --slice-duration:

Preset (1 s) --slice-duration 3600
Profiling end → All results received 1 h 37 m 54 s 22 m 57 s
Total job 3:41:16 2:22:50
Request timeslices 3,525 1
server_metrics_export.json 1.28 GB 1.97 MB
profile_export.jsonl 8.97 GB 8.93 GB
Output throughput 410,433 tok/s 409,594 tok/s
ITL p50 / p99 9.45 / 10.96 ms 9.48 / 10.96 ms
AI model disclosure

Prepared with claude-opus-5-5 (Anthropic), as exposed by the Hermes runtime: investigation, implementation, tests and this description.


Note

Medium Risk
Changes default export behavior for AgentX runs; anyone depending on implicit 1s timeslices must pass --slice-duration, but core throughput/latency stats are unchanged.

Overview
AgentX preset no longer enables per-second timeslice export by default. The agentx scenario’s cli_defaults drop slice_duration: 1.0, so resolved benchmark.artifacts.slice_duration is None unless the user passes --slice-duration.

Docs now state that timeslice metrics are off unless --slice-duration is set (instead of implying 1-second slices). A parametrized unit test locks in opt-in behavior: omitted flag → None; explicit slice_duration → that value.

User-visible change: default AgentX runs skip profile_export_aiperf_timeslices and server-metric timeslice artifacts (and related rate stats) unless timeslicing is explicitly enabled—matching InferenceX’s consumption of run-wide stats only and avoiding heavy post-profiling work on long runs.

Reviewed by Cursor Bugbot for commit c8a4c62. Bugbot is set up for automated code reviews on this repo. Configure here.

The agentx preset defaulted slice_duration to 1 s, so every run computed
per-second request and server-metric timeslices in its final export. At
concurrency 13,312 over 3,600 s that took 1 h 38 m after profiling,
against 23 m with --slice-duration 3600. InferenceX reads none of the
timeslice output.

Remove the preset default; --slice-duration still enables timeslices.

Signed-off-by: Francesco Di Natale <3429989+FrankD412@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Try out this PR

Quick install:

pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@c8a4c62e1a33faa6753bc8560a29472e533eb1cd

Recommended with virtual environment (using uv):

uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@c8a4c62e1a33faa6753bc8560a29472e533eb1cd

Last updated for commit: c8a4c62 • Browse code

@FrankD412

Copy link
Copy Markdown
Collaborator Author

Closing in response to SemiAnalysisAI/InferenceX#4288 being close. We can reopen these if post processing becomes an issue again.

@FrankD412 FrankD412 closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant