From e8c545e909951c2ca586e1c659dbfca88b6a3ec6 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 24 Nov 2020 16:40:10 -0800 Subject: [PATCH] routing/router: increase validation barrier size to 1000 This allows for a 1000 different persistent 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 router busy while batches are constructed. --- routing/router.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/routing/router.go b/routing/router.go index af1e8d75..c8f228da 100644 --- a/routing/router.go +++ b/routing/router.go @@ -3,7 +3,6 @@ package routing import ( "bytes" "fmt" - "runtime" "sync" "sync/atomic" "time" @@ -914,7 +913,7 @@ func (r *ChannelRouter) networkHandler() { // We'll use this validation barrier to ensure that we process all jobs // in the proper order during parallel validation. - validationBarrier := NewValidationBarrier(runtime.NumCPU()*4, r.quit) + validationBarrier := NewValidationBarrier(1000, r.quit) for {