Benchmark Your Linux Bitcoin or LiteCoin Mining Rig With BFGMiner

Once you have decided that you want to start mining cryptocurrency you need to work out how fast your mining rig crunch work blocks and earn you crypto coins. Working out how fast your rig is called benchmarking. We will use the BFGMiner coin mining tool to benchmark your system.

BFGMiner is a crypto coin mining utility that includes a benchmark mode. In this mode, it will tell you how many hashes per second your rig can computer. This number is very big so is abbreviated as follows:

Once you have the number of hashes per second for your rig you can convert that into coins per hour using CryptoCompare mining calculator

Let’s dive into getting that figure. Start by logging into your Ubuntu 18.04LTS system where you are going to mine coins.

Install BFGMiner

This is really simple as it is in the default Ubuntu 18.04 repository so just run the following commands:

sudo apt update
sudo apt upgrade
sudo apt install bfgminer

Benchmarking BitCoin hashes

Again, this is super easy, you just need to run the following command to run BFGMiner on your CPU and GPU for SHA256 hashes that are used to mine BitCoins:

sudo bfgminer --benchmark -S auto

Here is the benchmark output from BFGMiner running on an 8 core CPU with an NVIDIA GPU:

 bfgminer version 5.5.0 - Started: [2020-07-16 17:07:30] - [  0 days 00:00:34]
 [M]anage devices [P]ool management [S]ettings [D]isplay options [H]elp [Q]uit
 Pool 0: Benchmark           Diff:1  -Alive  LU:  User:Benchmark
 Block: ...0000000000000000  Diff: ()  Started:   I:?
 ST:11  F:1  NB:0  AS:0  BW:[  0/  0 B/s]  E:0.00  BS:7
 9            | 74.63/192.7/429.4Mh/s | A:2 R:0+0(none) HW:0/none
 OCL 0:       | 91.42/181.6/378.9Mh/s | A:3 R:0+0(none) HW:0/none
 CPU 0:       |  0.71/ 1.83/ 0.00Mh/s | A:0 R:0+0(none) HW:0/none
 CPU 1:       |  0.66/ 1.72/ 0.00Mh/s | A:0 R:0+0(none) HW:0/none
 CPU 2:       |  0.70/ 1.82/ 0.00Mh/s | A:0 R:0+0(none) HW:0/none
 CPU 3:       |  0.68/ 1.77/ 0.00Mh/s | A:0 R:0+0(none) HW:0/none
 CPU 4:       |  0.74/ 1.93/ 0.00Mh/s | A:0 R:0+0(none) HW:0/none
 CPU 5:       |  0.70/ 1.83/ 0.00Mh/s | A:0 R:0+0(none) HW:0/none
 CPU 6:       |  0.73/ 1.90/ 0.00Mh/s | A:0 R:0+0(none) HW:0/none
 CPU 7:       |  0.73/ 1.91/ 0.00Mh/s | A:0 R:0+0(none) HW:0/none

The GPU is shown as OCL and each CPU core is listed as CPU. You can see that the GPU is capable of a great deal more work than the CPU cores. This line:

9            | 74.63/192.7/429.4Mh/s | A:2 R:0+0(none) HW:0/none

Gives you the takeaway hash rate of 420 Mh/s or 420 million hashes per second.

Benchmark LiteCoin and DogeCoin hashes

BFGMiner also allows you to select scrypt hashing algorithm which is used by other crypto coins such as LiteCoin and DogeCoin.

Benchmark your system for these coins by starting BFGMiner with the --scrypt option:

sudo bfgminer --benchmark -S auto --scrypt

scrypt hashes will give you a lower hash rate as you can see from the scrypt hashing rate on the same machine shown above:

0            |   9.8/ 25.4/ 42.6kh/s | A:13 R:0+0(none) HW:0/none

BFGminer has benchmarked this machine at 42.4 kh/s or 42 thousand hashes per second.