Low Monero hashrate with xmr-stak? Read on

Recently I wrote about mining and compared the hashrate of all my computers/servers at home (CPU and GPUs).

My current goal is to mine 1 whole monero coin, and two weeks into the project, I’ve mined 0.134 of a coin.

Yesterday I noticed a discrepancy between two very similarly equipped mining computers. One of the hash rates was not what I expected.

One server was generating 250H/s and the other 839H/s. Both are equipped with dual socket Intel Xeon CPUs @ 2.5Ghz, with 6 cores and 12 logical processors.

After investigating the xmr-stak-win64 mining folders, and files, everything looked fine. All of the files were present.

I had previously had issues with Windows Defender quarantining and removing xmr-stak files, but that wasn’t the problem.

I then began to check and compare the config and cpu txt files. And I found the issue!

Here was the incorrect cpu.ini file configuration on the server with the lower-than-expected hash rate:

“cpu_threads_conf” :
[
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 0 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 2 },

],

And here is the cpu.ini file conf from the well performing hash rate server:

“cpu_threads_conf” :
[
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 0 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 2 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 4 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 6 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 8 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 10 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 1 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 3 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 12 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 14 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 16 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 18 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 20 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 22 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 13 },
{ “low_power_mode” : false, “no_prefetch” : true, “affine_to_cpu” : 15 },

],

Quite a big difference! What I hadn’t realised is that when you first run xmr-stak on a new machine, after unzipping the package, a wizard runs. I thought this wizard simply collected information about your mining pool, wallet id, pool password, tls/ssl support and nicehash support. However, it does one more important thing. It analyses your computer, and sets the configuration files appropriately. If you have a dual-core low-end CPU, it will assign the cpu thread configuration appropriately. If you have a super powerful dual-socket Xeon, it will likely assign many more threads.

I was lazy. I had copied my full pre-configured xmr-stak-win64 folder from my laptop (dual core crap CPU) to the Xeon server and simply executed the hashing process. I wasn’t keen to complete the full wizard and thought this was a good time saving approach. The Xeon server had 2 threads configured, rather than the 16 threads that the wizard would normally pick.

If you have any doubts about your current xmr-stak configuration, or if your system has changed in any way, you can delete the config.txt and cpu.txt files to envoke a new wizard prompt, where you can re-enter all of your details, and get your threads reassessed.

The final though on the cpu.txt file is that you can change the thread settings manually, if you believe that you can achieve a more effective distribution of hashing load on your CPU. Personally, I haven’t been able to beat the wizard-generated settings.

Happy mining!

Leave a Reply

Your email address will not be published. Required fields are marked *