shorten idle timeout

this introduces the change more gently, to avoid adverse effects - the
timeout value can subsequently be tuned based on further
experimentation.
This commit is contained in:
Jacek Sieka 2021-01-25 13:08:20 +01:00 committed by zah
parent 7d74d3bfbc
commit 8f6ce4f88d
1 changed files with 1 additions and 1 deletions

View File

@ -519,7 +519,7 @@ proc runQueueProcessingLoop*(self: ref Eth2Processor) {.async.} =
# taking up all CPU - we don't want to _completely_ stop processing blocks # taking up all CPU - we don't want to _completely_ stop processing blocks
# in this case (attestations will get dropped) - doing so also allows us # in this case (attestations will get dropped) - doing so also allows us
# to benefit from more batching / larger network reads when under load. # to benefit from more batching / larger network reads when under load.
discard await idleAsync().withTimeout(100.milliseconds) discard await idleAsync().withTimeout(10.milliseconds)
# Avoid one more `await` when there's work to do # Avoid one more `await` when there's work to do
if not (blockFut.finished or aggregateFut.finished or attestationFut.finished): if not (blockFut.finished or aggregateFut.finished or attestationFut.finished):