Repository navigation
Conversation
CUPTI CONCURRENT_KERNEL activity together with PC sampling enabled on a context made vLLM and SGLang lose 50-75% of their throughput for about 15 minutes after PC sampling first started, and several percent after that. CUPTI's activity worker thread saturated a core and stopped delivering activity buffers. Disabling PC sampling between windows and skipping the synchronize inside the gap did not change it. With activity off from the moment a context is set up for PC sampling until it is finalized, throughput stayed within about 1% of PC sampling off (same build, both arms, agent window 30 ms / gap 10 s). So the first context set up for PC sampling turns CONCURRENT_KERNEL activity off for the process and the last one finalized turns it back on. While it is off there are no kernel_executed, kernel_stats or activity_batch events from the process.
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.
When CUPTI CONCURRENT_KERNEL activity runs while a context has PC sampling enabled, vLLM and SGLang lose most of their throughput. This PR turns kernel activity off for the process from the moment the first context is set up for PC sampling until the last one is finalized.
Measured
CoreWeave 8x RTX PRO 6000 (driver 580), Qwen3-8B,
vllm bench serve. Both arms ran the same experiment build at agent window 30 ms / gap 10 s, on freshly started servers. Throughput in tok/s at C=8, one 4-minute rep per column:C=64 shows the same pattern.
cuCtxSynchronize(Check the PC sampling gap before synchronizing the context #55).Trade-off
While a process has PC sampling enabled it emits no
kernel_executed,kernel_statsorcuda_activity_batch. Without a disable between windows, that is from the first window on. The plan is to time sampled launches with CUDA events instead, which doesn't need CUPTI activity at all (draft PR to follow).Not yet verified
cuptiActivityDisableis process-wide and is called from the launch callback that sets the context up. It isn't stress-tested with several contexts or alongside concurrentcompleteBuffercalls.test-agent-ctlcould assert them.