Skip to content

Commit fe28529

Browse files
authored
[core] (cgroups 22/n) Cherrypick public API doc strings. (#58064)
Cherry-pick #58059 for v2.51.0 --------- Signed-off-by: irabbani <israbbani@gmail.com>
1 parent 2f4360c commit fe28529

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

python/ray/_private/worker.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,19 +1559,18 @@ def init(
15591559
memory and cpu resources for ray system processes. To use, only cgroupv2 (not cgroupv1)
15601560
must be enabled with read and write permissions for the raylet. Cgroup memory and
15611561
cpu controllers must also be enabled.
1562-
system_reserved_cpu: The amount of cpu cores to reserve for ray system processes. Cores can be
1563-
fractional i.e. 0.5 means half a cpu core.
1564-
By default, the min of 20% and 1 core will be reserved.
1565-
Must be >= 0.5 cores and < total number of available cores.
1566-
Cannot be less than 0.5 cores.
1562+
system_reserved_cpu: The number of cpu cores to reserve for ray system processes.
1563+
Cores can be fractional i.e. 1.5 means one and a half a cpu core.
1564+
By default, the value will be atleast 1 core, and at maximum 3 cores. The default value
1565+
is calculated using the formula min(3.0, max(1.0, 0.05 * num_cores_on_the_system))
15671566
This option only works if enable_resource_isolation is True.
15681567
system_reserved_memory: The amount of memory (in bytes) to reserve for ray system processes.
1569-
By default, the min of 10% and 25GB plus object_store_memory will be reserved.
1570-
Must be >= 100MB and system_reserved_memory + object_store_bytes < total available memory.
1568+
By default, the value will be atleast 500MB, and at most 10GB. The default value is
1569+
calculated using the formula min(10GB, max(500MB, 0.10 * memory_available_on_the_system))
15711570
This option only works if enable_resource_isolation is True.
15721571
_cgroup_path: The path for the cgroup the raylet should use to enforce resource isolation.
15731572
By default, the cgroup used for resource isolation will be /sys/fs/cgroup.
1574-
The raylet must have read/write permissions to this path.
1573+
The process starting ray must have read/write permissions to this path.
15751574
Cgroup memory and cpu controllers be enabled for this cgroup.
15761575
This option only works if enable_resource_isolation is True.
15771576
_enable_object_reconstruction: If True, when an object stored in

python/ray/scripts/scripts.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -648,20 +648,20 @@ def debug(address: str, verbose: bool):
648648
"--system-reserved-cpu",
649649
required=False,
650650
type=float,
651-
help="The amount of cpu cores to reserve for ray system processes. Cores can be "
652-
"fractional i.e. 0.5 means half a cpu core. "
653-
"By default, the min of 20% and 1 core will be reserved."
654-
"Must be >= 0.5 and < total number of available cores. "
655-
"This option only works if --enable-resource-isolation is set.",
651+
help="The number of cpu cores to reserve for ray system processes. "
652+
"Cores can be fractional i.e. 1.5 means one and a half a cpu core. "
653+
"By default, the value will be atleast 1 core, and at maximum 3 cores. The default value "
654+
"is calculated using the formula min(3.0, max(1.0, 0.05 * num_cores_on_the_system)) "
655+
"This option only works if --enable_resource_isolation is set.",
656656
)
657657
@click.option(
658658
"--system-reserved-memory",
659659
required=False,
660660
type=int,
661661
help="The amount of memory (in bytes) to reserve for ray system processes. "
662-
"By default, the min of 10% and 25GB plus object_store_memory will be reserved. "
663-
"Must be >= 100MB and system-reserved-memory + object-store-bytes < total available memory "
664-
"This option only works if --enable-resource-isolation is set.",
662+
"By default, the value will be atleast 500MB, and at most 10GB. The default value is "
663+
"calculated using the formula min(10GB, max(500MB, 0.10 * memory_available_on_the_system)) "
664+
"This option only works if --enable_resource_isolation is set.",
665665
)
666666
@click.option(
667667
"--cgroup-path",
@@ -670,9 +670,9 @@ def debug(address: str, verbose: bool):
670670
type=str,
671671
help="The path for the cgroup the raylet should use to enforce resource isolation. "
672672
"By default, the cgroup used for resource isolation will be /sys/fs/cgroup. "
673-
"The raylet must have read/write permissions to this path. "
673+
"The process starting ray must have read/write permissions to this path. "
674674
"Cgroup memory and cpu controllers be enabled for this cgroup. "
675-
"This option only works if --enable-resource-isolation is set.",
675+
"This option only works if enable_resource_isolation is True.",
676676
)
677677
@add_click_logging_options
678678
@PublicAPI

0 commit comments

Comments
 (0)