fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

Feature request - identify threads per card/device #1003

Open GoZippy opened 6 years ago

GoZippy commented 6 years ago

When running my miner - I noticed slight increase in hash rate when using multiple threads per card - when the hashrate report shows on console it only tallies the total of all. It seems that the order which I have the threads start in the amd config file do not translate to thread number reported on the hashrate table.

I would like to see total for cpu section I would like to see total for all threads per card/device amd and nvidia then total for whole system as shown now.

Any ideas where to look in code and I will make some changes to submit for feedback...

GoZippy commented 6 years ago

for example: this is the display for 3 cards - I am using rx560 amd cards - no bios mod or OC on this run to test


> -----------------------------------------------------
> HASHRATE REPORT - CPU
> | ID | 10s |  60s |  15m | ID | 10s |  60s |  15m |
> |  0 | 7.9 | 8.5 | 10.9 |  1 | 29.9 | 30.4 | 31.9 |
> |  2 | 35.7 | 35.9 | 36.5 |  3 | 22.8 | 21.9 | 20.9 |
> |  4 | 74.7 | 74.4 | 75.4 |
> -----------------------------------------------------
> HASHRATE REPORT - AMD
> | ID | 10s |  60s |  15m | ID | 10s |  60s |  15m |
> |  0 | 169.0 | 170.2 | 169.0 |  1 | 76.9 | 77.0 | 79.2 |
> |  2 | 83.2 | 82.8 | 83.9 |  3 | 172.0 | 171.3 | 172.0 |
> |  4 | 76.7 | 77.1 | 78.8 |  5 | 164.5 | 165.4 | 164.8 |
> |  6 | 80.2 | 77.0 | 78.4 |  7 | 83.2 | 82.8 | 83.9 |
> |  8 | 76.7 | 77.1 | 78.8 |
> -----------------------------------------------------
> Totals:   1153.5 1151.7 1164.3 H/s
> Highest:  1202.6 H/s
GoZippy commented 6 years ago

This is my amd config - I welcome feedback and ideas to improve but this seemed to be best from my testing... notice I start 3 mostly identical threads per card - it seems almost random which thread gets the higher hash rate and then the 2 that are halved - not sure why...


"gpu_thread_num" : 9,

"gpu_threads_conf" : [
  //gpu: Baffin memory:3136
  //compute units: 16
  { "index" : 0,
    "intensity" : 341, "worksize" : 5,
    "affine_to_cpu" : false, 
  },
  //gpu: Baffin memory:3136
  //compute units: 16
  { "index" : 1,
    "intensity" : 341, "worksize" : 5,
    "affine_to_cpu" : false,
  },
  //gpu: Baffin memory:3136
  //compute units: 16
  { "index" : 2,
    "intensity" : 341, "worksize" : 5,
    "affine_to_cpu" : false,
  },
   //gpu: Baffin memory:3136
  //compute units: 16
  { "index" : 0,
    "intensity" : 341, "worksize" : 5,
    "affine_to_cpu" : false, 
  },
  //gpu: Baffin memory:3136
  //compute units: 16
  { "index" : 1,
    "intensity" : 341, "worksize" : 5,
    "affine_to_cpu" : false,
  },
  //gpu: Baffin memory:3136
  //compute units: 16
  { "index" : 2,
    "intensity" : 341, "worksize" : 5,
    "affine_to_cpu" : false,
  },
  //gpu: Baffin memory:3136
  //compute units: 16
  { "index" : 0,
    "intensity" : 341, "worksize" : 5,
    "affine_to_cpu" : false, 
  },
  //gpu: Baffin memory:3136
  //compute units: 16
  { "index" : 1,
    "intensity" : 341, "worksize" : 5,
    "affine_to_cpu" : false,
  },
  //gpu: Baffin memory:3136
  //compute units: 16
  { "index" : 2,
    "intensity" : 341, "worksize" : 5,
    "affine_to_cpu" : false,
  },
],
borzaka commented 6 years ago

It's not released yet, but it will look like this in the next version:

HASHRATE REPORT - CPU
| ID |    10s |    60s |    15m | ID |    10s |    60s |    15m |
|  0 |   62.8 |   75.9 |   78.2 |  1 |   65.4 |   76.6 |   78.7 |
|  2 |   65.5 |   76.6 |   78.7 |  3 |   65.5 |   76.7 |   78.7 |
|  4 |   59.9 |   76.0 |   79.0 |  5 |   60.5 |   76.1 |   79.0 |
|  6 |   56.3 |   75.4 |   78.9 |  7 |   60.3 |   76.1 |   78.9 |
Totals (CPU):   496.1  609.4  630.2 H/s
-----------------------------------------------------------------
HASHRATE REPORT - AMD
| ID |    10s |    60s |    15m | ID |    10s |    60s |    15m |
|  0 | 1021.7 | 1021.3 | 1021.5 |  1 | 1020.3 | 1021.5 | 1021.5 |
|  2 | 1024.5 | 1024.1 | 1023.1 |  3 | 1023.3 | 1024.7 | 1023.2 |
|  4 |  938.5 |  939.9 |  940.2 |  5 |  936.9 |  940.8 |  940.2 |
Totals (AMD):  5965.2 5972.4 5969.8 H/s
-----------------------------------------------------------------
Totals (ALL):   6461.3 6581.8 6599.9 H/s
Highest:  6627.7 H/s
-----------------------------------------------------------------

I think your config is wrong. You should only have 2 thread per card. What was your original amd.txt config? Try something like this:

"gpu_threads_conf" : [ 
    { "index" : 0, "intensity" : 768, "worksize" : 4, "affine_to_cpu" : false, "strided_index" : true },
    { "index" : 0, "intensity" : 832, "worksize" : 4, "affine_to_cpu" : false, "strided_index" : true },
    { "index" : 1, "intensity" : 768, "worksize" : 4, "affine_to_cpu" : false, "strided_index" : true },
    { "index" : 1, "intensity" : 832, "worksize" : 4, "affine_to_cpu" : false, "strided_index" : true },
    { "index" : 2, "intensity" : 768, "worksize" : 4, "affine_to_cpu" : false, "strided_index" : true },
    { "index" : 2, "intensity" : 832, "worksize" : 4, "affine_to_cpu" : false, "strided_index" : true },
],

You can increase the intensity to the same higher number if you are using an IGP, or that card is not connected to a monitor.

GoZippy commented 6 years ago

gigabyte z370 XP SLI motherboard

i5-8600k ---> a little OC core 4100, x41.0, 100MHz Bus. Gigabyte autotune not enabled right now but I can push this combination board and chip pretty far... This is strong stable long running no worries about heat or otherwise...

1x16GB ---> again very slight OC on this

2x XFX RX 560 on board (x16 slots - 3rd slot is nerfed by edge of case) 1x XFX RX 560 in x1 PCIe slot 1 mounted next to case (this is my kid's gaming machine I helped her put together for games and exploring mining)

I don't remember which cards are in which slots - but two of them are micron memory - running base clock of 1295 and memory of 1900 (very stable). The better of the 3 is the 1 with Hynix memory - able to push to 2000 memory with 1295 base.

With 2 threads we were 5% below the totals we were seeing here... I will try your suggestion and report back anyhow.

One thing to note, however, is that my kids left the gaming mode active on the cards instead of compute mode in the above hash results I posted - no, crossfire was not enabled but this board can do 3 way crossfire - or more...

[2018-01-29 22:09:44] : New block detected. HASHRATE REPORT - CPU | ID | 10s | 60s | 15m | ID | 10s | 60s | 15m | | 0 | 8.1 | 8.1 | (na) | 1 | 47.6 | 48.2 | (na) | | 2 | 57.1 | 57.0 | (na) | 3 | 41.7 | 42.6 | (na) | | 4 | 60.9 | 60.7 | (na) |

HASHRATE REPORT - AMD | ID | 10s | 60s | 15m | ID | 10s | 60s | 15m | | 0 | 172.5 | 170.2 | (na) | 1 | 90.5 | 90.9 | (na) | | 2 | 82.6 | 82.6 | (na) | 3 | 169.6 | 169.9 | (na) | | 4 | 91.0 | 90.6 | (na) | 5 | 165.7 | 165.3 | (na) | | 6 | 90.5 | 91.0 | (na) | 7 | 82.6 | 82.5 | (na) | | 8 | 91.0 | 90.5 | (na) |

Totals: 1251.5 1250.0 (na) H/s Highest: 1255.7 H/s [2018-01-29 22:09:52] : Result accepted by the pool. [2018-01-29 22:10:19] : New block detected.

That above is with raedeon 18.1.1 on all cards, in compute mode. Clearly - switching to Compute helps a lot...

As for the post about the future release - it still does not show which card goes with each thread... Since I am running 560's on this - I do not think setting 1600 worth of intensity is wise... worksize seems small too - is that the best setting you have found?

GoZippy commented 6 years ago

I guess what I am saying is I would like to see a means to identify each physical card and then categorize each process thread running on that card so it can be easily summed and then reported to show which cards are performing at peak or maybe having issues - without having to do math in my head and try to match up thread number to which card I think it is... bottom line - I noticed that starting multiple threads per card is not always reporting each thread in order of how it was started in the config file - so it makes matching all the threads on a single card more difficult... the only way I manage to do it is to slow each card clock way down and look for the degraded numbers on whichever threads - then write it down.. problem is that it changed the next time I restarted xmr... seemed weird - so I posted about it here...

GoZippy commented 6 years ago

FYI - with all cards set the same as your post (1600 intensity total per card it looks like) I get around 1231 H/s total...

since I can't find much less afford those vega cards anymore - I am using cheaper lower power cards on this machine - its for the kids anyhow and it actually runs really fast benchmarks with the 3 way crossfire going - beats my 2x1070 card gamer I have upstairs... honestly!

Anyhow - at 612 intensity with 2 threads per card all the same settings like you have posted otherwise - 4 workers per thread - it runs around the same at 1230-1240 h/s total... I do not see any real change...

I am running the first x16 slot card with a monitor - I guess I should try enabling the igp and try to see if it will work without connected monitor to the first card - but that would likely impact my kid's gaming performance so... maybe just for fun for now to test... famous last words...