How do I benchmark my CPU with XMRig?
You can benchmark your CPU with XMRig by running its built-in RandomX benchmark, which tests how quickly your processor does Monero’s mining work. Start with a 1-million-hash test, then use a longer test to check whether that speed holds as your CPU warms up.
Get XMRig ready
Download a recent XMRig release from the official project website or its official GitHub repository. Choose the version for your operating system, extract the files, and open a terminal in that folder.
Mining software sometimes triggers antivirus warnings, but that does not mean every download is safe. Avoid repackaged installers, verify the download’s checksum if available, and do not disable your antivirus broadly.
Before testing:
- Close games, browser tabs, and other demanding apps.
- Plug in your laptop and use a consistent power setting.
- Make sure your cooling vents are clear.
- Only test a computer you own or have explicit permission to use.
A benchmark can load your CPU heavily. Stop if temperatures become unsafe for your processor or your computer becomes unstable.
Run the built-in benchmark
On Windows, enter this in PowerShell:
.\xmrig.exe --bench=1M --offline
On Linux, or macOS with a compatible build:
./xmrig --bench=1M --offline
--bench=1M tells XMRig to complete 1 million hashes. A hash is one calculation used in mining. --offline runs the benchmark without contacting the online benchmark service.
This benchmark uses Monero’s RandomX mining algorithm by default. You do not need a wallet address or a mining pool, which is a service that combines miners’ work. The test does not earn XMR.
Let it finish rather than judging the first speed reading. For a longer run, replace 1M with 10M:
./xmrig --bench=10M --offline
On Windows, use .\xmrig.exe instead of ./xmrig.
Read the result and check the setup
Look for the completed benchmark result and speed readings in H/s, meaning hashes per second. A higher number means your CPU completes more mining calculations each second.
Also check XMRig’s startup messages:
- Algorithm: You should see RandomX, usually labeled
rx/0. - Huge pages: These are larger memory blocks that can improve performance. Check whether XMRig successfully enabled them.
- Threads: These are separate streams of work running on your CPU.
- Memory setup: RandomX’s fast mode uses a dataset of about 2,080 MB, plus additional working memory.
RandomX generally needs about 2 MB of L3 cache per mining thread. L3 cache is fast memory built into your CPU. That is why using every available thread does not always produce the best result.
Compare settings fairly
Start with XMRig’s automatic thread selection. Then, if you want to experiment, set a thread count explicitly:
./xmrig --bench=1M --offline --threads=4
Try a few counts near the automatic setting. Change only one setting at a time, repeat each test, and keep your power settings and background workload consistent.
Record the speed, temperature, thread count, and huge-page status. Confirm your best result with the longer test; a short burst can hide heat-related slowdowns.
The bottom line
Use XMRig’s offline benchmark to measure your CPU’s RandomX speed without setting up mining. It measures native XMRig performance—not browser-mining speed or guaranteed earnings. For profitability, put your measured speed and electricity costs into a current mining calculator.
