Adjust default number of threads for JobQueue:

The existing calculation would limit the maximum number of threads
that would be created by default to at most 6; this may have been
reasonable a few years ago, but given both the load on the network
as of today and the increase in the number of CPU cores, the value
should be revisited.

This commit, if merged, changes the default calculation for nodes
that are configured as `large` or `huge` to allow for up to twelve
threads.
This commit is contained in:
Nik Bougalis
2021-11-09 02:04:34 -08:00
parent eaff0d30fb
commit eb6b79bed7
8 changed files with 90 additions and 57 deletions

View File

@@ -202,7 +202,9 @@ public:
std::chrono::seconds AMENDMENT_MAJORITY_TIME = defaultAmendmentMajorityTime;
// Thread pool configuration
std::size_t WORKERS = 0;
int WORKERS = 0;
// Can only be set in code, specifically unit tests
bool FORCE_MULTI_THREAD = false;
// Normally the sweep timer is automatically deduced based on the node
// size, but we allow admins to explicitly set it in the config.