Skip to content

[Metrics] Add device index to the GPU metrics - #33328

Merged
rkooo567 merged 10 commits into
ray-project:masterfrom
rkooo567:gpu-enhancement
Mar 22, 2023
Merged

rkooo567 merged 10 commits into
ray-project:masterfrom
rkooo567:gpu-enhancement

Conversation

@rkooo567

@rkooo567 rkooo567 commented Mar 15, 2023

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Add device index and name to the GPU metrics.

The tags will be

{ip, GpuIndex, GpuDeviceName}

Screen Shot 2023-03-16 at 9 53 10 PM

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: SangBin Cho <rkooo567@gmail.com>
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
@rkooo567
rkooo567 requested a review from a team as a code owner March 17, 2023 05:59
@rkooo567

rkooo567 commented Mar 17, 2023

Copy link
Copy Markdown
Contributor Author

Btw, any recommendation in e2e tests? In the unit test env, it is hard to test the real GPU usage because we don't have GPUs... should we add a single node release test? Or do we have the best practice testing GPU related code?

@rkooo567

rkooo567 commented Mar 17, 2023

Copy link
Copy Markdown
Contributor Author

Also, I used {{DeviceName}}.{{index}}, {{ip}}, but it looks like the legend is not that pretty. Is there other recommendation?

Nvidia A10G.0, 127.0.0.1

@scottsun94

Copy link
Copy Markdown
Contributor

RE legend, how about something like {{ip}}, gpu.{{index}}, {{DeviceName}} ?
It will look like this: 127.0.0.1, gpu.0, Nvidia A10G

There seems to be 4 scenarios:

  1. single node, singe gpu
  2. single node, multiple gpu
  3. multiple nodes, single gpu per node
  4. multiple nodes, multiple gpus per node

My considerations are:

  • for 3, 4, users need to know ip first. Though people may want to see gpu index first in 2, but 3 and 4 are probably more important
  • index itself may not be clear to users what it refers to. W&B and comet ml both use gpu.{{index}}. People should be familiar with it.
  • Lastly, device name may not be that useful and may lead to a lot of UI repetition since people probably use the same GPU device across the cluster. However, we can test it out and remove it if that's the case.

@@ -143,8 +143,8 @@ Ray exports a number of system metrics, which provide introspection into the sta
- `InstanceId`
- The number of CPU cores per node.
* - `ray_node_gpus_utilization`

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.

Thanks for updating the rst files too

"Total GPUs available on a ray node",
"percentage",
["ip", "SessionName"],
["ip", "SessionName", "GpuDeviceName", "GpuIndex"],

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.

Suggested change
["ip", "SessionName", "GpuDeviceName", "GpuIndex"],
["ip", "SessionName", "GPUDeviceName", "GPUIndex"],

Shall we capitalize in this way consistently?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am fine with that, but that will break the backward compatibility (since we documented these now... Not sure if we mentioned it is stable APIs).

I also found "ip" is not needed because we use Instance labels

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I won't address it in this PR. Maybe I will make a follow up to use the same convention everywhere if we agree backward compatibility is not a concern.

@ericl ericl added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Mar 20, 2023
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
@rkooo567 rkooo567 removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Mar 21, 2023
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
@ericl ericl added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Mar 22, 2023
@rkooo567
rkooo567 merged commit 7527d49 into ray-project:master Mar 22, 2023
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
Add device index and name to the GPU metrics.

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
Add device index and name to the GPU metrics.

Signed-off-by: elliottower <elliot@elliottower.com>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
Add device index and name to the GPU metrics.

Signed-off-by: Jack He <jackhe2345@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants