mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-25 13:42:54 -05:00
This commit is contained in:
@@ -263,6 +263,11 @@ public:
|
||||
xmrig::Miner::Miner(Controller *controller)
|
||||
: d_ptr(new MinerPrivate(controller))
|
||||
{
|
||||
const int priority = controller->config()->cpu().priority();
|
||||
if (priority >= 0) {
|
||||
Platform::setThreadPriority(std::min(priority + 1, 5));
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
Rx::init(this);
|
||||
# endif
|
||||
|
||||
@@ -147,7 +147,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
||||
|
||||
case IConfig::MemoryPoolKey: /* --cpu-memory-pool */
|
||||
return set(doc, kCpu, "memory-pool", static_cast<int64_t>(strtol(arg, nullptr, 10)));
|
||||
break;
|
||||
|
||||
case IConfig::YieldKey: /* --cpu-no-yield */
|
||||
return set(doc, kCpu, "yield", false);
|
||||
|
||||
# ifdef XMRIG_FEATURE_ASM
|
||||
case IConfig::AssemblyKey: /* --asm */
|
||||
|
||||
@@ -50,6 +50,7 @@ R"===(
|
||||
"colors": true,
|
||||
"randomx": {
|
||||
"init": -1,
|
||||
"mode": "auto",
|
||||
"numa": true
|
||||
},
|
||||
"cpu": {
|
||||
@@ -58,6 +59,7 @@ R"===(
|
||||
"hw-aes": null,
|
||||
"priority": null,
|
||||
"memory-pool": false,
|
||||
"yield": true,
|
||||
"max-threads-hint": 100,
|
||||
"asm": true,
|
||||
"argon2-impl": null,
|
||||
|
||||
@@ -88,6 +88,7 @@ static const option options[] = {
|
||||
{ "max-cpu-usage", 1, nullptr, IConfig::CPUMaxThreadsKey },
|
||||
{ "cpu-max-threads-hint", 1, nullptr, IConfig::CPUMaxThreadsKey },
|
||||
{ "cpu-memory-pool", 1, nullptr, IConfig::MemoryPoolKey },
|
||||
{ "cpu-no-yield", 0, nullptr, IConfig::YieldKey },
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
{ "tls", 0, nullptr, IConfig::TlsKey },
|
||||
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },
|
||||
|
||||
@@ -80,6 +80,7 @@ static inline const std::string &usage()
|
||||
u += " --cpu-priority set process priority (0 idle, 2 normal to 5 highest)\n";
|
||||
u += " --cpu-max-threads-hint=N maximum CPU threads count (in percentage) hint for autoconfig\n";
|
||||
u += " --cpu-memory-pool=N number of 2 MB pages for persistent memory pool, -1 (auto), 0 (disable)\n";
|
||||
u += " --cpu-no-yield prefer maximum hashrate rather than system response/stability\n";
|
||||
u += " --no-huge-pages disable huge pages support\n";
|
||||
u += " --asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user