Author

Topic: Mining bitcoin-SHA2 and litecoin-scrypt concurrently on the same GPU? (Read 999 times)

sr. member
Activity: 840
Merit: 255
SportsIcon - Connect With Your Sports Heroes
Scrypt doesn't use any "RAM" in the sense you are thinking about.  The Scrypt paremters chosen for LTC (and copied to every copycoin) use about 128KB of cache.  Yes that isn't a typo kilobytes not megabytes or gigabytes.  The only "memory" being used is the on die SIMD registers and low latency L2 cache.  The two algorithm use the same resources, Scrypt simply requires more per thread and thus runs with a fraction of the parallelization that is possible with SHA-256.  That combined with the increased number of operations in one hash explain the difference in throughput.  
Then how does one get higher scrypt hash rate by increasing mem clocks, and why does GPU-z clearly show the allocation of 512 MB when cgminer starts?

Quote
Sure you could design an OpenCL kernel that mined Scrypt and SHA-256 based coins at the same time however you would be lucky to get 50% performance from each.
Perhaps, at a particular combination of core and mem clocks. The point is that to maximize scrypt hashing speed, one is forced to underclock the core down to 50 - 60% of mem.
donator
Activity: 1218
Merit: 1079
Gerald Davis
Scrypt doesn't use any "RAM" in the sense you are thinking about.  The Scrypt paremters chosen for LTC (and copied to every copycoin) use about 128KB of cache.  Yes that isn't a typo kilobytes not megabytes or gigabytes.  The only "memory" being used is the on die SIMD registers and low latency L2 cache.  The two algorithm use the same resources, Scrypt simply requires more per thread and thus runs with a fraction of the parallelization that is possible with SHA-256.  That combined with the increased number of operations in one hash explain the difference in throughput.   Sure you could design an OpenCL kernel that mined Scrypt and SHA-256 based coins at the same time however you would be lucky to get 50% performance from each.
sr. member
Activity: 840
Merit: 255
SportsIcon - Connect With Your Sports Heroes
At least, how can I tell each cgminer instance to use only X shaders out of 1536 ? Should I specify "shaders" parameter and not specify "thread-concurrency" ?
sr. member
Activity: 840
Merit: 255
SportsIcon - Connect With Your Sports Heroes
I can't stop thinking that SHA2 and scrypt need different kinds of resources and that probably a careful merge of scrypt.cl and one of the sha2 kernels would yield interesting results.

SHA2 needs fast core and little ram with dataset probably fitting the Radeons L2 cache, while scrypt needs fast and ample ram with underclocked cores with a particular core/ram speed ratio, being it often 0.57 of RAM speed or even 0.5 on my 7870 XT.

Now, I used bitminter for bitcoins and cgminer for litecoins concurrently, adjusting intensity on the latter up and down until I had the perception that I was gaining something even with applications that are blindly competing for GPU resources. How could one gain with custom kernel doing both sha2 and scrypt simultaneously?

More directly to the point, with an example. Let's say that your 7970 yields 700 Mh/s or 700 Kh/s when dedicated to mine one coin. I wonder if it could do, for example 450 Mh/s AND 450 Kh/s, mining 2 coins simultaneously...
Jump to: