Bitcoin Forum
November 10, 2024, 09:37:55 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: HashPeak - GPU mining hashrate peak detector  (Read 7992 times)
Fletch (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
April 29, 2014, 08:04:21 PM
Last edit: May 05, 2014, 08:37:04 PM by Fletch
 #1

HashPeak

What's this?
Determining the most effecient hashrate for GPU-based cryptocurrency mining is a tedious process. It usually involves manually trying a large number of GPU engine core frequencies and keeping track of the resulting hashrate to detect any peaks in hashrate. HashPeak automates this process.

HashPeak is a .NET 2.0 console application that connects to a running instance of sgminer or cgminer, sets a GPU engine clock, waits for the hashrate to stabilize and then measures the hashrate. The application is provided with a range of GPU clocks to test and then runs through them in succession. Upon completion, the application presents the user with the lowest GPU enging clock frequency that resulted in the highest possible hashrate.

In addition, HashPeak generates a CSV (Comma-Separated Values) file including all measured data as well as a plotted graph in the form of a PNG file.

License
HashPeak is open source software released under the MIT License. The source code for HashPeak is available via GitHub at https://github.com/rickardandersson/HashPeak.

Command line arguments
Code:
Options:
    --host=VALUE           IP or hostname for miner API. Default: 127.0.0.1.
    --port=VALUE           Port number for miner API. Default: 4028.
    --gpu-id=VALUE         GPU ID to work on. [required]
    --min-gpu-clock=VALUE  Lower limit of GPU engine clock frequency range to
                             test. [required]
    --max-gpu-clock=VALUE  Upper limit of GPU engine clock frequency range to
                             test. [required]
    --step=VALUE           Number of MHz to increase GPU engine clock per
                             iteration. Default 1.
    --delay=VALUE          Seconds to wait between setting new clock and
                             testing the hashrate. Default: auto.
    --help                 Show this message and exit.

Here's an example running HashPeak on GPU with ID 0 on the local miner instance, measuring the hashrate for GPU clocks 950-1025 MHz with a step of 5:
Code:
HashPeak.exe --gpu-id 0 --min-gpu-clock 950 --max-gpu-clock 1025 --step 5

Please review README.md in its entirety for more detailed information on running HashPeak and information on giving the application privileged API access to your miner.

Miners
The recommended miner to use with HashPeak is sgminer. Although HashPeak works with cgminer, and most likely bfgminer as well, the precision of scrypt hashrates reported through the API is very limited in cgminer. In sgminer, the precision is down to a tenth of a kilohash/s, but in cgminer, the precision is 10 kilohashes/s.

Screenshots
HashPeak running:



A sample PNG generated by the application (click to zoom):



And the accompanying CSV file:

Code:
"Timestamp","Memory clock","GPU clock","Hashrate (khash/s)","Hardware errors"
"2014-02-11 10:57:54","1250","1010","715,1","0"
"2014-02-11 10:58:09","1250","1010","714,3","0"
"2014-02-11 10:58:22","1250","1015","718,7","0"
"2014-02-11 10:58:32","1250","1020","721,4","0"
"2014-02-11 10:58:43","1250","1025","724,5","0"
"2014-02-11 10:58:53","1250","1030","727,4","0"
"2014-02-11 10:59:05","1250","1035","731,7","0"
"2014-02-11 10:59:19","1250","1040","735,1","0"
"2014-02-11 10:59:49","1250","1045","732,4","0"
"2014-02-11 11:00:22","1250","1050","715,0","2"
"2014-02-11 11:00:52","1250","1055","680,5","3"
"2014-02-11 11:01:22","1250","1060","664,2","9"

Download
I've compiled HashPeak and made it available for download via https://github.com/rickardandersson/HashPeak/releases/download/v1.0.1/HashPeak-1.0.1.zip. If you have qualms over downloading and running binaries from people you don't know, you can download the source and build it yourself using Visual Studio.

The binary should run on all forms of Windows provided that .NET Framework 2.0 is installed. It should also run on Mono, but I have yet to try this. If you do, please post your results.

Donations
If you like HashPeak and have some cryptocurrency burning a hole in your pocket, by all means.

BTC: 1L6zn1zPVxFzbucip7AE7LH7aU2s3haHTL
LTC: LS1c68c6DgvMMkV4mqgwXJboo2HCws9VKc
BC: BGfHDAkiNA8uMXLgHdaW2oXqeJv11cCjXZ
DOGE: DTwrM6GQNXvrtVcGW9smpEC19mDaWzXcRE

Thanks and enjoy!

EDIT 2014-05-05: Updated for release 1.0.1. Removed link to mega.co.nz and moved binaries to Github (via the releases feature).

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
Minerist
Member
**
Offline Offline

Activity: 80
Merit: 10


View Profile
May 04, 2014, 06:35:59 PM
 #2

Good idea, i won't try it but good luck!
pomelo
Member
**
Offline Offline

Activity: 118
Merit: 10

Mining since early 2013


View Profile
May 05, 2014, 11:45:23 AM
Last edit: May 05, 2014, 02:17:09 PM by pomelo
 #3

the program just crashes on my win7 + sapphire HD7950 with 13.12 Catalyst + sgminer 4.1.0

9RRNN8vH6o5srbxPuKU61GuN6i6TPDMwxS XMG
Fletch (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
May 05, 2014, 03:18:52 PM
 #4

the program just crashes on my win7 + sapphire HD7950 with 13.12 Catalyst + sgminer 4.1.0

That's odd. Did you run it by just clicking the exe or did you run it from the command prompt? You need to do the latter. Do you get an error message?

PS. What video card or drivers you run are not relevant since HashPeak only communicates with the miner through the API.

Cheers,
Fletch

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
pomelo
Member
**
Offline Offline

Activity: 118
Merit: 10

Mining since early 2013


View Profile
May 05, 2014, 03:40:02 PM
 #5

the program just crashes on my win7 + sapphire HD7950 with 13.12 Catalyst + sgminer 4.1.0

That's odd. Did you run it by just clicking the exe or did you run it from the command prompt? You need to do the latter. Do you get an error message?

PS. What video card or drivers you run are not relevant since HashPeak only communicates with the miner through the API.

Cheers,
Fletch

I run from command promt. I used the "HashPeak.exe --gpu-id 0 --min-gpu-clock 950 --max-gpu-clock 1025 --step 5" command and at the "Looking for GPU with id 0..."-step it crashesh and windows notifies that a program has stopped working.

9RRNN8vH6o5srbxPuKU61GuN6i6TPDMwxS XMG
sampi
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
May 05, 2014, 06:09:43 PM
 #6

This is amazing!

Are you planning to add more settings to it? (Intensity, xIntensity, threads, etc.)
ryangrant
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
May 05, 2014, 06:16:04 PM
Last edit: May 05, 2014, 06:35:46 PM by ryangrant
 #7

able to port it to linux? this looks amazing! If you aren't able to port it, hopefully someone can join your github team/fork and make a linux port! Cheesy
Fletch (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
May 05, 2014, 07:43:44 PM
 #8

I'm working with pomelo to sort out the problem he's having. For some reason, the JSON returned from his sgminer API doesn't match what my local sgminer returns. The issue should be resolved soon.

This is amazing!

Are you planning to add more settings to it? (Intensity, xIntensity, threads, etc.)
Adding more settings wouldn't be difficult, but it depends on whether you would want to test those settings individually or together with GPU clock. Individually is doable, but if you want to test multiple settings in the same "batch", the amount of time the application will need to complete the test will multiply with each setting. I think, before we add any new settings to test, we need to figure out which ones make the most sense in order to relatively quickly find the hashrate sweetspot.

able to port it to linux? this looks amazing! If you aren't able to port it, hopefully someone can join your github team/fork and make a linux port! Cheesy
It should run on linux right now provided that you have mono installed. If not, I'm pretty sure I can fix it. Making it run without Mono means rewriting the application in some other programming language and that's not something I have time for at the moment.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
pomelo
Member
**
Offline Offline

Activity: 118
Merit: 10

Mining since early 2013


View Profile
May 05, 2014, 08:10:13 PM
 #9

upgrading from sgminer 4.1.0 to 4.1.271 fixed the problem.

9RRNN8vH6o5srbxPuKU61GuN6i6TPDMwxS XMG
Fletch (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
May 05, 2014, 08:40:24 PM
 #10

upgrading from sgminer 4.1.0 to 4.1.271 fixed the problem.
Thank you very much for being helpful in tracking down the issue (via PM). HashPeak should work with 4.1.0 anyway, so I've released an updated release that addresses the API issue you were having.

Cheers,
Fletch

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
drkman
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250


View Profile
May 05, 2014, 10:26:30 PM
Last edit: May 06, 2014, 04:08:30 AM by drkman
 #11

Can you provide some syntax on how to do the --host command?  Not sure how to do the api and port part.

Does this need to run from inside the sgminer folder?  Does it work with sph-sgminer?  How do you use it with an X11 coin?

Just putting it on my c: drive and using a .bat file with your sample config and it just crashes.  Using sph-sgminer.
worldlybedouin
Sr. Member
****
Offline Offline

Activity: 376
Merit: 250


View Profile WWW
May 05, 2014, 10:56:34 PM
 #12

Looks interesting, I'll have to give it a go bit later after work.

LTC:  LXrAe2E6cBsK52GvUsYraeXkc2s7Ti7R5X
BTC:  1FLTMqVjTZ5MTdCF4npNZGFMEUGyBV4zcj
pomelo
Member
**
Offline Offline

Activity: 118
Merit: 10

Mining since early 2013


View Profile
May 05, 2014, 11:24:24 PM
 #13

upgrading from sgminer 4.1.0 to 4.1.271 fixed the problem.
Thank you very much for being helpful in tracking down the issue (via PM). HashPeak should work with 4.1.0 anyway, so I've released an updated release that addresses the API issue you were having.

Cheers,
Fletch

np, happy to help.

9RRNN8vH6o5srbxPuKU61GuN6i6TPDMwxS XMG
Fletch (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
May 06, 2014, 08:41:20 AM
 #14

Can you provide some syntax on how to do the --host command?  Not sure how to do the api and port part.
README.md has an example using the --host and --port commands. If you're running this locally though, you probably don't need to specify a host and port. My guess is that you haven't enabled the API in your miner properly. The readme has details on this as well under "API access".

Does this need to run from inside the sgminer folder?
Nope. It communicates with the miner via IP.

Does it work with sph-sgminer?
I don't know. I have never tried sph-sgminer. I can't imagine there are any changes in the API though, so I think it should. Perhaps you can try and get back with the results?

How do you use it with an X11 coin?
Another thing I haven't tried. I think it should just be a matter of running it against the miner. It doesn't really care what algorithm the miner is running as long as it reports back the hashrate.

Just putting it on my c: drive and using a .bat file with your sample config and it just crashes.  Using sph-sgminer.
Try running it from a command prompt so you get to see any error message that might appear.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
malefactor
Newbie
*
Offline Offline

Activity: 36
Merit: 0


View Profile
May 08, 2014, 03:39:10 AM
 #15

this is very interesting.  I've considered writing something a bit like this myself.

Have you considered automated varying memory clock too?  (effectively making this three dimensional -- a stack of graphs like you made)  I ask because I've read hints that suggest that there exist lower 'sweet spots' of gpu/mem clock that exert similar, or slightly lower hash rate at a much lower power draw.

for me, I'm more interested in lowering power draw and gaining per watt efficiency.  with the stack of graphs you could draw a curve of optimal hash rates vs gpu/mem clock.  I would expect that the latter is predictable (thus not needing to be strictly measured) and might help produce a final graph of optimal settings vs clock level/power draw to let the user decide if jacking up to max hash is worth it to them.

linux version would be nice too :-)
Fletch (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
May 08, 2014, 07:23:42 AM
 #16

Have you considered automated varying memory clock too?  (effectively making this three dimensional -- a stack of graphs like you made)  I ask because I've read hints that suggest that there exist lower 'sweet spots' of gpu/mem clock that exert similar, or slightly lower hash rate at a much lower power draw.
Yes, this is on my todo list. I just need to find the time to add it. I'm thinking it might be prudent to try to estimate the amount of time it will take to iterate over all permutations of mem and core clock and warn the user if it is likely to take a very long time.

Any suggestions on how to plot the graph in that case? If the number of mem clocks is large, the graph will be difficult to read.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
XP1
Newbie
*
Offline Offline

Activity: 14
Merit: 0



View Profile
May 08, 2014, 02:11:10 PM
 #17

What do people think about these?

CGBenchmark:
http://www.reddit.com/r/litecoinmining/comments/1uv67j/cgbenchmark/
https://github.com/KevJLaw/CGBenchmark

CGMinerTuner:
https://github.com/Uvedale/CGMinerTuner

I haven't tried them, though.
Fletch (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
May 08, 2014, 07:45:01 PM
 #18

Hmm. Had I known these existed, I probably wouldn't have bothered with writing HashPeak. However, it appears all three applications have their individual pros and cons. Now it's just up to me to make sure that HashPeak has only pros :-) That is, when the kids will let me spend a few hours by myself.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
sandpaper
Sr. Member
****
Offline Offline

Activity: 373
Merit: 250


View Profile
May 12, 2014, 07:26:06 PM
 #19

I don't know if the CGBenchmark and CGTuner work for x11 and scrypt-n or any other algos but I know haskpeak does and I like it. Are there any future plans for you to implement some of the other features they have?

I understand that running multiple configurations at the same time would be far more time consuming but I would like to be able to set a range for mem of 1300-1600, gpu 1000-1300, xintensity 4-10 and have it run through all combinations.

My big ones I would like to see are
Ability to change / have combinations running at the same time
xintensity
rawintensity
gpu mem clock
gpu powertune
+ Temperature readouts for all hashrates

Thanks!

(If you think I should just try the other benchmark software please let me know. The main thing for me is using it with x11.)
Fletch (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
May 13, 2014, 07:07:51 AM
 #20

I don't know if the CGBenchmark and CGTuner work for x11 and scrypt-n or any other algos but I know haskpeak does and I like it. Are there any future plans for you to implement some of the other features they have?
It's coming. I started working on adding gpu mem clock support last night, but I only got an hour or so though before I had to turn in. The features are not difficult to implement. The only real issue is the graph. If we have 50 different memory clocks and or intensity/xintensity settings, the graph will be very cluttered.

You mentioned temperature readouts. I'm not sure these are all that interesting considering we only run each set of clocks long enough for the hash rate to stabilize and it's unlikely that the temperature will reach its maximum during that short period of time.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!