2

A typical CPU achieves 100 H/s for Monero. According to my calculations, this hash rate is somehow strange!

As we know, the main loop of Monero (Cryptonote) iterates about 500K times and each iteration needs 4 accesses to the memory (2 writes and 2 reads). So, there are 500K*4=2M accesses to the memory for each hash.

100 H/s * 2M = 200 MegaMemoryAccess/seconds

This means that the memory latency of the CPU must be 50 pico seconds which is impossible even for the L1 cache.

So what is the hash rate shown by miner programs?

1

https://stackoverflow.com/questions/4087280/approximate-cost-to-access-various-caches-and-main-memory reports L2 cache access to about 3 to 5.3 ns. We'll use 5 ns to be conservative. 2 million accesses get you 0.01 seconds, so about 100 times a second. That does not leave much for the rest, granted, but is not obviously wrong.

Second, your calculation is wrong: 200e6 accesses per second yield an access time of 5 nanoseconds (1 / 200e6 = 5e-9). This is in line with the paragraph above.

Last, the hash rate shown by miner programs is the number of hashes done per second (may be a sliding window average).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.