Skip to content

[NIXL][Metrics] Fix NIXL buckets#6

Merged
NickLucche merged 1 commit intoNickLucche:nixl-prometheusfrom
markmc:nixl-prometheus-buckets
Oct 24, 2025
Merged

[NIXL][Metrics] Fix NIXL buckets#6
NickLucche merged 1 commit intoNickLucche:nixl-prometheusfrom
markmc:nixl-prometheus-buckets

Conversation

@markmc
Copy link

@markmc markmc commented Oct 24, 2025

As per comments in vllm-project#26811

It's post times that need the smaller bucket size, not transfer duration.

Uniform 2kb to 16gb range:

>>> def human_size(bytes, units=[' bytes','KB','MB','GB','TB', 'PB', 'EB']):
...     """ Returns a human readable string representation of bytes """
...     return str(bytes) + units[0] if bytes < 1024 else human_size(bytes>>10, units[1:])
...
>>> [human_size(2**(10+i)) for i in range(1, 25, 2)]
['2KB', '8KB', '32KB', '128KB', '512KB', '2MB', '8MB', '32MB', '128MB', '512MB', '2GB', '8GB']

It's post times that need the smaller bucket size, not
transfer duration.

Uniform 2kb to 16gb range:

```
>>> def human_size(bytes, units=[' bytes','KB','MB','GB','TB', 'PB', 'EB']):
...     """ Returns a human readable string representation of bytes """
...     return str(bytes) + units[0] if bytes < 1024 else human_size(bytes>>10, units[1:])
...
>>> [human_size(2**(10+i)) for i in range(1, 25, 2)]
['2KB', '8KB', '32KB', '128KB', '512KB', '2MB', '8MB', '32MB', '128MB', '512MB', '2GB', '8GB']
```

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
@markmc markmc requested a review from NickLucche as a code owner October 24, 2025 14:37
Copy link
Owner

@NickLucche NickLucche left a comment

Choose a reason for hiding this comment

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

thank you!

@NickLucche NickLucche merged commit 2c5e5bc into NickLucche:nixl-prometheus Oct 24, 2025
4 checks passed
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.

2 participants