Skip to content

Make FindMissingBlobs batch size configurable#1330

Open
bvinc wants to merge 1 commit into
facebook:mainfrom
bvinc:upstream/find-missing-batch-size
Open

Make FindMissingBlobs batch size configurable#1330
bvinc wants to merge 1 commit into
facebook:mainfrom
bvinc:upstream/find-missing-batch-size

Conversation

@bvinc

@bvinc bvinc commented May 28, 2026

Copy link
Copy Markdown
Contributor

The OSS RE client batches FindMissingBlobs requests at a hard-coded limit of 100 digests per RPC. With many digests this serializes into a long chain of small round-trips: 10k digests at ~300ms RTT becomes a 30-second wall-clock pause on the FMB stage.

Expose the limit as [buck2_re_client] find_missing_blobs_batch_size (default 100, preserving existing behavior). Operators with deduped get_digests_ttl calls and a server that tolerates larger requests can raise this to collapse the FMB stage into a single round-trip.

Larger values are only safe when paired with
[buck2] deduplicate_get_digests_ttl_calls = true. Without dedup, N concurrent actions each issue an N-digest request simultaneously, producing a thundering herd against the RE backend; the existing 100 default was implicitly throttling that fanout via sequential batching.

The OSS RE client batches `FindMissingBlobs` requests at a hard-coded
limit of 100 digests per RPC. With many digests this serializes into a
long chain of small round-trips: 10k digests at ~300ms RTT becomes a
30-second wall-clock pause on the FMB stage.

Expose the limit as `[buck2_re_client] find_missing_blobs_batch_size`
(default 100, preserving existing behavior). Operators with deduped
get_digests_ttl calls and a server that tolerates larger requests can
raise this to collapse the FMB stage into a single round-trip.

Larger values are only safe when paired with
`[buck2] deduplicate_get_digests_ttl_calls = true`. Without dedup,
N concurrent actions each issue an N-digest request simultaneously,
producing a thundering herd against the RE backend; the existing 100
default was implicitly throttling that fanout via sequential batching.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 28, 2026
@meta-codesync

meta-codesync Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D106717561. (Because this pull request was imported automatically, there will not be any future comments.)

sluongng pushed a commit to sluongng/buck2 that referenced this pull request Jun 1, 2026
The OSS RE client used a fixed 100-digest limit for each
FindMissingBlobs request. High-latency backends can spend a long time in
serial round trips when an action has many digests to check.

Expose the limit as buck2_re_client.find_missing_blobs_batch_size while
preserving the 100-digest default. Clamp zero to one so an invalid value
does not create a degenerate batching path.

Original-Commit: 72aaf61
Source-PR: facebook#1330
sluongng pushed a commit to sluongng/buck2 that referenced this pull request Jun 3, 2026
The OSS RE client used a fixed 100-digest limit for each
FindMissingBlobs request. High-latency backends can spend a long time in
serial round trips when an action has many digests to check.

Expose the limit as buck2_re_client.find_missing_blobs_batch_size while
preserving the 100-digest default. Clamp zero to one so an invalid value
does not create a degenerate batching path.

Original-Commit: 72aaf61
Source-PR: facebook#1330
sluongng pushed a commit to sluongng/buck2 that referenced this pull request Jun 3, 2026
The OSS RE client used a fixed 100-digest limit for each
FindMissingBlobs request. High-latency backends can spend a long time in
serial round trips when an action has many digests to check.

Expose the limit as buck2_re_client.find_missing_blobs_batch_size while
preserving the 100-digest default. Clamp zero to one so an invalid value
does not create a degenerate batching path.

Original-Commit: 72aaf61
Source-PR: facebook#1330
sluongng pushed a commit to sluongng/buck2 that referenced this pull request Jun 11, 2026
The OSS RE client used a fixed 100-digest limit for each
FindMissingBlobs request. High-latency backends can spend a long time in
serial round trips when an action has many digests to check.

Expose the limit as buck2_re_client.find_missing_blobs_batch_size while
preserving the 100-digest default. Clamp zero to one so an invalid value
does not create a degenerate batching path.

Original-Commit: 72aaf61
Source-PR: facebook#1330
sluongng pushed a commit to sluongng/buck2 that referenced this pull request Jun 11, 2026
The OSS RE client used a fixed 100-digest limit for each
FindMissingBlobs request. High-latency backends can spend a long time in
serial round trips when an action has many digests to check.

Expose the limit as buck2_re_client.find_missing_blobs_batch_size while
preserving the 100-digest default. Clamp zero to one so an invalid value
does not create a degenerate batching path.

Original-Commit: 72aaf61
Source-PR: facebook#1330
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant