Fletch



Offline



Activity: 168

Merit: 100





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







Full MemberActivity: 168Merit: 100I'll have a steak sandwich and a... steak sandwich HashPeak - GPU mining hashrate peak detector 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



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



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). 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.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 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: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.HashPeak running:A sample PNG generated by the application (click to zoom):And the accompanying CSV file: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.If you like HashPeak and have some cryptocurrency burning a hole in your pocket, by all means.BTC: 1L6zn1zPVxFzbucip7AE7LH7aU2s3haHTLLTC: LS1c68c6DgvMMkV4mqgwXJboo2HCws9VKcBC: BGfHDAkiNA8uMXLgHdaW2oXqeJv11cCjXZDOGE: DTwrM6GQNXvrtVcGW9smpEC19mDaWzXcREThanks 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 BTC: 1vcUKosefrcZCLUQTtvx4WvgnYMC

pomelo



Offline



Activity: 118

Merit: 10



Mining since early 2013







MemberActivity: 118Merit: 10Mining since early 2013 Re: HashPeak - GPU mining hashrate peak detector May 05, 2014, 03:40:02 PM #5 Quote from: Fletch on May 05, 2014, 03:18:52 PM Quote from: pomelo on May 05, 2014, 11:45:23 AM 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

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.

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

Fletch



Offline



Activity: 168

Merit: 100





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







Full MemberActivity: 168Merit: 100I'll have a steak sandwich and a... steak sandwich Re: HashPeak - GPU mining hashrate peak detector May 05, 2014, 07:43:44 PM #8



Quote from: sampi on May 05, 2014, 06:09:43 PM 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.



Quote from: ryangrant on May 05, 2014, 06:16:04 PM

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! 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.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.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 BTC: 1vcUKosefrcZCLUQTtvx4WvgnYMC

drkman



Offline



Activity: 378

Merit: 250







Sr. MemberActivity: 378Merit: 250 Re: HashPeak - GPU mining hashrate peak detector 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.

malefactor



Offline



Activity: 35

Merit: 0







NewbieActivity: 35Merit: 0 Re: HashPeak - GPU mining hashrate peak detector 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



Offline



Activity: 168

Merit: 100





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







Full MemberActivity: 168Merit: 100I'll have a steak sandwich and a... steak sandwich Re: HashPeak - GPU mining hashrate peak detector May 08, 2014, 07:23:42 AM #16 Quote from: malefactor on May 08, 2014, 03:39:10 AM 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. 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 BTC: 1vcUKosefrcZCLUQTtvx4WvgnYMC

sandpaper



Offline



Activity: 373

Merit: 250







Sr. MemberActivity: 373Merit: 250 Re: HashPeak - GPU mining hashrate peak detector 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.)