Bitcoin Forum
May 02, 2024, 04:31:18 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mining bitcoin-SHA2 and litecoin-scrypt concurrently on the same GPU?  (Read 981 times)
Wipeout2097 (OP)
Sr. Member
****
Offline Offline

Activity: 840
Merit: 255


SportsIcon - Connect With Your Sports Heroes


View Profile
August 06, 2013, 01:02:38 AM
 #1

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...

███████████████████████████████████████████████████████████████
██▀       ▀█       ▀████████████        ▀█         █▀       ▀██
██   ▀██▄▄▄█   ██   ████████████   ███   ████   ████   ▀██▄▄▄██
███▄     ▀██       ▄████████████       ▄█████   █████▄     ▀███
██▀▀▀██▄   █   █████████████████   █▄  ▀█████   ████▀▀▀██▄   ██
██▄       ▄█   █████████████████   ██▄  ▀████   ████▄       ▄██
███████████████████████████████████████████████████████████████
██       ██▀      ▀█████████████    ▀██   █████████████████████
████   ███   ▄██▄   ████████████     ▀█   █████████████████████
████   ███   ████████   ████   █   ▄  ▀   █████████████████████
████   ███   ▀██▀   █   ████   █   █▄     █████████████████████
██       ██▄      ▄███        ██   ██▄    █████████████████████
███████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████                                                             ████████████████████████████████████████████████
.
.
.

████████████████████████████████████████████████████████████          ████████████████                                 ██████████████████████████████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
►►  Powered by
BOUNTY
DETECTIVE
1714667478
Hero Member
*
Offline Offline

Posts: 1714667478

View Profile Personal Message (Offline)

Ignore
1714667478
Reply with quote  #2

1714667478
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714667478
Hero Member
*
Offline Offline

Posts: 1714667478

View Profile Personal Message (Offline)

Ignore
1714667478
Reply with quote  #2

1714667478
Report to moderator
1714667478
Hero Member
*
Offline Offline

Posts: 1714667478

View Profile Personal Message (Offline)

Ignore
1714667478
Reply with quote  #2

1714667478
Report to moderator
Wipeout2097 (OP)
Sr. Member
****
Offline Offline

Activity: 840
Merit: 255


SportsIcon - Connect With Your Sports Heroes


View Profile
August 06, 2013, 02:02:16 AM
 #2

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" ?

███████████████████████████████████████████████████████████████
██▀       ▀█       ▀████████████        ▀█         █▀       ▀██
██   ▀██▄▄▄█   ██   ████████████   ███   ████   ████   ▀██▄▄▄██
███▄     ▀██       ▄████████████       ▄█████   █████▄     ▀███
██▀▀▀██▄   █   █████████████████   █▄  ▀█████   ████▀▀▀██▄   ██
██▄       ▄█   █████████████████   ██▄  ▀████   ████▄       ▄██
███████████████████████████████████████████████████████████████
██       ██▀      ▀█████████████    ▀██   █████████████████████
████   ███   ▄██▄   ████████████     ▀█   █████████████████████
████   ███   ████████   ████   █   ▄  ▀   █████████████████████
████   ███   ▀██▀   █   ████   █   █▄     █████████████████████
██       ██▄      ▄███        ██   ██▄    █████████████████████
███████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████                                                             ████████████████████████████████████████████████
.
.
.

████████████████████████████████████████████████████████████          ████████████████                                 ██████████████████████████████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
►►  Powered by
BOUNTY
DETECTIVE
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
August 06, 2013, 02:14:08 AM
 #3

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.
Wipeout2097 (OP)
Sr. Member
****
Offline Offline

Activity: 840
Merit: 255


SportsIcon - Connect With Your Sports Heroes


View Profile
August 06, 2013, 03:01:14 AM
 #4

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.

███████████████████████████████████████████████████████████████
██▀       ▀█       ▀████████████        ▀█         █▀       ▀██
██   ▀██▄▄▄█   ██   ████████████   ███   ████   ████   ▀██▄▄▄██
███▄     ▀██       ▄████████████       ▄█████   █████▄     ▀███
██▀▀▀██▄   █   █████████████████   █▄  ▀█████   ████▀▀▀██▄   ██
██▄       ▄█   █████████████████   ██▄  ▀████   ████▄       ▄██
███████████████████████████████████████████████████████████████
██       ██▀      ▀█████████████    ▀██   █████████████████████
████   ███   ▄██▄   ████████████     ▀█   █████████████████████
████   ███   ████████   ████   █   ▄  ▀   █████████████████████
████   ███   ▀██▀   █   ████   █   █▄     █████████████████████
██       ██▄      ▄███        ██   ██▄    █████████████████████
███████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████                                                             ████████████████████████████████████████████████
.
.
.

████████████████████████████████████████████████████████████          ████████████████                                 ██████████████████████████████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
►►  Powered by
BOUNTY
DETECTIVE
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!