From f8154c65c5a9128062c4605a02f958ce8c5ff8aa Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 24 Nov 2020 16:39:47 -0800 Subject: [PATCH] discovery/gossiper: increase validation barrier size to 1000 This allows for a 1000 different validation operations to proceed concurrently. Now that we are batching operations at the db level, the average number of outstanding requests will be higher since the commit latency has increased. To compensate, we allow for more outstanding requests to keep the gossiper busy while batches are constructed. --- discovery/gossiper.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/discovery/gossiper.go b/discovery/gossiper.go index 6bbdce30..97f4808a 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -4,7 +4,6 @@ import ( "bytes" "errors" "fmt" - "runtime" "sync" "time" @@ -904,9 +903,7 @@ func (d *AuthenticatedGossiper) networkHandler() { // We'll use this validation to ensure that we process jobs in their // dependency order during parallel validation. - validationBarrier := routing.NewValidationBarrier( - runtime.NumCPU()*4, d.quit, - ) + validationBarrier := routing.NewValidationBarrier(1000, d.quit) for { select {