Skip to content

[docs] Add a scheduling overview with defaults to the Ray Core scheduling page - #65264

Draft
dstrodtman wants to merge 2 commits into
ray-project:masterfrom
dstrodtman:doc-ray-core-scheduling-overview
Draft

[docs] Add a scheduling overview with defaults to the Ray Core scheduling page#65264
dstrodtman wants to merge 2 commits into
ray-project:masterfrom
dstrodtman:doc-ray-core-scheduling-overview

Conversation

@dstrodtman

@dstrodtman dstrodtman commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

doc/source/ray-core/scheduling/index.rst carried a standing note that the page lacked an overview of the features and configs that affect scheduling, along with their default values.

Most of those defaults are already documented, but they're spread across the resources, labels, and placement group pages, so a reader has no single place to see what Ray does before any configuration.

This PR adds a "Scheduling at a glance" section that:

  • Describes the two-step placement model: narrow to feasible nodes, then pick one.
  • Tabulates each control with its default, linking to the page that documents it rather than restating the mechanism.
  • Tabulates the three environment variables that tune the "DEFAULT" strategy.
  • Calls out that the non-zero actor scheduling default means an actor needs a node with a free CPU to start, which is a recurring source of confusion.

It removes the standing note, since this addresses it. Happy to restore it if maintainers consider the gap only partly closed.

One genuine addition: RAY_scheduler_top_k_absolute was named on the page without its value. It defaults to 1 per src/ray/common/ray_config_def.h.

Related issues

None. The work is driven by the in-file note.

Additional information

Not a duplicate

Searched open PRs against ray-project/ray for "scheduling overview" and related area keywords. Nothing open touches this page.

Testing

Every default in the new tables was verified against source, not against other docs pages:

  • The three scheduler environment variables come from src/ray/common/ray_config_def.h: scheduler_spread_threshold 0.5, scheduler_top_k_fraction 0.2, scheduler_top_k_absolute 1.
  • The actor defaults were checked in python/ray/actor.py. A bare actor takes the simple branch, giving it 0 lifetime CPU and an actor_method_cpu of 1. Because method CPU is 1, actor_placement_resources becomes the lifetime resources with CPU incremented by 1. That's what makes "1 CPU for scheduling, 0 for running" true, and it's why the constants alone read as if they say the opposite.
  • Node auto-detection and the task default come from scheduling/resources.rst; the default labels come from scheduling/labels.md.
  • Every :ref: and :doc: target in the new section was verified to exist by grepping for its label definition.

Other checks:

  • vale doc/source/ray-core/scheduling/index.rst — the added content introduces no new class of Vale error. The message-set diff against the pre-change file is empty.
  • pre-commit run on the staged file — every hook reports "no files to check".
  • A full Sphinx docs build was not run locally. Cross-reference resolution relies on CI.

Self-review findings already fixed

A critical pass before requesting review caught three problems in the first draft:

  • Data locality was described as breaking ties for tasks. The page's own "DEFAULT" section says locality takes precedence over utilization scoring, so Ray prefers the locality node regardless of how utilized it is. "Tie-breaking" understated it.
  • The gang placement row referred to bundles being scheduled independently outside a placement group, but bundles only exist inside one, so it described something that can't happen.
  • A sentence said "both defaults above are non-zero" when the two actor defaults are 1 and 0, contradicting the row directly above it.

AI assistance

AI assistance was used to draft this section. Every default stated was read out of the source tree rather than recalled. It still needs a final human review pass, which is why this is opened as a draft.

…ling page

The scheduling page carried a standing note that it lacked an overview
of the features and configs that affect scheduling, along with their
default values.

Most of these defaults are already documented, but they're spread across
the resources, labels, and placement group pages, so a reader has no
single place to see what Ray does before any configuration.

Add a "Scheduling at a glance" section that describes the two-step
placement model and tabulates each control with its default, linking to
the page that documents it rather than restating the mechanism. Also
tabulate the three environment variables that tune the "DEFAULT"
strategy.

RAY_scheduler_top_k_absolute wasn't previously documented with its
value; it defaults to 1 per src/ray/common/ray_config_def.h.

Call out that the non-zero actor scheduling default means an actor
needs a node with a free CPU to start, which is a recurring source of
confusion.

Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
Three fixes to the scheduling overview section:

Data locality was described as breaking ties for tasks. The page's own
'DEFAULT' section states that locality takes precedence over the
strategy's utilization scoring, so Ray prefers the locality node
regardless of its utilization. Tie-breaking understated it.

The gang placement row referred to bundles being scheduled
independently, but bundles only exist inside a placement group, so the
sentence described something that can't happen. It now refers to tasks
and actors.

Clarified which two actor defaults the following paragraph refers to,
rather than pointing vaguely at the table above it.

Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
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.

1 participant