Skip to content

AI Infrastructure

Ray Object Spilling and the References That Keep Data Live

A lower resident-object-store reading does not establish that a Ray application released its data. An object can remain live through another worker, a pending task or a reference captured inside another object while its payload is spilled to storage. Establish which holders remain separately from where the bytes reside. An active zero-copy borrower adds a different constraint: it can keep the backing buffer in memory after the local ObjectRef disappears.

Technical contentPublished Updated

01

Identify the object, its holders and its data location

Ray's ObjectRef identifies a remote object without containing its value. The object data is immutable and can be cached on one or several nodes, independently of which process holds the reference. This makes object identity, holder location and payload location separate parts of an account.

This explanation uses the historical Ray 2.49.0 documentation tag, checked October 21, 2026. It addresses interpretation of supplied lifecycle evidence rather than a configuration or cleanup procedure. Other releases require their own applicable documentation.

For a report saying that data was released, first establish the claimed change: fewer application holders, less payload resident in a particular object store, or less occupied filesystem space. Those are different observations. A change in one leaves the others to be established.

References: [R3]

02

Follow the reference beyond the driver's variable

Ray's distributed accounting includes local ObjectRefs, pending-task arguments and references serialized inside other objects. The driver losing its own reference removes one holder. It does not establish that the distributed holder population is empty.

An actor can retain an ObjectRef in its state. A live outer object can retain a reference to an inner object. Following only the driver's variables can therefore miss the relationship keeping data live elsewhere.

The distinction between holding a reference and accessing its value matters. Ray 2.49.0 resolves top-level ObjectRef arguments before task execution. A nested reference need not fetch its value unless requested. Identifying a holder consequently does not, by itself, identify an active consumer of the underlying buffer.

References: [R1] [R3]

03

Spilling changes where live payload is kept

The tagged object-spilling documentation describes objects being spilled to a directory in the local filesystem when the object store fills. It reports spilling and restoration separately. This provides a mechanism for reducing resident payload while preserving data needed by a live reference.

A lower resident count can therefore describe a location change. It cannot alone establish that an object became unneeded. Conversely, finding a surviving ObjectRef does not establish that its payload occupies RAM at the observation time. The separate case of a borrower actively holding an in-memory buffer needs its own treatment below.

References: [R2] [R1]

04

REF-28: 12 MiB leaves RAM while 20 MiB stays logically retained

Fictional example REF-28 contains two distinct immutable payload objects: A is 8 MiB and B is 12 MiB. One MiB is 1,048,576 bytes, so A contains 8,388,608 payload bytes and B contains 12,582,912. Count each payload once, with one declared copy and location per object. Exclude metadata, holder containers, worker memory, allocator overhead, spill-file framing, compression and extra replicas.

At observation R0, the driver holds A and B. A pending task also holds B's reference but has not dereferenced B. Both payloads are resident. Unique payload with declared application holders is 8 + 12 = 20 MiB, or 20,971,520 bytes. Resident payload is also 20 MiB. The additional holder of B does not create another 12 MiB payload in this account.

At R1, the driver's B reference is out of scope, but the same pending task still holds B. Stipulate that A remains resident and B has been spilled to the local filesystem. This placement is an invented observation, not a prediction of which object Ray selects or a claim that dropping the driver's reference caused the spill.

Resident payload is now 8 MiB and spilled payload is 12 MiB. Unique logically retained payload remains 8 + 12 = 20 MiB. The resident reduction is 20 - 8 = 12 MiB, while the reduction in payload with declared application holders is 20 - 20 = 0 MiB.

The owners remain alive throughout. No active zero-copy view or executing deserialized argument pins B's buffer. These premises allow the example to examine a retained reference separately from an active in-memory borrower. No Ray workload was run to produce these states.

05

R2 changes the holder population

At later observation R2, stipulate that the pending task has completed and that B has no remaining holder, borrower or captured reference anywhere in the example. The driver still holds A. Payload with declared application holders is now 8 MiB, or 8,388,608 bytes.

This is the logical change absent at R1: B's last retaining relationship is gone. Task completion alone would not establish that conclusion in a real application, because the task could have passed a reference onward. R2 explicitly stipulates that no such relationship remains.

The example assigns no resident or filesystem-space reading to R2. Its holder account supplies no cleanup deadline, filesystem allocation result or future allocation guarantee. Likewise, R1's 12 MiB spilled payload describes the stipulated data location; it is not a measurement of disk-write traffic or occupied disk blocks.

06

A zero-copy borrower can keep the buffer in RAM

Consider a separate state: a fetched NumPy result still points directly into shared object-store memory after its local ObjectRef has disappeared. The tagged memory-management example says that this result keeps the object pinned in memory.

That surviving borrower constrains the physical backing. REF-28's assumption that B is spilled cannot be carried into this different state while its active buffer pin remains. Distinguish a reference to data that may be fetched later from a live view using the in-memory bytes now.

References: [R1] [R3]

07

Evaluate the release claim at the boundary it actually covers

Suppose one fictional report summarizes R1 as 12 MiB released, while another says B remains needed. Ask the first report's owner what released measures. If it means the stipulated reduction in resident payload, the reports can agree. If it means B left the application's retained object population, the pending task contradicts that claim.

Request the Ray version, observation times, node or cluster scope, exact metric definitions and units. Then connect the relevant object identities to their holders, any active buffer borrowers, and supplied residence or spill evidence. This is a request for an interpretable account from the platform owner, not an instruction to remove live references.

Count unique objects separately from holder records. Two holders of B do not establish two distinct objects. Conversely, a real cluster may cache one object's payload on several nodes; physical copy bytes then need their own scope. REF-28's one-copy arithmetic applies only to its stated premises.

Keep point-in-time residence separate from spill or restore activity over an interval. The difference between two resident totals supplies no complete history of intervening transfers. Worker memory and object-store memory also need defined coverage before a broader host-memory claim can be assessed.

For the reader's decision, R1 establishes a stipulated relocation with continuing demand. R2 establishes an explicitly changed holder population. Accept the conclusion supported by the supplied boundary; request additional evidence when the proposal also claims reclaimed filesystem capacity or enough room for the next workload.

References: [R1] [R2] [R3]

08

A spill record leaves the checkpoint question open

Local spill storage does not by itself establish an application checkpoint or a successful recovery. Ray 2.49.0 distinguishes value data from metadata held by the object's owner, the worker that created the original ObjectRef. That owner can differ from the worker producing the value.

The tagged fault-tolerance reference excludes recovery from owner failure and gives conditions for lineage reconstruction. In particular, values created through ray.put are not reconstructable through that mechanism. Retaining a spill payload therefore supplies no general recovery guarantee.

If the requirement is retained training progress, use the related checkpoint-versus-snapshot guide to identify the application state being preserved. REF-28 establishes neither checkpoint contents nor a successful restore.

References: [R4]

09

Connect a separate equipment requirement to physical installation

The reference account helps the application and platform owners interpret their software evidence. It creates no equipment purchase or installation requirement.

If separately selected servers or storage need mounting, IT cabling, labels and physical handoff records, Leviathan's Rack-and-Stack Installation service and project inquiry below address that work. Share a nonconfidential equipment list, approved rack and endpoint plans, site authorization and required handoff. The agreed engagement defines the physical package and availability; Ray administration and workload acceptance remain with the appointed software teams.

References: [L1]

10Sources

Primary sources

  1. [R1]
    Ray 2.49.0: Memory ManagementChecked 2026-10-21. Historical tagged explanation of distributed reference categories, worker and object-store memory, and the zero-copy NumPy buffer pin. Reference retention and an active in-memory pin require different interpretations.
  2. [R2]
    Ray 2.49.0: Object SpillingChecked 2026-10-21. Historical tagged description of local-filesystem spilling and separate spill/restore reporting. Its illustrative rates and configuration examples supply no measurements or settings for another workload.
  3. [R3]
    Ray 2.49.0: ObjectsChecked 2026-10-21. Historical tagged definitions of immutable remote objects, ObjectRefs, multi-node copies, argument dereferencing and nested-reference lifetime.
  4. [R4]
    Ray 2.49.0: Object Fault ToleranceChecked 2026-10-21. Historical tagged distinction between value data and owner metadata, with owner-failure and lineage-reconstruction limits. These limits qualify recovery claims without defining an application checkpoint.
  5. [L1]
    Leviathan Systems: Rack-and-Stack and Colocation InstallationChecked 2026-10-21. Describes equipment mounting, agreed IT cabling, labels and physical records for an authorized installation package.

Contact

Does separately selected equipment need installation?

Share the equipment list, approved rack and cabling package, site and handoff needs to discuss physical installation scope and availability.