mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
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:
@@ -637,7 +637,14 @@ Config::loadFromString(std::string const& fileContents)
|
||||
}
|
||||
|
||||
if (getSingleSection(secConfig, SECTION_WORKERS, strTemp, j_))
|
||||
WORKERS = beast::lexicalCastThrow<std::size_t>(strTemp);
|
||||
{
|
||||
WORKERS = beast::lexicalCastThrow<int>(strTemp);
|
||||
|
||||
if (WORKERS < 1 || WORKERS > 1024)
|
||||
Throw<std::runtime_error>(
|
||||
"Invalid " SECTION_WORKERS
|
||||
": must be between 1 and 1024 inclusive.");
|
||||
}
|
||||
|
||||
if (getSingleSection(secConfig, SECTION_COMPRESSION, strTemp, j_))
|
||||
COMPRESSION = beast::lexicalCastThrow<bool>(strTemp);
|
||||
|
||||
Reference in New Issue
Block a user