From b6792d85d2082d88112319912d3a9cdf328a3efa Mon Sep 17 00:00:00 2001 From: Pawan Dhananjay Date: Wed, 27 Aug 2025 20:31:31 -0700 Subject: [PATCH] Reduce backfill batch buffer size (#7958) N/A Currently, backfill is allowed to create upto 20 pending batches which is unnecessarily high imo. Forward sync also allows a max of 5 batches to be buffered at a time. This PR reduces the batch size to match with forward sync. Having high number of batches is a little annoying with peerdas because we try to create and send 20 requests (even though we are processing them in a rate limited manner). Requests with peerdas is a lot more heavy as we distribute requests across multiple peers leading to lot of requests that may keep getting retried. This could take resources away from processing at head. --- beacon_node/network/src/sync/backfill_sync/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/network/src/sync/backfill_sync/mod.rs b/beacon_node/network/src/sync/backfill_sync/mod.rs index ae9ac2e770..2f5eb3f689 100644 --- a/beacon_node/network/src/sync/backfill_sync/mod.rs +++ b/beacon_node/network/src/sync/backfill_sync/mod.rs @@ -40,7 +40,7 @@ use types::{ColumnIndex, Epoch, EthSpec}; pub const BACKFILL_EPOCHS_PER_BATCH: u64 = 1; /// The maximum number of batches to queue before requesting more. -const BACKFILL_BATCH_BUFFER_SIZE: u8 = 20; +const BACKFILL_BATCH_BUFFER_SIZE: u8 = 5; /// The number of times to retry a batch before it is considered failed. const MAX_BATCH_DOWNLOAD_ATTEMPTS: u8 = 10;