4

Is it possible to mine scrypt and sha256 coins at the same time on one GPU?

Rationale: Hashrate of scrypt mining is limited by memory bandwidth. That means that some of the processor cycles are wasted because the processors are waiting data from RAM. These wasted processor cycles could be used insted for sha256 mining which needs much less bandwidth.

  • Same could be asked of mixing scrypt-mining and either scrypt-n (as in vertcoin) or scrypt-jane at the same time on the same GPU. My guess it won't be very profitable... – Joe Pineda Feb 21 '14 at 4:23
1

In GPU scrypt mining, the optimized threshold of lookup gap is 2. It means the GPU only saves 0, 2, 4, ..., etc to GDDR (global memory of GPU) and reduce huge amount of time of saving all 128KB data for one scrypt calculation. However, it needs some GPU cycles to re-compute for the elements if the algorithm needs data in the index of 1, 3, 5, ... And remixing those 1024 elements also takes GPU cycles. In the GPU architecture, the hardware scheduler will help to hide the latency of memory read/write. So, the GPU cycles are not wasted. One of the inefficient part is the parallelized processing with conditional code. For a wave-front or stream processor to compute n-dimension at once, not every core needs and computes the values of odd index of elements. So some cores must be masked as off and they are wasted.

if (j & 1)
    salsa(...);

When GPU computes N elements at once, then every variable j of different thread could be even or odd. So only the thread which has odd number in j needs to run the code salsa first. There is only one shared program counter in the compute unit, so every thread runs the same code. But for those threads that don't need the to do salsa agin, those processors are being masked off like they are not running and compute the code.

So, in the GPU programming manual, it tells you the following is inefficient.

if (A)
    B = 0;
else
    B = 1;

Then the GPU needs to run the code twice. One is for the true condition and another is for the false condition.

It's better to re-write the code as follows.

B = A ? 0 : 1;

However, in scrypt, salsa is not a simple expression can do like this way.

  • This is an interesting analysis, but for a non-expert, it would be helpful to have a bottom line: is this possible, and, in simple terms, why or why not? – Nate Eldredge Aug 21 '14 at 0:14

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.