You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal: fix image_pulling_throughput to exclude cached layer bytes #13244
Background:image_pulling_throughput divides the whole image size (all layers + config) by how long the pull took. Layers that were already in the content store (i.e. cached) still get counted in this metric, so the MB/s comes out way higher than what actually went over the network.
Fully cached pulls really skew the data: they pull in ~milliseconds but still report the full image size, so the histogram picks up these huge outliers, making the whole metric unusable in a real-world setting.
This problem was actually flagged when the metric was added in #7313:
the current thoughtput is not taking already exist layers or image into account. (This means the metrics will show a quick pulling for existing images. As user always want to know which image pulling is slow, this can be fixed later.)
Most pulls hit cache at least partially in practice in a multi-tenant cluster, so the histogram ends up mostly noisy and isn't really useful for spotting slow pulls.
Describe the solution you'd like
Use the bytes actually fetched from the registry, not the declared image size.
For pulls that didn't fetch anything (fully cached) skip recording a sample.
Preserve original metric image_pulling_throughput, but deprecate it because its bucket are useless on modern hardware.
Introduce image_pulling_throughput_mibps metric
The HELP text of the Prometheus metric should say what the duration actually covers. It's the whole pull including layer extraction and unpack, not just network transfer (this is not obvious from the metric name today).
Activity
cri: exclude cached layer bytes from image_pulling_throughput
cri: exclude cached layer bytes from image_pulling_throughput
cri: exclude cached layer bytes from image_pulling_throughput
cri: exclude cached layer bytes from image_pulling_throughput
cri: exclude cached layer bytes from image_pulling_throughput
cri: exclude cached layer bytes from image_pulling_throughput
cri: exclude cached layer bytes from image_pulling_throughput