Skip to content

Commit 67a43b3

Browse files
committed
Decrease MAX_VERIFIERS
In current structure, multithreading helps little. Because the verification step should be sequential.
1 parent 4c48d0e commit 67a43b3

File tree

1 file changed

+2
-2
lines changed
  • core/src/verification/queue

1 file changed

+2
-2
lines changed

core/src/verification/queue/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const MIN_MEM_LIMIT: usize = 16384;
3737
const MIN_QUEUE_LIMIT: usize = 512;
3838

3939
// maximum possible number of verification threads.
40-
const MAX_VERIFIERS: usize = 8;
40+
const MAX_VERIFIERS: usize = 2;
4141

4242
/// Type alias for block queue convenience.
4343
pub type BlockQueue = VerificationQueue<kind::Blocks>;
@@ -150,7 +150,7 @@ impl<K: Kind> VerificationQueue<K> {
150150
let empty = Arc::new(SCondvar::new());
151151
let more_to_verify = Arc::new(SCondvar::new());
152152

153-
let num_verifiers = cmp::min(num_cpus::get(), MAX_VERIFIERS);
153+
let num_verifiers = MAX_VERIFIERS;
154154
let mut verifier_handles = Vec::with_capacity(num_verifiers);
155155

156156
for i in 0..num_verifiers {

0 commit comments

Comments
 (0)