Skip to content

Commit eb51930

Browse files
JasonLi1909peterxcli
authored andcommitted
[train] Ray Train Metrics Doc Page (ray-project#58235)
This PR: - adds a new page to the Ray Train docs called "Monitor your Application" that lists and describes the Prometheus metrics emitted by Ray Train - Updates the Ray Core system metrics docs to include some missing metrics Link to example build: https://anyscale-ray--58235.com.readthedocs.build/en/58235/train/user-guides/monitor-your-application.html Preview Screenshot: <img width="1630" height="662" alt="Screenshot 2025-10-29 at 2 46 07 PM" src="https://github.com/user-attachments/assets/9ca7ea6d-522b-4033-909a-2ee626960e8a" /> --------- Signed-off-by: JasonLi1909 <jasli1909@gmail.com> Signed-off-by: peterxcli <peterxcli@gmail.com>
1 parent 4d7df2f commit eb51930

File tree

3 files changed

+68
-16
lines changed

3 files changed

+68
-16
lines changed

doc/source/ray-observability/reference/system-metrics.rst

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Ray exports a number of system metrics, which provide introspection into the sta
2121
- `Name`, `State`
2222
- Current number of actors in each state described in `rpc::ActorTableData::ActorState <https://github.com/ray-project/ray/blob/b3799a53dcabd8d1a4d20f22faa98e781b0059c7/src/ray/protobuf/gcs.proto#L79>`. ALIVE has two sub-states: ALIVE_IDLE, and ALIVE_RUNNING_TASKS. An actor is considered ALIVE_IDLE if it is not running any tasks.
2323
* - `ray_resources`
24-
- `Name`, `State`, `InstanceId`
24+
- `Name`, `State`, `instance`
2525
- Logical resource usage for each node of the cluster. Each resource has some quantity that is in either `USED or AVAILABLE state <https://github.com/ray-project/ray/blob/9eab65ed77bdd9907989ecc3e241045954a09cb4/src/ray/stats/metric_defs.cc#L188>`_. The Name label defines the resource name (e.g., CPU, GPU).
2626
* - `ray_object_store_memory`
27-
- `Location`, `ObjectState`, `InstanceId`
27+
- `Location`, `ObjectState`, `instance`
2828
- Object store memory usage in bytes, `broken down <https://github.com/ray-project/ray/blob/9eab65ed77bdd9907989ecc3e241045954a09cb4/src/ray/stats/metric_defs.cc#L231>`_ by logical Location (SPILLED, MMAP_DISK, MMAP_SHM, and WORKER_HEAP). Definitions are as follows. SPILLED--Objects that have spilled to disk or a remote Storage solution (for example, AWS S3). The default is the disk. MMAP_DISK--Objects stored on a memory-mapped page on disk. This mode very slow and only happens under severe memory pressure. MMAP_SHM--Objects store on a memory-mapped page in Shared Memory. This mode is the default, in the absence of memory pressure. WORKER_HEAP--Objects, usually smaller, stored in the memory of the Ray Worker process itself. Small objects are stored in the worker heap.
2929
* - `ray_placement_groups`
3030
- `State`
@@ -33,46 +33,67 @@ Ray exports a number of system metrics, which provide introspection into the sta
3333
- `Type`, `Name`
3434
- The number of tasks and actors killed by the Ray Out of Memory killer (https://docs.ray.io/en/master/ray-core/scheduling/ray-oom-prevention.html) broken down by types (whether it is tasks or actors) and names (name of tasks and actors).
3535
* - `ray_node_cpu_utilization`
36-
- `InstanceId`
36+
- `instance`
3737
- The CPU utilization per node as a percentage quantity (0..100). This should be scaled by the number of cores per node to convert the units into cores.
3838
* - `ray_node_cpu_count`
39-
- `InstanceId`
39+
- `instance`
4040
- The number of CPU cores per node.
4141
* - `ray_node_gpus_utilization`
42-
- `InstanceId`, `GpuDeviceName`, `GpuIndex`
42+
- `instance`, `GpuDeviceName`, `GpuIndex`
4343
- The GPU utilization per GPU as a percentage quantity (0..NGPU*100). `GpuDeviceName` is a name of a GPU device (e.g., NVIDIA A10G) and `GpuIndex` is the index of the GPU.
4444
* - `ray_node_disk_usage`
45-
- `InstanceId`
45+
- `instance`
4646
- The amount of disk space used per node, in bytes.
4747
* - `ray_node_disk_free`
48-
- `InstanceId`
48+
- `instance`
4949
- The amount of disk space available per node, in bytes.
50+
* - `ray_node_disk_write_iops`
51+
- `instance`, `node_type`
52+
- The disk write operations per second per node.
5053
* - `ray_node_disk_io_write_speed`
51-
- `InstanceId`
54+
- `instance`
5255
- The disk write throughput per node, in bytes per second.
56+
* - `ray_node_disk_read_iops`
57+
- `instance`, `node_type`
58+
- The disk read operations per second per node.
5359
* - `ray_node_disk_io_read_speed`
54-
- `InstanceId`
60+
- `instance`
5561
- The disk read throughput per node, in bytes per second.
62+
* - `ray_node_mem_available`
63+
- `instance`, `node_type`
64+
- The amount of physical memory available per node, in bytes.
65+
* - `ray_node_mem_shared_bytes`
66+
- `instance`, `node_type`
67+
- The amount of shared memory per node, in bytes.
5668
* - `ray_node_mem_used`
57-
- `InstanceId`
69+
- `instance`
5870
- The amount of physical memory used per node, in bytes.
5971
* - `ray_node_mem_total`
60-
- `InstanceId`
72+
- `instance`
6173
- The amount of physical memory available per node, in bytes.
6274
* - `ray_component_uss_mb`
63-
- `Component`, `InstanceId`
75+
- `Component`, `instance`
6476
- The measured unique set size in megabytes, broken down by logical Ray component. Ray components consist of system components (e.g., raylet, gcs, dashboard, or agent) and the method names of running tasks/actors.
6577
* - `ray_component_cpu_percentage`
66-
- `Component`, `InstanceId`
78+
- `Component`, `instance`
6779
- The measured CPU percentage, broken down by logical Ray component. Ray components consist of system components (e.g., raylet, gcs, dashboard, or agent) and the method names of running tasks/actors.
80+
* - `ray_node_gram_available`
81+
- `instance`, `node_type`, `GpuIndex`, `GpuDeviceName`
82+
- The amount of GPU memory available per GPU, in megabytes.
6883
* - `ray_node_gram_used`
69-
- `InstanceId`, `GpuDeviceName`, `GpuIndex`
84+
- `instance`, `GpuDeviceName`, `GpuIndex`
7085
- The amount of GPU memory used per GPU, in bytes.
86+
* - `ray_node_network_received`
87+
- `instance`, `node_type`
88+
- The total network traffic received per node, in bytes.
89+
* - `ray_node_network_sent`
90+
- `instance`, `node_type`
91+
- The total network traffic sent per node, in bytes.
7192
* - `ray_node_network_receive_speed`
72-
- `InstanceId`
93+
- `instance`
7394
- The network receive throughput per node, in bytes per second.
7495
* - `ray_node_network_send_speed`
75-
- `InstanceId`
96+
- `instance`
7697
- The network send throughput per node, in bytes per second.
7798
* - `ray_cluster_active_nodes`
7899
- `node_type`

doc/source/train/user-guides.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ Ray Train User Guides
1616
user-guides/experiment-tracking
1717
user-guides/results
1818
user-guides/fault-tolerance
19+
user-guides/monitor-your-application
1920
user-guides/reproducibility
2021
Hyperparameter Optimization <user-guides/hyperparameter-optimization>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. _train-metrics:
2+
3+
Ray Train Metrics
4+
-----------------
5+
Ray Train exports Prometheus metrics including the Ray Train controller state, worker group start times, checkpointing times and more. You can use these metrics to monitor Ray Train runs.
6+
The Ray dashboard displays these metrics in the Ray Train Grafana Dashboard. See :ref:`Ray Dashboard documentation<observability-getting-started>` for more information.
7+
8+
The Ray Train dashboard also displays a subset of Ray Core metrics that are useful for monitoring training but are not listed in the table below.
9+
For more information about these metrics, see the :ref:`System Metrics documentation<system-metrics>`.
10+
11+
The following table lists the Prometheus metrics emitted by Ray Train:
12+
13+
.. list-table:: Train Metrics
14+
:header-rows: 1
15+
16+
* - Prometheus Metric
17+
- Labels
18+
- Description
19+
* - `ray_train_controller_state`
20+
- `ray_train_run_name`, `ray_train_run_id`, `ray_train_controller_state`
21+
- Current state of the Ray Train controller.
22+
* - `ray_train_worker_group_start_total_time_s`
23+
- `ray_train_run_name`, `ray_train_run_id`
24+
- Total time taken to start the worker group.
25+
* - `ray_train_worker_group_shutdown_total_time_s`
26+
- `ray_train_run_name`, `ray_train_run_id`
27+
- Total time taken to shut down the worker group.
28+
* - `ray_train_report_total_blocked_time_s`
29+
- `ray_train_run_name`, `ray_train_run_id`, `ray_train_worker_world_rank`, `ray_train_worker_actor_id`
30+
- Cumulative time in seconds to report a checkpoint to storage.

0 commit comments

Comments
 (0)