Guide

Choosing which devices mine, and mining two algorithms at once

Pick cards by number or PCI address, decide how much CPU mines, run two coins at once, and say which algorithm gets which device.

Every device mines by default — every GPU and the CPU. This guide is about narrowing that: by device type, by individual card, permanently in the config, and how much of the CPU joins in. Then the thing those controls make possible: one process mining two algorithms, each on its own devices, and the one idea that makes that work — every device switch comes in a rig-wide size and a per-algorithm size.

Which devices are which

Every run prints its roster, and each line carries both names a card answers to — its device number and its PCI address:

  device: [0] CPU (11 of 12 threads) [cpu]
  device: [1] NVIDIA GeForce RTX 5060 Ti (0000:07:00) [cuda]
  device: [2] NVIDIA GeForce RTX 3060 (0000:09:00) [cuda]
  device: [3] gfx1100 (0000:03:00) [opencl]

The number counts every device enumerated, so turning one off does not renumber the rest. The address does not move at all — it survives a card being added, removed or re-slotted — which is why it is the better one to write into a config that has to keep working. Both are accepted everywhere below, and the address may be given in full (0000:09:00) or in the short form the tables print (9:0).

By type

--nvidia --amd --intel --cpu

Naming any of them makes those the only ones that mine: --nvidia mines the NVIDIA cards and nothing else; --nvidia --cpu adds the CPU back. Give a value instead to change one type and leave the rest alone: --amd 0 stops AMD mining without touching anything else. The same lives under device_types in config.txt.

Careful

These flags are rig-wide. They take a device type away from every algorithm the rig mines. On a rig mining two algorithms, --cpu 0 does not free the CPU for the second one — it stops the CPU for both. To take a type away from one algorithm, put that algorithm’s number on the flag: --cpu1 0. That is the subject of which devices mine which algorithm below. On a Warthog rig, --nvidia on its own switches the CPU off and stops the rig, because Warthog needs both.

By individual card

For when four identical cards are fine and the fifth is doing something else. A comma- or space-separated list of numbers, addresses, or a mix:

./bzminer --devices 2           ...   # ONLY device 2
./bzminer --devices 09:00       ...   # the same card, by address
./bzminer --devices 1,2         ...   # only those two
./bzminer --devices !1          ...   # every GPU EXCEPT device 1
./bzminer --devices !09:00      ...   # every GPU except that card
./bzminer --devices none        ...   # no GPU at all (a proxy-only box)

A bare list is an allowlist; entries prefixed ! are a denylist. The two cannot be mixed, because 0,!1 reads two ways and neither is obviously right, so bzminer says so and ignores the list rather than mining the wrong cards. Every excluded card says so by name at startup, so a typo shows up as a missing card with a reason rather than a rig that is quietly slower.

Tip

In an interactive bash shell, quote a ! entry — --devices '!1' — or the shell reads it as a history reference before bzminer ever sees it. Start scripts and Windows need nothing.

--devices covers GPUs only. The CPU is not a card and has --cpu and --cpu_threads of its own. To mine on one card and nothing else at all, add the type too:

./bzminer --devices 09:00 --nvidia -a ergo -p ... -w ...

It is a setting as well, for a mining OS that only lets you edit the config: "device_select": "09:00". Like the type flags, it is rig-wide.

Permanently, in config.txt

devices[] is the per-card block, and it holds intensity and overclocks as well as the on/off switch. Address an entry by pci, which wins where both are present:

{
  "devices": [
    { "pci": "0000:07:00", "enabled": true,  "intensity": 0 },
    { "pci": "0000:09:00", "enabled": false },
    { "index": 3,          "enabled": true,  "intensity": 20 }
  ]
}

bzminer writes pci, name, architecture and pci_subsystem_id into each entry on its first run, so the file ends up saying which card it means without the rig in front of you. device_select and devices[].enabled are ANDed: a card turned off in either place does not mine.

Intensity

How much work one GPU launch is asked for, in units of 65536 nonces, from 1 to 4096. 0 is auto and means 64, which is what every card used before this was configurable. Raise it to keep a card busy longer per launch; lower it to pick up a new job sooner, keep a display responsive, or shorten a launch that is tripping a driver watchdog. --intensity sets it for every card; intensity <n> on the console command line changes it live; the current value is the cfg column.

How much of the CPU mines

By default bzminer does not mine on every thread. It holds back two processors on anything above 8 threads, and one from 4 up. A CPU miner runs every worker flat out, so mining all of them leaves the miner’s own threads — the watchdog, the telemetry, the console, the pool sockets — fighting workers for a processor, and the machine feels frozen. On a small box it is worse than a feeling: a 12-thread rig mining Warthog stopped answering SSH entirely. The cost of holding two back is a percent or two.

--cpu_threads 12               # mine on 12 threads
--cpu_threads 0                # auto - the default described above
--cpu_affinity 0-7,16,18       # mine on exactly these processors

--cpu_affinity takes precedence over --cpu_threads: it names the processors outright. Whatever is left over is where the miner’s own threads are pinned. t / T move the count live. If you want every thread mining, ask for it.

Multi-socket machines are detected properly: bzminer reads the real topology — packages, cores, threads, NUMA nodes and cache layout — and places mining threads with it in mind rather than scattered, so a dual-socket box does not spend its time moving work between NUMA nodes.

Mining two algorithms at once

One bzminer process mines every algorithm you give it, each on its own devices. -a takes a list, and a flag’s position in that list is the number it carries:

./bzminer -a pearl,randomx --p1 <pool> --w1 <wallet> --p2 <pool> --w2 <wallet>
FlagsAlgorithm
--p1 --w1 --worker1 --pass1 --devices1 --cpu1 --nvidia1 --cpu_threads1algorithm 1 (pearl)
--p2 --w2 --worker2 --pass2 --devices2 --cpu2 --nvidia2 --cpu_threads2algorithm 2 (randomx)

No suffix means algorithm 1, so a one-algorithm command line is unchanged. Where a flag sits on the line means nothing — only its number does. A second --p1 is a failover pool for algorithm 1, not a second algorithm. start_multi_algo in your download is this, filled in.

GPUs on one coin, the CPU on another is the common case, since RandomX and Verus are CPU-only and Ergo, KawPow and Ethash are GPU-only. Nothing needs saying about devices, because each algorithm can only use one kind:

./bzminer -a ergo,randomx \
  --p1 stratum+tcp://pool.us.woolypooly.com:3100 --w1 9YOUR_ERGO_WALLET \
  --p2 stratum+ssl://gulf.moneroocean.stream:20128 --w2 4YOUR_XMR_WALLET

Which devices mine which algorithm

Left unset, the cards are dealt out round-robin, in -a order, among the algorithms that can use them, and the CPU goes to every algorithm that can use it, its threads split by --cpu_threads<N> or evenly. That default is right more often than not. When it is not, there are two sizes of switch, and telling them apart is the whole trick:

  • Rig-wide takes a device away from every algorithm the rig mines: --cpu 0, --nvidia 0, --devices !1, device_types and device_select in the config.
  • Per-algorithm takes it away from one: the same flag with the algorithm’s number on it (--cpu1 0), a device list for that algorithm (--devices1 !cpu), or the devices field of that algorithm’s pools[] entry.
Careful

The usual mistake: on a -a pearl,randomx rig, typing --cpu 0 to keep Pearl off the CPU. That is the rig-wide flag, so it stops RandomX dead as well. The flag you want is --cpu1 0 — the number is the algorithm’s.

To do thisFor the whole rigFor algorithm 2 only (command line)For algorithm 2 only (config.txt)
Keep it off the CPU--cpu 0--cpu2 0 (= --devices2 !cpu)"devices": "!cpu" on its pool entry
Keep it off NVIDIA--nvidia 0--nvidia2 0 (= --devices2 !nvidia)"devices": "!nvidia"
Keep it off AMD--amd 0--amd2 0"devices": "!amd"
Keep it off Intel--intel 0--intel2 0"devices": "!intel"
Only these types--nvidia --cpu--nvidia2 --cpu2 (= --devices2 nvidia,cpu)"devices": "nvidia,cpu"
Not this one card--devices !1--devices2 !1"devices": "!1"
Only these cards--devices 0,2--devices2 0,2"devices": "0,2"
Mine it nowhere here (proxy it)--devices none --cpu 0--devices2 none"devices": "none"

The list vocabulary is the same in every column: device numbers and PCI addresses as the startup roster prints them, the types cpu, gpu, nvidia, amd and intel, and all / none. Bare entries are an allowlist, ! entries a denylist, and one list cannot mix the two. Addresses rather than numbers are the better choice in a config, because a card should keep its assignment if another is added or pulled.

Four rules that follow from it:

  • A GPU mines one algorithm; the CPU can mine several. A card named by two algorithms is reported and stays with the first. The CPU named by two is the normal case, and it is the threads that get split.
  • Rig-wide and per-algorithm are ANDed. A device switched off rig-wide is gone whatever an algorithm’s list says.
  • A failover pool may leave devices empty. The algorithm takes it from the first of its entries that sets it.
  • The farm proxy is per-algorithm too. --proxy_port2 4101 serves algorithm 2 to the farm; add --devices2 none and this rig proxies algorithm 2 without mining it, while algorithm 1 keeps every device it had. The pools and farms guide has the setup.

Spelled out

Pearl on the GPUs and RandomX on the CPU, with Pearl kept off the CPU so RandomX has all of it:

./bzminer -a pearl,randomx \
  --p1 stratum+tcp://us.pearl.herominers.com:1200 --w1 prl1YOUR_WALLET \
  --p2 stratum+ssl://gulf.moneroocean.stream:20128 --w2 4YOUR_XMR_WALLET \
  --cpu1 0

XELIS on two named cards and Ergo on a third, addressed by PCI id so the assignment survives a re-slot:

./bzminer -a xelis,ergo \
  --p1 stratum+ssl://us.vipor.net:5177 --w1 xel:YOUR_WALLET --devices1 07:00,09:00 \
  --p2 stratum+tcp://pool.us.woolypooly.com:3100 --w2 9YOUR_ERGO_WALLET --devices2 03:00

The first rig again, in config.txt, where every pools[] entry carries its algorithm and, where it needs one, its devices:

{
  "pools": [
    { "url": "stratum+tcp://us.pearl.herominers.com:1200",  "wallet": "prl1YOUR_WALLET", "algo": "pearl",   "devices": "!cpu" },
    { "url": "stratum+ssl://gulf.moneroocean.stream:20128", "wallet": "4YOUR_XMR_WALLET", "algo": "randomx" }
  ]
}
Note

Two algorithms on the same card is not possible and would not help: a GPU running two kernels gets each of them a fraction of the card. The one algorithm that genuinely uses two device classes at once is Warthog, and it wants the whole machine — do not pair it with anything.

Problems

  • A second algorithm is not mining. Check its flags carry the right number, and that a device was left for it: every GPU may already belong to algorithm 1.
  • I set --cpu 0 and the CPU algorithm stopped too. That flag is rig-wide. Put the number of the algorithm you wanted off the CPU on it instead: --cpu1 0.
  • A ! entry did something strange in a terminal. bash expanded it as a history reference. Quote it: '!cpu'.
  • --devices was ignored. The list mixed bare entries with ! entries, which bzminer refuses rather than guess at. The log says so.
  • The machine is unusable while CPU mining. Lower --cpu_threads, or use --cpu_affinity to keep a few processors free.