Too many threads can cause an I/O bottleneck.

This commit is contained in:
JoelKatz
2013-05-09 12:28:43 -07:00
parent 840795be5a
commit 7f4daf7fd7

View File

@@ -239,6 +239,8 @@ void JobQueue::setThreadCount(int c)
c = boost::thread::hardware_concurrency();
if (c < 0)
c = 2;
if (c > 4) // I/O will bottleneck
c = 4;
c += 2;
cLog(lsINFO) << "Auto-tuning to " << c << " validation/transaction/proposal threads";
}