Option "yield" enabled by default and added command line option --cpu-no-yield.

This commit is contained in:
XMRig 2019-12-04 08:50:54 +07:00
parent a556070b42
commit 901f1a7ab1
No known key found for this signature in database
GPG Key ID: 446A53638BE94409
9 changed files with 15 additions and 4 deletions

View File

@ -59,6 +59,7 @@ CPU backend:
--cpu-priority set process priority (0 idle, 2 normal to 5 highest)
--cpu-max-threads-hint=N maximum CPU threads count (in percentage) hint for autoconfig
--cpu-memory-pool=N number of 2 MB pages for persistent memory pool, -1 (auto), 0 (disable)
--cpu-no-yield prefer maximum hashrate rather than system response/stability
--no-huge-pages disable huge pages support
--asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer
--randomx-init=N threads count to initialize RandomX dataset

View File

@ -99,4 +99,7 @@ Allow override automatically detected Argon2 implementation, this option added m
Maximum CPU threads count (in percentage) hint for autoconfig. [CPU_MAX_USAGE.md](CPU_MAX_USAGE.md)
#### `memory-pool` (since v4.3.0)
Use continuous, persistent memory block for mining threads, useful for preserve huge pages allocation while algorithm swithing. Default value `false` (feature disabled) or `true` or specific count of 2 MB huge pages.
Use continuous, persistent memory block for mining threads, useful for preserve huge pages allocation while algorithm swithing. Possible values `false` (feature disabled, by default) or `true` or specific count of 2 MB huge pages.
#### `yield` (since v5.1.1)
Prefer system better system response/stability `true` (default value) or maximum hashrate `false`.

View File

@ -73,7 +73,7 @@ private:
bool m_enabled = true;
bool m_hugePages = true;
bool m_shouldSave = false;
bool m_yield = false;
bool m_yield = true;
int m_memoryPool = 0;
int m_priority = -1;
String m_argon2Impl;

View File

@ -92,6 +92,7 @@ public:
RandomXModeKey = 1029,
CPUMaxThreadsKey = 1026,
MemoryPoolKey = 1027,
YieldKey = 1030,
// xmrig amd
OclPlatformKey = 1400,

View File

@ -25,7 +25,7 @@
"hw-aes": null,
"priority": null,
"memory-pool": false,
"yield": false,
"yield": true,
"max-threads-hint": 100,
"asm": true,
"argon2-impl": null,

View File

@ -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 */

View File

@ -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,

View File

@ -86,6 +86,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 },

View File

@ -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";