Skip to content

Fix image pull scenario P50/P90/P99 percentile metrics returning 'no samples' - #1036

Merged
Jasmine Tang (jasminetMSFT) merged 3 commits into
mainfrom
jasminet/fix-p50-nan-filter
Jan 28, 2026
Merged

Jasmine Tang (jasminetMSFT) merged 3 commits into
mainfrom
jasminet/fix-p50-nan-filter

Conversation

@jasminetMSFT

Copy link
Copy Markdown
Contributor

Problem

The containerd image pull throughput percentile metrics (P50/P90/P99) intermittently return "no samples" errors during CRI benchmark tests.

Root Cause

When nodes have cached images, rate(containerd_cri_image_pulling_throughput_count) equals 0, causing a divide-by-zero that produces NaN. The quantile() function silently drops NaN values, and if too many nodes have NaN, the query fails with "no samples".

Fix

Add filter and (rate(_count) > 0) to exclude nodes with no active pulls from the percentile calculation:

# Before
quantile(0.5, sum/count)

# After  
quantile(0.5, (sum/count) and (rate(_count) > 0))

Testing
pipeline

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes intermittent "no samples" errors in containerd image pull throughput percentile metrics (P50/P90/P99) during CRI benchmark tests. The root cause is that nodes with cached images produce zero image pull rates, causing divide-by-zero NaN values that break the percentile calculations.

Changes:

  • Added filter and (rate(_count) > 0) to P50, P90, and P99 percentile queries to exclude nodes with no active image pulls
  • Updated comment to clarify that percentiles are filtered to exclude nodes with no pulls

@jasminetMSFT
Jasmine Tang (jasminetMSFT) merged commit 3d5e04b into main Jan 28, 2026
9 checks passed
@jasminetMSFT
Jasmine Tang (jasminetMSFT) deleted the jasminet/fix-p50-nan-filter branch January 28, 2026 04:08
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.

3 participants