Xmrig is a faster XMR miner in some use cases

spfoo

Member
May 23, 2017
102
16
18
spfoo,

could you post your config.txt for your amd miner without cpu affinity, or do you just set the affinity section to false?
I edited the code to test it since the whole affinity part was just commented out. Wolf's code changes is mostly really just that - commenting out parts here and there and writing childish comments if any. So there's no flag for affinity. I really stumbled on it by accident while studying how mr. Garzik originally implemented the miner.

If you want to try affinity the sub-routine is still there in the beginning of the file cpu-miner.c . Then look for the call to affine_to_cpu later in the code. Just remove the comment around the call and re-compile.

Interestingly neither Jones or Wolf give any credit to the original creator of the code.
 

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
And it look's like that node died, I shut it down and installed a video card, keyboard, moniter and mouse and went to boot.

It powers up but thats it, removed everything that I added to return it to like it was and still nothing.:(
 

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
Its dead Jim.......

Swapped cpu's ram, hard drive, swapped both nodes, pcie riser card, removed and replaced the battery and still dead.

I can't find a bios reset jumper, does it have one?

Anyway I swapped the E5-2660's and the 2660's so now it at least gives me the opportunity to compare xmr-stak-cpu with xmrig under Ubuntu 16.04 and its about the same performance.

Kind of odd, the 2620's have a big increase in hash rate compared to xmr-stak but in the same pc running the 2660's performance is about the same.
 
Last edited:

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
I guess I could try swapping the bios chips from a another node but would hate to corrupt it.
 

Riz

Member
May 8, 2015
44
9
8
31
Next I copied over the default "config.json" to the xmrig build folder and edited it for the pool and user info.

Now instead of typing in one long command , ./xmrig -o poolinfo -u username -p pw , I just type in ./xmrig.




I will definitely install this on my other machines this weekend if it does ok on this one machine.

It is VERY easy to install, only problem is i'll need to add some ram temporarily to my two open computer servers that are only running 2 one gig sticks of ram each since I do not think it will compile with only two gigs of ram.

Also I do not know how well the auto config works on newer cpu's.
FWIW, I have been testing a few different setups lately, and read your post. I think you could get a bit better here. I was able to get 560 H/s out of dual 2620's.
HASHRATE REPORT
| ID | 2.5s | 60s | 15m | ID | 2.5s | 60s | 15m |
| 0 | 40.4 | 40.4 | 40.4 | 1 | 40.2 | 40.2 | 40.2 |
| 2 | 36.9 | 37.0 | 37.0 | 3 | 42.3 | 42.4 | 42.4 |
| 4 | 36.2 | 36.2 | 36.2 | 5 | 40.9 | 40.9 | 40.9 |
| 6 | 42.1 | 42.2 | 42.1 | 7 | 42.1 | 42.2 | 42.2 |
| 8 | 36.9 | 37.0 | 37.0 | 9 | 40.4 | 40.4 | 40.4 |
| 10 | 36.2 | 36.2 | 36.2 | 11 | 41.4 | 41.4 | 41.4 |
| 12 | 42.3 | 42.3 | 42.3 | 13 | 41.2 | 41.2 | 41.2 |
-----------------------------------------------------
Totals: 559.4 559.9 559.9 H/s
Highest: 561.8 H/s

For whatever reason, here's what I found to be most successful with xmr-stak
"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" : 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" : 24 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 26 },
],
 

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
Recieved my E5-2665 V1's in today and installed them into my third open compute server.

With xmr-stack I get ~910 H/s per node.
With xmrig I get ~896 H/s.

Whats odd is that with the slower cpu's I get quite a bit more performance, with the 2660's its a wash and with the 2665's its a little slower than xmr-stak.
 

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
After using xmrig and xmrig-nvidia for a few days and tinkering with it there are a few things that are interesting.

First the good:

Xmrig is easier to install than xmr-stak-cpu.

Less editing of the .conf files, all you need it to set the donation level, pool info and user info. No need to configure core number or affinity at all. So I think it would work better than xmr-stak in a docker container.

Much easier to install xmrig-nvidia than it is to install xmr-stak-nvidia.

I was able to install xmrig-nvidia and run on Ubuntu 17.04 with Cuda 8 on my GTX 1080Ti where xmr-stak-nvidia refused to compile at all.

Also xmrig-nvidia on Ubuntu 17.04 is faster, ~40 H/s, than xmr-stak-nvidia on windows 10 with factory settings on my GTX 1080Ti but you can more easily tweek the clock speed and memory setting for more performance using Afterburner in Windows 10.

My dual E5-2620 V1's mine noticeably faster with xmrig than xmr-stak-cpu. Went from ~475 H/s to ~525 H/s.

The core auto config seems to work perfectly on E5 V1 cpu's. ( Still haven't tried it on my Dual 2667 V3 pc yet)

Pretty colors in the terminal.


The Bad:

Inconsistent hash rates.

VERY inconsistent hash rate on my 2660 v1 and 2665 v1 cpu's , you can start it running one time and its as fast as xmr-stak and then the next time it's mining at 100 H/s less. Where as xmr-stak-cpu is really consistent on the same cpu's. As it hashes the hash rate varies alot as the programs prints the progress to the terminal window.


So here is what I recommend.....

Try them both and use what you prefer, I run xmrig on my 2620's and xmrig-nvidia on both my nvidia cards on Ubuntu 17.04 and xmr-stak-cpu on my 2660's and 2665's for the best overall performance.

Also I expect it to get better with newer releases.
 
Last edited:

RBE

Member
Sep 5, 2017
60
34
18
@Klee (#23) There is no mention of a BIOS reset jumper in the OCP Intel Motherboard Hardware v2.0 specification (link to PDF).

@Klee (#29) When you say that XMRig correctly configures your E5 V1 CPUs, was this with all cores enabled in BIOS?
 

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
@Klee (#23) There is no mention of a BIOS reset jumper in the OCP Intel Motherboard Hardware v2.0 specification (link to PDF).

@Klee (#29) When you say that XMRig correctly configures your E5 V1 CPUs, was this with all cores enabled in BIOS?

#23.... Nope no jumper so I have had to remove the battery and short the contacts to get it to reset, that did not work on the dead node with the corrupted or bad bios chip, but it worked on the other one.

#29.....I always enable all the cores, I like to try new things and I just don't want to have to reset and go into the bios if I need them on so I just leave them on at all times.
 

manubit

New Member
Sep 14, 2017
27
6
3
This is my first post on this forum though I have been reading it for a few months now. So, let me know if I'm doing something wrong.

I have seen good gains in xmrig by forcing the number of threads to run on a CPU. I have dual E5-2630 v4 (10 cores, 25MB L3 cache each). So the ideal number of threads is 25 and that is what gives me the best hash rate in xmr-stak-cpu. But I get best hash rate in xmrig by running 12 threads on each CPU. I use "numactl --cpunodebind=0 --membind=0" and "numactl --cpunodebind=1 --membind=1" to run two instances of xmrig using the same config file. The relevant entries in my config file are:
"cpu-affinity": null,
"cpu-priority": null,
"max-cpu-usage": 100,
"threads": 12,​
 

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
This is my first post on this forum though I have been reading it for a few months now. So, let me know if I'm doing something wrong.

I have seen good gains in xmrig by forcing the number of threads to run on a CPU. I have dual E5-2630 v4 (10 cores, 25MB L3 cache each). So the ideal number of threads is 25 and that is what gives me the best hash rate in xmr-stak-cpu. But I get best hash rate in xmrig by running 12 threads on each CPU. I use "numactl --cpunodebind=0 --membind=0" and "numactl --cpunodebind=1 --membind=1" to run two instances of xmrig using the same config file. The relevant entries in my config file are:
"cpu-affinity": null,
"cpu-priority": null,
"max-cpu-usage": 100,
"threads": 12,​

What is the hash rates running 25 threads vs 12 threads on each cpu?
 

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
First try to run xmrig on my dual E5-2667 v3 pc and it only sees one cpu.

 

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
Now if I edit the config file to this.
"cpu-affinity": null,
"cpu-priority": null,

"max-cpu-usage": 100,

"threads": 32,"
I get this:




Still shows 1 cpu and only the cache shown is from one cpu but system monitor shows %100 on all 32 cores.

So not even close to what xmr-stak-cpu-dev "low power mode" can do on 16 threads.

 
Last edited:

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
T I use "numactl --cpunodebind=0 --membind=0" and "numactl --cpunodebind=1 --membind=1" to run two instances of xmrig using the same config file.
Where do you input that information to run two instances ?
 

Klee

Well-Known Member
Jun 2, 2016
1,292
395
83
Still tinkering with xmrig in one my 2665 nodes.

If I change "max-cpu-usage": 100

Its about ~5H/s or less slower than xmr-stak-cpu on these cpu's


Edit: Killed it and restarted it, at its mining at 550 H/s down from almost 900 H/s, so it is still VERY inconsistent. o_O
 
Last edited: