From 241b72353471750efbae75665bbf3f5ee176b21f Mon Sep 17 00:00:00 2001 From: Guillaume Michel Date: Tue, 14 Oct 2025 17:10:28 +0200 Subject: [PATCH] config: increase default Provide.DHT.MaxProvideConnsPerWorker (#11016) Increase default Provide.DHT.MaxProvideConnsPerWorker value to match the DHT replication factor (16 -> 20). A similar value is used in legacy systems (with and without accelerated DHT client). --- config/provide.go | 2 +- docs/config.md | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config/provide.go b/config/provide.go index 9fc378a32..9d3f24ccb 100644 --- a/config/provide.go +++ b/config/provide.go @@ -18,7 +18,7 @@ const ( DefaultProvideDHTSweepEnabled = false DefaultProvideDHTDedicatedPeriodicWorkers = 2 DefaultProvideDHTDedicatedBurstWorkers = 1 - DefaultProvideDHTMaxProvideConnsPerWorker = 16 + DefaultProvideDHTMaxProvideConnsPerWorker = 20 DefaultProvideDHTKeystoreBatchSize = 1 << 14 // ~544 KiB per batch (1 multihash = 34 bytes) DefaultProvideDHTOfflineDelay = 2 * time.Hour ) diff --git a/docs/config.md b/docs/config.md index 7982cf7f8..46118554d 100644 --- a/docs/config.md +++ b/docs/config.md @@ -2167,7 +2167,13 @@ from that keyspace region until all provider records are assigned. This option defines how many such connections can be open concurrently by a single worker. -Default: `16` +> [!NOTE] +> Increasing this value can speed up the provide operation, at the cost of +> opening more simultaneous connections to DHT servers. A keyspace typically +> has less than 60 peers, so you may hit a performance ceiling beyond which +> increasing this value has no effect. + +Default: `20` Type: `optionalInteger` (non-negative)