Skip to content

[python][ray] Reduce Blob request QPS with URI affinity - #9130

Closed
XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/blob-uri-affinity
Closed

[python][ray] Reduce Blob request QPS with URI affinity#9130
XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/blob-uri-affinity

Conversation

@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor

Purpose

Ray currently reads each inference batch independently. With small batches, nearby ranges from the same Blob file can land in separate tasks, so the existing range coalescing cannot combine them.

This adds an opt-in blob_uri_affinity mode to map_with_blobs that:

  • clusters descriptors by a deterministic URI hash and offset;
  • coalesces reads across bounded prefetch windows while preserving the UDF batch size;
  • keeps the existing no-shuffle path unchanged by default.

The documentation calls out the distributed-sort cost and the prefetch_bytes memory bound.

Tests

  • Related Blob, Ray, and row-id suites: 194 passed.
  • Focused real-Ray test passes on Ray 2.51 and 2.56.
  • Interleaved ranges from two Blob files with batch_size=1: read groups decrease from 4 to 2 while the UDF batch size remains 1.
  • Real local Paimon Blob read path is covered.

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