Reduce record payload memory for large prompts#8
Merged
cquil11 merged 2 commits intoJun 15, 2026
Merged
Conversation
Try out this PRQuick install: pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@3bcd555dfedc18899c8c1465c3ad8d3c82307192Recommended 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@3bcd555dfedc18899c8c1465c3ad8d3c82307192Last updated for commit: |
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
Validation
Note
Medium Risk
Opt-in strip mode changes which record metrics and exports are available; the DAG fast-path behavior change affects memory and routing for PAYLOAD_BYTES subagent runs but aligns with verbatim replay semantics.
Overview
Adds
AIPERF_RECORD_STRIP_PAYLOAD_BYTES(default off). When enabled,InferenceClientsetsRecordContext.payload_bytestoNoneafter dispatch while leavingRequestInfo.payload_bytesintact, shrinking ZMQ/record-pipeline memory for huge prompts at the cost of client-side input tokenization, body-derived media counts, and raw request export.In
PAYLOAD_BYTESmmap mode,Worker._process_creditno longer forces DAG children (agent_depth > 0) through the session path; every credit that can load pre-encoded bytes uses the fast path, avoiding duplicated full-history payloads in worker memory.Unit tests cover stripping and updated fast-path routing for subagents.
Reviewed by Cursor Bugbot for commit 3bcd555. Bugbot is set up for automated code reviews on this repo. Configure here.