Added command line option --cpu-memory-pool.
This commit is contained in:
69
README.md
69
README.md
@ -30,54 +30,69 @@ XMRig is a high performance RandomX and CryptoNight CPU miner, with official sup
|
|||||||
## Usage
|
## Usage
|
||||||
The preferred way to configure the miner is the [JSON config file](src/config.json) as it is more flexible and human friendly. The command line interface does not cover all features, such as mining profiles for different algorithms. Important options can be changed during runtime without miner restart by editing the config file or executing API calls.
|
The preferred way to configure the miner is the [JSON config file](src/config.json) as it is more flexible and human friendly. The command line interface does not cover all features, such as mining profiles for different algorithms. Important options can be changed during runtime without miner restart by editing the config file or executing API calls.
|
||||||
|
|
||||||
### Options
|
### Command line options
|
||||||
```
|
```
|
||||||
-a, --algo=ALGO specify the algorithm to use
|
Network:
|
||||||
cn/r, cn/2, cn/1, cn/0, cn/double, cn/half, cn/fast,
|
|
||||||
cn/rwz, cn/zls, cn/xao, cn/rto, cn/gpu,
|
|
||||||
cn-lite/1,
|
|
||||||
cn-heavy/xhv, cn-heavy/tube, cn-heavy/0,
|
|
||||||
cn-pico,
|
|
||||||
rx/wow, rx/loki, rx/arq
|
|
||||||
-o, --url=URL URL of mining server
|
-o, --url=URL URL of mining server
|
||||||
-O, --userpass=U:P username:password pair for mining server
|
-a, --algo=ALGO mining algorithm https://xmrig.com/docs/algorithms
|
||||||
|
--coin=COIN specify coin instead of algorithm
|
||||||
-u, --user=USERNAME username for mining server
|
-u, --user=USERNAME username for mining server
|
||||||
-p, --pass=PASSWORD password for mining server
|
-p, --pass=PASSWORD password for mining server
|
||||||
--rig-id=ID rig identifier for pool-side statistics (needs pool support)
|
-O, --userpass=U:P username:password pair for mining server
|
||||||
-t, --threads=N number of miner threads
|
|
||||||
-v, --av=N algorithm variation, 0 auto select
|
|
||||||
-k, --keepalive send keepalived packet for prevent timeout (needs pool support)
|
-k, --keepalive send keepalived packet for prevent timeout (needs pool support)
|
||||||
--nicehash enable nicehash.com support
|
--nicehash enable nicehash.com support
|
||||||
|
--rig-id=ID rig identifier for pool-side statistics (needs pool support)
|
||||||
--tls enable SSL/TLS support (needs pool support)
|
--tls enable SSL/TLS support (needs pool support)
|
||||||
--tls-fingerprint=F pool TLS certificate fingerprint, if set enable strict certificate pinning
|
--tls-fingerprint=HEX pool TLS certificate fingerprint for strict certificate pinning
|
||||||
--daemon use daemon RPC instead of pool for solo mining
|
--daemon use daemon RPC instead of pool for solo mining
|
||||||
--daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)
|
--daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)
|
||||||
-r, --retries=N number of times to retry before switch to backup server (default: 5)
|
-r, --retries=N number of times to retry before switch to backup server (default: 5)
|
||||||
-R, --retry-pause=N time to pause between retries (default: 5)
|
-R, --retry-pause=N time to pause between retries (default: 5)
|
||||||
|
--user-agent set custom user-agent string for pool
|
||||||
|
--donate-level=N donate level, default 5%% (5 minutes in 100 minutes)
|
||||||
|
--donate-over-proxy=N control donate over xmrig-proxy feature
|
||||||
|
|
||||||
|
CPU backend:
|
||||||
|
--no-cpu disable CPU mining backend
|
||||||
|
-t, --threads=N number of CPU threads
|
||||||
|
-v, --av=N algorithm variation, 0 auto select
|
||||||
--cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1
|
--cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1
|
||||||
--cpu-priority set process priority (0 idle, 2 normal to 5 highest)
|
--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)
|
||||||
--no-huge-pages disable huge pages support
|
--no-huge-pages disable huge pages support
|
||||||
--no-color disable colored output
|
--asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer
|
||||||
--donate-level=N donate level, default 5% (5 minutes in 100 minutes)
|
--randomx-init=N threads count to initialize RandomX dataset
|
||||||
--user-agent set custom user-agent string for pool
|
--randomx-no-numa disable NUMA support for RandomX
|
||||||
-B, --background run the miner in the background
|
|
||||||
-c, --config=FILE load a JSON-format configuration file
|
API:
|
||||||
-l, --log-file=FILE log all output to a file
|
|
||||||
--asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer.
|
|
||||||
--print-time=N print hashrate report every N seconds
|
|
||||||
--api-worker-id=ID custom worker-id for API
|
--api-worker-id=ID custom worker-id for API
|
||||||
--api-id=ID custom instance ID for API
|
--api-id=ID custom instance ID for API
|
||||||
--http-enabled enable HTTP API
|
|
||||||
--http-host=HOST bind host for HTTP API (default: 127.0.0.1)
|
--http-host=HOST bind host for HTTP API (default: 127.0.0.1)
|
||||||
--http-port=N bind port for HTTP API
|
--http-port=N bind port for HTTP API
|
||||||
--http-access-token=T access token for HTTP API
|
--http-access-token=T access token for HTTP API
|
||||||
--http-no-restricted enable full remote access to HTTP API (only if access token set)
|
--http-no-restricted enable full remote access to HTTP API (only if access token set)
|
||||||
--randomx-init=N threads count to initialize RandomX dataset
|
|
||||||
--randomx-no-numa disable NUMA support for RandomX
|
OpenCL backend:
|
||||||
--export-topology export hwloc topology to a XML file and exit
|
--opencl enable OpenCL mining backend
|
||||||
--dry-run test configuration and exit
|
--opencl-devices=N list of OpenCL devices to use
|
||||||
-h, --help display this help and exit
|
--opencl-platform=N OpenCL platform index or name
|
||||||
|
--opencl-loader=N path to OpenCL-ICD-Loader (OpenCL.dll or libOpenCL.so)
|
||||||
|
--opencl-no-cache disable OpenCL cache
|
||||||
|
--print-platforms print available OpenCL platforms and exit
|
||||||
|
|
||||||
|
Logging:
|
||||||
|
-l, --log-file=FILE log all output to a file
|
||||||
|
--print-time=N print hashrate report every N seconds
|
||||||
|
--no-color disable colored output
|
||||||
|
|
||||||
|
Misc:
|
||||||
|
-c, --config=FILE load a JSON-format configuration file
|
||||||
|
-B, --background run the miner in the background
|
||||||
-V, --version output version information and exit
|
-V, --version output version information and exit
|
||||||
|
-h, --help display this help and exit
|
||||||
|
--dry-run test configuration and exit
|
||||||
|
--export-topology export hwloc topology to a XML file and exit
|
||||||
```
|
```
|
||||||
|
|
||||||
## Donations
|
## Donations
|
||||||
|
@ -89,6 +89,7 @@ public:
|
|||||||
RandomXInitKey = 1022,
|
RandomXInitKey = 1022,
|
||||||
RandomXNumaKey = 1023,
|
RandomXNumaKey = 1023,
|
||||||
CPUMaxThreadsKey = 1026,
|
CPUMaxThreadsKey = 1026,
|
||||||
|
MemoryPoolKey = 1027,
|
||||||
|
|
||||||
// xmrig amd
|
// xmrig amd
|
||||||
OclPlatformKey = 1400,
|
OclPlatformKey = 1400,
|
||||||
|
@ -141,6 +141,10 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
|||||||
case IConfig::CPUMaxThreadsKey: /* --cpu-max-threads-hint */
|
case IConfig::CPUMaxThreadsKey: /* --cpu-max-threads-hint */
|
||||||
return set(doc, kCpu, "max-threads-hint", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
|
return set(doc, kCpu, "max-threads-hint", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
|
||||||
|
|
||||||
|
case IConfig::MemoryPoolKey: /* --cpu-memory-pool */
|
||||||
|
return set(doc, kCpu, "memory-pool", static_cast<int64_t>(strtol(arg, nullptr, 10)));
|
||||||
|
break;
|
||||||
|
|
||||||
# ifdef XMRIG_FEATURE_ASM
|
# ifdef XMRIG_FEATURE_ASM
|
||||||
case IConfig::AssemblyKey: /* --asm */
|
case IConfig::AssemblyKey: /* --asm */
|
||||||
return set(doc, kCpu, "asm", arg);
|
return set(doc, kCpu, "asm", arg);
|
||||||
|
@ -84,6 +84,7 @@ static const option options[] = {
|
|||||||
{ "no-cpu", 0, nullptr, IConfig::CPUKey },
|
{ "no-cpu", 0, nullptr, IConfig::CPUKey },
|
||||||
{ "max-cpu-usage", 1, nullptr, IConfig::CPUMaxThreadsKey },
|
{ "max-cpu-usage", 1, nullptr, IConfig::CPUMaxThreadsKey },
|
||||||
{ "cpu-max-threads-hint", 1, nullptr, IConfig::CPUMaxThreadsKey },
|
{ "cpu-max-threads-hint", 1, nullptr, IConfig::CPUMaxThreadsKey },
|
||||||
|
{ "cpu-memory-pool", 1, nullptr, IConfig::MemoryPoolKey },
|
||||||
# ifdef XMRIG_FEATURE_TLS
|
# ifdef XMRIG_FEATURE_TLS
|
||||||
{ "tls", 0, nullptr, IConfig::TlsKey },
|
{ "tls", 0, nullptr, IConfig::TlsKey },
|
||||||
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },
|
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },
|
||||||
|
@ -46,6 +46,7 @@ static inline const std::string &usage()
|
|||||||
u += "Usage: " APP_ID " [OPTIONS]\n\nNetwork:\n";
|
u += "Usage: " APP_ID " [OPTIONS]\n\nNetwork:\n";
|
||||||
u += " -o, --url=URL URL of mining server\n";
|
u += " -o, --url=URL URL of mining server\n";
|
||||||
u += " -a, --algo=ALGO mining algorithm https://xmrig.com/docs/algorithms\n";
|
u += " -a, --algo=ALGO mining algorithm https://xmrig.com/docs/algorithms\n";
|
||||||
|
u += " --coin=COIN specify coin instead of algorithm\n";
|
||||||
u += " -u, --user=USERNAME username for mining server\n";
|
u += " -u, --user=USERNAME username for mining server\n";
|
||||||
u += " -p, --pass=PASSWORD password for mining server\n";
|
u += " -p, --pass=PASSWORD password for mining server\n";
|
||||||
u += " -O, --userpass=U:P username:password pair for mining server\n";
|
u += " -O, --userpass=U:P username:password pair for mining server\n";
|
||||||
@ -77,6 +78,7 @@ static inline const std::string &usage()
|
|||||||
u += " --cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1\n";
|
u += " --cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1\n";
|
||||||
u += " --cpu-priority set process priority (0 idle, 2 normal to 5 highest)\n";
|
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-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 += " --no-huge-pages disable huge pages support\n";
|
u += " --no-huge-pages disable huge pages support\n";
|
||||||
u += " --asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer\n";
|
u += " --asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer\n";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user