How do i check my hashrate?

I tried doing: ./zcash-cli gethashpersec

but it gives me an error: error: {“code”:-32601,“message”:“Method not found”}

1 Like

You should use: ./zcash-cli zcbenchmark solveequihash 10

This will benchmark the number of seconds to complete the equihash algorithm ten times. That’s the closest thing to hashes per second for this proof-of-work algorithm.

4 Likes

Cool, for reference, I’m getting an average of 6.13 seconds on a amd fx 6300 16gb ram

1 Like

Nice. That’s not too far from the 6.78 I was getting on my 2011 MacBook (running Ubuntu).

1 Like

Just to avoid future confusion: note that these times will change once we adjust the parameters. We’ll make it clear in the release notes that we’ve done so.

3 Likes

If this command returns “seconds per hash” then faster machine should have smaller number returned from this command, am I right ?

However, I’m seeing from my test that the significantly slower PC is returning smaller number from zcbenchmark command. Both PCs is running at the same time on testnet z4. I don’t understand.

By the way, difficulty on testnet has spiked more than 10 folds compared with yesterday. Seems like someone is testing a GPU miner :joy:

That is correct, smaller should be better. Without details it’s hard to know what the difficulty is on your computers.

However, keep in mind that a faster processor will not necessarily make your machine create hashes faster. Equihash is designed to be limited by your memory bandwidth, so that may be the source of the difference.

Regarding the spike, I’m testing some non-GPU hardware and I’ve gotten several of the most recent blocks. But I’ve only been at it for a few hours. :grin:

I guess you are coding an optimized CPU miner. Assuming you are testing in only one PC, can you give us a hint about your hardware configuration ?

1 Like

Is it possible you have mismatched memory modules in your higher-spec pc? Or some other load on the system competing for resources?

1 Like

Unlikely to be an optimized CPU miner (I think the native miner is pretty close to optimized IIR @str4d has is to within a factor of 2 of theoretical limit, am I right? ).

My guess is a lot of small machines firing away at once. :slight_smile:

1 Like

Hint: use

time ~/zcash/src/zcash-cli zcbenchmark solveequihash 10

to run your benchmark so that you do not need to calculate the average time manually. The result will be something like

real    1m15.879s
user    0m0.000s
sys     0m0.004s

where the first number is the real time taken. Divide 10 by this value (converted into seconds) and you have your hashrate in hashes per second. Of course the advantage to this method is that you can easily run 100 or 1000 loops to average out the run times.

1 Like

@JanKalin : That’s a great trick.

Everyone should remember, though, that each run of the solver produces an average of two candidate block hashes. Thus, if each run of the solver takes 10 seconds, the hashrate is:

0.1 solver runs/second * 2 hashes/solver run * 3600 seconds/hour = 720 hashes per hour

Could I ask for an ELI5 about the whole mining algorythm, will it be focused on cpu only? I read some time ago about you guys trying to create a mining algo that could have miners use their cellphones during the night to mine and it would be competetive to normal machines, is that still a work in progress?

Excited to be a part of this. :slight_smile:

The PoW algorithm for zcash is called Equihash, and is designed to be ASIC resistant. It is very-much CPU friendly.

GPUs and ASICs can (and likely will) be made for Equihash, but the advantage they’ll have over CPUs will be very, very small.

The primary bottleneck for Equihash is memory bandwidth. Not memory (having more memory wont help) but memory bandwidth. That’s going to make for a very level playing field. There will exist specialized/advanced zcash miners, but they shouldn’t be able to put small, every-day miners out of business.

1 Like

There is still a lot of room for optimizations for both GPU and CPU miner. Modern GPU has memory bandwidth of about 10 times DDR3. A guy on Zcash subreddit claimed he is working on a private GPU miner which can make 20x difference compared to CPU.

I would say “there is room” for optimizations. But I wouldn’t say “there is a lot of room”.

A 20x speedup (if he can accomplish that) is negligible when it comes to cryptocurrency mining. Consider that the speedup gained by specialized miners for other proofs of work (SHA256, for example, like Bitcoin uses) can be 1,000,000,000x or more over CPU miners.

20x is a drop in the bucket. It’s not nearly enough for specialized miners to put conventional miners out of business.

A 20x speedup will definitely put CPU miners out of business. It’s still not too late to change the algo and make it more GPU resistant (monero algo is an example cpu/gpu 1/1)

Before we get to carried away with the CPU vs GPU debate, lets not forget that Zooko and his team are working on the algorithm to make it ASIC resistant and they have even stated that they are open to even completely changing the POW after it has been launched if it begins to be too lopsided. This is one of the reasons for the slow start, to watch the network.

Zcash is not Bitcoin, it will be actively managed after the launch and (hopefully) won’t be mired in politics every time something like a simple block size increase is needed.

2 Likes

Why not use Monero’s algo, it has been proven robust, private GPU miners can only achieve a 20% increase in hashing rate compared to the latest gen. of cpus…

Equihash was chosen because the underlying problem has been formally studied extensively by academics. It is very simple and well understood. Moreover we can show that no better algorithm exists to solve Equihash than the one outlined in the paper (thanks to algorithm binding).

Other PoWs could have been chosen. There are many options. And it may change in the future if the devs don’t think this one is achieving the desired goals.

3 Likes