Bitcoin Forum
December 08, 2016, 06:33:41 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: PowerPC, Altivec and massively parallel farms  (Read 3839 times)
catfish
Sr. Member
****
Offline Offline

Activity: 270


teh giant catfesh


View Profile
October 20, 2011, 11:02:50 AM
 #1

OK, this is a mad blue-sky idea - feel free to shoot it down (but please explain with facts and numbers, rather than just insult me for coming up with an idiotic idea) Cheesy

I remember back when I was crunching for Seti@Home. I'm a Mac and OS X enthusiast (note that I'm *not* an Apple fanboy - some of their business practices and products piss me off) and have some fairly serious Mac gear. The calculations required for Seti are similar embarrassingly-parallel computations that lend themselves to distributed computing. At the time, before GPGPU code became the norm, CPU crunching was the competition, and I once got to the top of the tree (recent average credit, #1 worldwide) with my mad Quad G5 PowerMac.

The Quad G5 PowerMac was an insane machine - stupidly expensive, needed liquid cooling for its CPUs, and when crunching work units, the northbridge ran at a nice constant 110˚C. That is *not* a typo, nor do I work in Fahrenheit. Eventually the G5's liquid cooling system started to fail, so I moaned a bit to Apple about only getting a year out of a £4,500 machine, and they gave me an 8-core Xeon Mac Pro for the price of a Mac Mini, which was nice of them (but a different story)...

The reason why the Mac G5s were so highly-represented on the Seti leaderboard (against Opteron servers and similar Intel server kit) was due to the PowerPC chipset, and specifically the vector processing instructions (especially the 'vector permute' operation). This gave a huge shortcut, allowing the Seti processing (IIRC, lots of FFTs) to do the same work in many fewer clock cycles.


GPUs operate on similar principles and are clearly the fastest hashers for Bitcoin mining. But they use a LOT of power, and the cost of electricity is rapidly outstripping mining profit. Hence miners are looking to lower-power solutions.

The FPGA approach is being actively worked on by a bunch of enthusiasts, but the FPGA boards themselves are expensive, they're not simply 'plug and play', and there's the question of whether one can legally make money mining when very expensive software licences are required to load the code onto the FPGA.

I was always impressed with the optimisations one could achieve with the PowerPC instruction set and the Altivec instructions - PowerPC has loads of registers, and the fancy 'vector permute' instruction. There's no way an old Apple G4 CPU would be a fast hash engine for BTC mining, but with massive optimisation, and new CPUs (the G4 is still produced for routers and other embedded kit - low power consumption is a priority), would a big parallel array of G4 boards be anywhere near usable for mining?


TL;DR: the old PowerPC chips Apple used (G4 onwards) had vector processing instructions. Could highly-optimised code run well for BTC mining, if one focuses on hash per watt? FPGAs will win but they have a monstrous upfront cost, whereas a load of dual-core G4 and G5 Macs can be acquired relatively cheaply. Making a bare-bones machine would consume even less power. Does anyone know - and has anyone tried writing a highly-optimised hashing function for Altivec?

...so I give in to the rhythm, the click click clack
I'm too wasted to fight back...


BTC: 1A7HvdGGDie3P5nDpiskG8JxXT33Yu6Gct
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481222021
Hero Member
*
Offline Offline

Posts: 1481222021

View Profile Personal Message (Offline)

Ignore
1481222021
Reply with quote  #2

1481222021
Report to moderator
m3sSh3aD
Sr. Member
****
Offline Offline

Activity: 322


View Profile
October 20, 2011, 01:05:57 PM
 #2

I think this will go over alot of peoples heads in this forum. ALot here for advice, not so many with, your one with Smiley

The only snag i see is that the GPU compute power just mops the flaw with the G4/G5 processor, or am i missing your point here. Your saying the g4/g5 cpu's are excellent at folding/bitmining right? but im sure there nowhere near the compute power of the latest VGA cards or are you on about been used in a FPGA? Little confused, you'll have to excuse me a little Smiley
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
October 20, 2011, 08:21:51 PM
 #3

It is unlikely PowerPC has superior integer performance.  Generally CPU are not integer performance bound because before a bunch of crazy nerds started deciding they needed to compute a billion SHA-256 hashes per second integer performance was rarely a bottleneck. 

Floating point math especially double precision floating point math is much more difficult to perform and PowerPC had better floating point efficiency.  The bad news is that doesn't really help us here.  Bitcoin = SHA-256 = 100% integer performance.  So I doubt you see superior performance w/ PowerPC architecture. 

x86 CPU have gotten more advanced floating point math able SSE3, SSE4, AVX and some of the instructions are rather powerful but are limited to floating point which doesn't help us.   I remember seeing a white paper when Intel talked about expanding the AVX instruction set to integer math.  It uses a 256bit SIMD register which would allow you to process 8x 32bit numbers in a single instruction.  If ever implemented it is possible that could speed up CPU mining but likely not enough to be superior to GPU.

GPU are just so massively parallel that even a 8x 32bit wide instructions seems pathetically narrow.  If every operation could be performed using AVX instructions theoretically you are looking at 8x performance increase but even that would only put a CPU in the low end GPU range.  More realisticly is that maybe only 20% (and that is optimistic) of operations in hash will be vectorizable so maybe we are looking at 2x current CPU performance.  The only thing I see helping CPU would be a set of dedicated SHA-256 instruction.  There are similar instructions for AES but for most applications there is no SHA-256 bottleneck.  I mean how many hashes do you really need a second.

Bitcoin just happens to be very niche use of computing hardware.  We just lucked out that the hashing algorithm chosen was GPU friendly.
catfish
Sr. Member
****
Offline Offline

Activity: 270


teh giant catfesh


View Profile
October 20, 2011, 08:43:06 PM
 #4

^^ thought so.

However, if a cheap, low-power G4 can get anywhere near a low-end GPU in terms of hash-rate... a farm of the things may be usable. But again, the more units you have, the more breakdowns, the more maintenance, etc.

Just a mad idea - incidentally the Seti leaderboard, which once was populated with Mac G5s, is now also overrun with GPU setups.

Also, I remember well the frustration that my 'supercomputer' Quad G5 felt subjectively much slower and less responsive than the very first Intel Mac (the Macbook Pro, which I bought as soon as it was announced) - all down to the integer performance, for which the Intel architecture was massively superior to the PowerPC arch.

Should have remembered that Altivec was FP, oh well another fuzzy-brained post. Cheers for the correction in the other thread too, D-A-T. I'm still sticking to my Gigabyte boards though... now I know that the board has to support 120W TDP CPUs, what's stopping me turning off all but one core, using single-channel one-DIMM-stick RAM, and underclocking and undervolting the CPU (I do this right now)... with no formal northbridge, the consumption through those two ATX12V lines will be low, and resistive losses will be correspondingly low.

I've been fighting so many other logic boards today - I'm tempted to set them all on fire and get another couple of those Gigabyte boards to stick my cheapo 2.6 GHz Intel CPUs in. They 'just work' - I bet they'd make great Hackintoshes as a result Wink

...so I give in to the rhythm, the click click clack
I'm too wasted to fight back...


BTC: 1A7HvdGGDie3P5nDpiskG8JxXT33Yu6Gct
wndrbr3d
Sr. Member
****
Offline Offline

Activity: 295


View Profile
October 20, 2011, 09:30:16 PM
 #5

Floating point math especially double precision floating point math is much more difficult to perform and PowerPC had better floating point efficiency.  The bad news is that doesn't really help us here.  Bitcoin = SHA-256 = 100% integer performance.  So I doubt you see superior performance w/ PowerPC architecture. 

TRUTH!

This is why Apple machines were considered "graphics workstations" many years ago because Intel's FP performance was complete failboat when compared to PowerPC. Obviously Intel has upped their game since then, but it's an interesting tidbit of computer history Tongue
m3sSh3aD
Sr. Member
****
Offline Offline

Activity: 322


View Profile
October 21, 2011, 08:47:37 AM
 #6

I did come across these....

http://www.ztex.de/

FPGA boards....

USB-FPGA Module 1.15x is ready to go i believe....
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
October 21, 2011, 03:18:46 PM
 #7

I did come across these....

http://www.ztex.de/

FPGA boards....

USB-FPGA Module 1.15x is ready to go i believe....

Yeah the capital cost is pretty high though.  Hard to justify although I may buy one just to check it out. 
Silverpike
Jr. Member
*
Offline Offline

Activity: 57



View Profile
October 26, 2011, 03:12:02 AM
 #8

^^ thought so.

However, if a cheap, low-power G4 can get anywhere near a low-end GPU in terms of hash-rate...

NO, not ever.  Not even close.

I'm not going to bother with the math, but architecturally the SSE2/3 instructions are vastly superior to whatever the last-generation Altivec instructions were.  A G4 wouldn't even be half as fast as a modern Intel CPU.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!