From da3eae20f0835ffb2c07b6b7d838417070377443 Mon Sep 17 00:00:00 2001 From: dsc Date: Tue, 29 Jan 2019 16:51:54 +0100 Subject: Dynamic monerod --max-concurrency, max 6 --- src/daemon/DaemonManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/daemon') diff --git a/src/daemon/DaemonManager.cpp b/src/daemon/DaemonManager.cpp index 79db8cff..09507a4a 100644 --- a/src/daemon/DaemonManager.cpp +++ b/src/daemon/DaemonManager.cpp @@ -1,5 +1,6 @@ #include "DaemonManager.h" #include +#include #include #include #include @@ -72,7 +73,10 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const arguments << "--check-updates" << "disabled"; + // --max-concurrency based on threads available. max: 6 + int32_t concurrency = qBound(1, QThread::idealThreadCount() / 2, 6); + arguments << "--max-concurrency" << QString::number(concurrency); qDebug() << "starting monerod " + m_monerod; qDebug() << "With command line arguments " << arguments; -- cgit v1.2.3