← Back to Pull requests

UCX: Set min delay of progress thread to 1ms #2541

Closed
unknown closed this pull request without merging on Oct 29, 2026 07:59 UTC
View on GitHub
unknown unknown commented on Oct 28, 2026 14:49 UTC
Author

What?


Set min delay of progress thread to 1ms

Fixes https://github.com/ai-dynamo/nixl/issues/2491

Why?


UCX progress thread uses WAKEUP feature, and normally should only react on UCX worker events via FDs.
However under certain circumstances wakeup does not work, so UCX backend used to have a delay timeout.
It is supposed to be at least 1ms, as stated in the comment, but due to the bug in https://github.com/ai-dynamo/nixl/pull/347 it became 0 by default - meaning progress thread keeps busy polling all the time

How?


Restore the intended behavior
That actually improved performance of progress thread
Block Size (B)      Batch Size     B/W (GB/Sec)   Avg Lat. (us)  Avg Prep (us)  P99 Prep (us)  Avg Post (us)  P99 Post (us)  Avg Tx (us)    P99 Tx (us)
----------------------------------------------------------------------------------------------------------------------------------------------------------------
4096                8              3.821288       1.1            5.9            13.0           4.4            13.0           64.1           123.0
4096                8              4.475262       0.9            2.2            6.0            3.7            12.0           54.7           76.0

Tested on DFW, TTFT improves a bit, but not very consistently.
But nice observation is that idle decode CPU use fell 58%.
<img width="1046" height="626" alt="image" src="https://github.com/user-attachments/assets/df8633a6-0dab-4681-abd6-1137174da82c" />

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

<!-- coderabbit-ai-generated:v1 -->

Summary by CodeRabbit

Bug Fixes
UCX progress-thread polling now uses a minimum 1-millisecond timeout when the configured delay is zero or negative, preventing invalid or zero-length polling intervals. Larger delays continue to follow the existing upper limit.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 247 lines (+185 / -62) across 3 files Reviewer: d4l3k Review duration: 1030m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 247 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.330
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2541"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 38.9% (MEDIUM) · Higher = larger blast radius
38.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.4% · Safe to merge
15.4%
Repository