mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Control transaction dispatch rate:
Do not dispatch a transaction received from a peer for
processing, if it has already been dispatched within the
past ten seconds.
Increase the number of transaction handlers that can be in
flight in the job queue and decrease the relative cost for
peers to share transaction and ledger data.
Additionally, make better use of resources by adjusting the
number of threads we initialize, by reverting commit
68b8ffdb63.
This commit is contained in:
committed by
Nikolaos D. Bougalis
parent
6dc79c23ed
commit
fbfb4bd74e
@@ -153,8 +153,7 @@ JobQueue::getJobCountGE (JobType t) const
|
||||
}
|
||||
|
||||
void
|
||||
JobQueue::setThreadCount (int c, bool const standaloneMode,
|
||||
bool const validator)
|
||||
JobQueue::setThreadCount (int c, bool const standaloneMode)
|
||||
{
|
||||
if (standaloneMode)
|
||||
{
|
||||
@@ -163,13 +162,9 @@ JobQueue::setThreadCount (int c, bool const standaloneMode,
|
||||
else if (c == 0)
|
||||
{
|
||||
c = static_cast<int>(std::thread::hardware_concurrency());
|
||||
if (validator)
|
||||
c = 2 + std::min(c, 4); // I/O will bottleneck
|
||||
else
|
||||
c *= 2; // Tested to improve stability under high RPC load.
|
||||
c = 2 + std::min(c, 4); // I/O will bottleneck
|
||||
JLOG (m_journal.info()) << "Auto-tuning to " << c <<
|
||||
" validation/transaction/proposal threads for " <<
|
||||
(validator ? "" : "non-") << "validator.";
|
||||
" validation/transaction/proposal threads.";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user