Improve automatic tuning of thread pool:

The job queue can automatically tune the number of threads that
it creates based on the number of processors or processor cores
that are available.

The existing tuning was very conservative, limiting the maximum
number of threads to only 6.

Adjust the new algorithm to allow a larger number of threads and
allow server administrators to override the value in the config
file.
This commit is contained in:
Mark Travis
2017-06-08 10:00:29 -07:00
committed by Nik Bougalis
parent cb91d56d07
commit 68b8ffdb63
7 changed files with 34 additions and 7 deletions

View File

@@ -413,6 +413,9 @@ void Config::loadFromString (std::string const& fileContents)
if (getSingleSection (secConfig, SECTION_DEBUG_LOGFILE, strTemp, j_))
DEBUG_LOGFILE = strTemp;
if (getSingleSection (secConfig, SECTION_WORKERS, strTemp, j_))
WORKERS = beast::lexicalCastThrow <std::size_t> (strTemp);
// Do not load trusted validator configuration for standalone mode
if (! RUN_STANDALONE)
{