perf: optimize block batch size from 500 to 50 blocks per message

Achieves significant memory reduction with equivalent network
performance. The reduced batch size prevents memory pressure
while preserving transfer efficiency, improving overall system
resource utilization.

Part of https://github.com/codex-storage/nim-codex/issues/974
This commit is contained in:
Chrysostomos Nanakos 2025-09-24 15:56:37 +03:00
parent b9fe7dce58
commit 9af510316a
No known key found for this signature in database

View File

@ -73,9 +73,9 @@ declareCounter(
const
DefaultMaxPeersPerRequest* = 10
# The default max message length of nim-libp2p is 100 megabytes, meaning we can
# in principle fit up to 1600 64k blocks per message, so 500 is well under
# in principle fit up to 1600 64k blocks per message, so 50 is well under
# that number.
DefaultMaxBlocksPerMessage = 500
DefaultMaxBlocksPerMessage = 50
DefaultTaskQueueSize = 100
DefaultConcurrentTasks = 10
# Don't do more than one discovery request per `DiscoveryRateLimit` seconds.