ssvb (OP)
Newbie
Offline
Activity: 39
Merit: 0
|
|
December 29, 2011, 05:47:19 AM Last edit: December 29, 2011, 06:42:16 AM by ssvb |
|
During the Christmas holidays I spent some time trying to figure out if PlayStation 3 is any good for Scrypt proof of work used by litecoin. As a result, LTC mining performance went up from ~1 khash/s to something like ~34 khash/s. My patches for jgarzik/ArtForz cpuminer are available at GitHub: https://github.com/ssvb/cpuminerEverything should build fine in Linux using the standard "./autogen.sh && ./configure && make" steps (the availability of libspe2 library and spu-elf-gcc/embedspu tools should be detected automatically by configure). Setting CFLAGS to the optimal settings "-O3 -mcpu=cell -mtune=cell -maltivec -fstrict-aliasing" before compilation provides best performance. Note: this miner requires linux to run on PS3. If you don't have linux, you can't use it. Also these optimizations should improve performance on many other PowerPC hardware by using Altivec instructions. If everything goes well, the PowerPC optimizations may be potentially merged with pooler's miner in the future. If you find any bugs, please let me know. And sorry for a short announcement, I'll try to add more information later.
|
|
|
|
michaelmclees
|
|
December 29, 2011, 10:34:38 PM |
|
During the Christmas holidays I spent some time trying to figure out if PlayStation 3 is any good for Scrypt proof of work used by litecoin. As a result, LTC mining performance went up from ~1 khash/s to something like ~34 khash/s. My patches for jgarzik/ArtForz cpuminer are available at GitHub: https://github.com/ssvb/cpuminerEverything should build fine in Linux using the standard "./autogen.sh && ./configure && make" steps (the availability of libspe2 library and spu-elf-gcc/embedspu tools should be detected automatically by configure). Setting CFLAGS to the optimal settings "-O3 -mcpu=cell -mtune=cell -maltivec -fstrict-aliasing" before compilation provides best performance. Note: this miner requires linux to run on PS3. If you don't have linux, you can't use it. Also these optimizations should improve performance on many other PowerPC hardware by using Altivec instructions. If everything goes well, the PowerPC optimizations may be potentially merged with pooler's miner in the future. If you find any bugs, please let me know. And sorry for a short announcement, I'll try to add more information later. PS3 mines at 34khps? That's quite a deal. If there's an easy way to install the miner onto the PS3, there may be millions of new users out there.
|
|
|
|
ssvb (OP)
Newbie
Offline
Activity: 39
Merit: 0
|
|
December 29, 2011, 11:33:40 PM |
|
PS3 mines at 34khps? That's quite a deal. If there's an easy way to install the miner onto the PS3, there may be millions of new users out there.
The Cell/BE optimized miner requires Linux installation running on PS3, which was initially marketed by Sony as OtherOS feature. This feature was discontinued in newer PS3 Slim models and also removed from older PS3 consoles by firmware update despite the original promise to keep it. The users were given a free choice how to cripple their PS3 functionality: forfeit OtherOS or lose the ability to play new games. I myself opted for the latter option. I guess the majority of normal users interested in games made a different choice and there are hardly millions of new users to do LTC mining on PS3 as a result. Also another side of this story is that such controversial actions from Sony encouraged a lot of hackers to break PS3 protection and recover OtherOS and even enable OtherOS on PS3 Slim at some point by using modified firmware. That's a cat and mouse game between Sony and hackers, but I'm not really tracking the news from this front. After all, my PS3 still has OtherOS supported via an old version of the official firmware. Still on a technical side, the miner should also work fine with the OtherOS from unofficial modified firmware variants developed by hackers.
|
|
|
|
mc_lovin
Legendary
Offline
Activity: 1190
Merit: 1000
www.bitcointrading.com
|
|
December 29, 2011, 11:36:31 PM |
|
Wow I was discouraged by the 3 kh/s my i7 can do, if we can pump up some real numbers, I think Litecoin has a future! I just bought nearly 2000 LTC's for 2 BTC's on BTC-E, we'll see if I look back at this post in a years' time and if that was a good decision.
|
|
|
|
ssvb (OP)
Newbie
Offline
Activity: 39
Merit: 0
|
|
December 29, 2011, 11:54:59 PM |
|
Wow I was discouraged by the 3 kh/s my i7 can do, Nowadays i7 is also not so bad at LTC mining thanks to the SSE2 optimizations done by pooler. BTW, I have bought some cheap power meter and added the data about my hardware to the Mining hardware comparison wiki page. This also includes my Intel Core i7 860 computer, which is able to do at least 25 khash/s. Still I would prefer to keep discussion focused on mining using PowerPC and PlaySatation3 hardware in this topic if we can pump up some real numbers, I think Litecoin has a future! I just bought nearly 2000 LTC's for 2 BTC's on BTC-E, we'll see if I look back at this post in a years' time and if that was a good decision. If everyone uses the best optimizations in miners, then you don't have any real advantage over the others. But it's good when the force is in balance This prevents the scenario when some bad guy keeps an optimized miner for himself and uses it together with some botnet for an extra advantage when attacking the network.
|
|
|
|
michaelmclees
|
|
December 30, 2011, 01:28:02 AM |
|
Do you think it would be possible to do a tutorial from start to finish for YouTube?
|
|
|
|
ThiagoCMC
Legendary
Offline
Activity: 1204
Merit: 1000
฿itcoin: Currency of Resistance!
|
|
December 30, 2011, 04:44:34 AM |
|
|
|
|
|
mc_lovin
Legendary
Offline
Activity: 1190
Merit: 1000
www.bitcointrading.com
|
|
December 30, 2011, 04:50:37 AM |
|
Intel Core i7 860 computer, which is able to do at least 25 khash/s. Ahh see this is where I failed, and I'm glad I came to realize it before I wasted too much more time. I had tried getting the miner to work outside of the litecoinpool browser miner and after a few failed attempts, I gave up. I guess it was just a bit of wasted electricity mining with the browser. I'm just going to buy LTC's, let you guys mine them. Still I would prefer to keep discussion focused on mining using PowerPC and PlaySatation3 hardware in this topic Agreed, sorry about the lite-threadbomb. Definitely going to be keeping an eye on this one, I'm excited to see high numbers with the Cell processor. There's a lot of PS3 clusters out there, and although it might not be profitable to run them today, in the future you might be able to pick them up for cheap and put them to work.
|
|
|
|
meti
Newbie
Offline
Activity: 28
Merit: 0
|
|
January 02, 2012, 03:06:04 PM |
|
Hi!
As i read this today i started to try it out on my old iBook G4 running Debian.
I got only 0.02 kh/s with your version. For poolers miner i got somewhere at 0.7
As i'm not familiar to what the cflags do could you please help me figure out what to do?
|
|
|
|
ssvb (OP)
Newbie
Offline
Activity: 39
Merit: 0
|
|
January 02, 2012, 04:34:11 PM |
|
As i read this today i started to try it out on my old iBook G4 running Debian. Thanks for posting your feedback, you are welcome here. I got only 0.02 kh/s with your version. For poolers miner i got somewhere at 0.7 This looks really strange. Even without the use of Altivec (SIMD instructions on PowerPC), the results should be maybe at most 20-30% slower than pooler's. But with the use of Altivec it should be several times faster. As i'm not familiar to what the cflags do could you please help me figure out what to do? You can try something like this: $ git clone git://github.com/ssvb/cpuminer.git $ cd cpuminer $ export CFLAGS="-O3 -mcpu=G4 -maltivec -fstrict-aliasing" $ ./autogen.sh && ./configure && make
The -mcpu and -maltivec options are needed to enable PowerPC specific optimizations for your processor. Otherwise it just runs a slow C implementation.
|
|
|
|
meti
Newbie
Offline
Activity: 28
Merit: 0
|
|
January 02, 2012, 06:34:14 PM |
|
Hm i did as you told me but got nearly the same result. Now i'm at 0.04kh/s If it's too complicated/time-consuming for you to look into it i understand as i think nearly nobody has G4 hardware anymore (especially running Debian instead of OsX i think but i lost the Installation CD and it felt boring slow with 10.3 ) but if you are interested i'll keep on testing Here is the Terminal output - maybe it helps. user@iBookG4:~$ cd Downloads user@iBookG4:~/Downloads$ ls cgminer-2.0.6 cgminer-2.0.7 libspe2-2_2.2.80-95-1_powerpc.deb cgminer-2.0.6.tar.bz2 cgminer-2.0.7.tar.bz2 pooler user@iBookG4:~/Downloads$ git clone git://github.com/ssvb/cpuminer.git Cloning into cpuminer... remote: Counting objects: 741, done. remote: Compressing objects: 100% (337/337), done. remote: Total 741 (delta 475), reused 646 (delta 400) Receiving objects: 100% (741/741), 199.86 KiB | 326 KiB/s, done. Resolving deltas: 100% (475/475), done. user@iBookG4:~/Downloads$ cd cpuminer user@iBookG4:~/Downloads/cpuminer$ ls AUTHORS COPYING miner.h scrypt-cell-spu.h autogen.sh cpu-miner.c mknsis.sh scrypt-simd-helpers.h ChangeLog elist.h NEWS sha256-helpers.h compat example-cfg.json README util.c compat.h LICENSE scrypt.c configure.ac Makefile.am scrypt-cell-spu.c user@iBookG4:~/Downloads/cpuminer$ export CFLAGS="-03 -mcpu=G4 -maltivec -fstrict-aliasing" user@iBookG4:~/Downloads/cpuminer$ ./autogen.sh && ./configure && make configure.ac:15: installing `./compile' configure.ac:4: installing `./config.guess' configure.ac:4: installing `./config.sub' configure.ac:6: installing `./install-sh' configure.ac:6: installing `./missing' compat/jansson/Makefile.am: installing `./depcomp' Makefile.am: installing `./INSTALL' checking build system type... powerpc-unknown-linux-gnu checking host system type... powerpc-unknown-linux-gnu checking target system type... powerpc-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking whether gcc needs -traditional... no checking whether gcc and cc understand -c and -o together... yes checking for ranlib... ranlib checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for working alloca.h... yes checking for alloca... yes checking for spe_context_create in -lspe2... no checking for spu-elf-gcc... no checking for spu-gcc... spu-gcc checking for embedspu... embedspu checking for json_loads in -ljansson... no checking for pthread_create in -lpthread... yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for gawk... (cached) gawk checking for curl-config... /usr/bin/curl-config checking for the version of libcurl... 7.21.0 checking for libcurl >= version 7.10.1... yes checking whether libcurl is usable... yes checking for curl_free... yes configure: creating ./config.status config.status: creating Makefile config.status: creating compat/Makefile config.status: creating compat/jansson/Makefile config.status: creating cpuminer-config.h config.status: executing depfiles commands make all-recursive make[1]: Entering directory `/home/user/Downloads/cpuminer' Making all in compat make[2]: Entering directory `/home/user/Downloads/cpuminer/compat' Making all in jansson make[3]: Entering directory `/home/user/Downloads/cpuminer/compat/jansson' gcc -DHAVE_CONFIG_H -I. -I../.. -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT dump.o -MD -MP -MF .deps/dump.Tpo -c -o dump.o dump.c gcc: unrecognized option '-03' mv -f .deps/dump.Tpo .deps/dump.Po gcc -DHAVE_CONFIG_H -I. -I../.. -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT hashtable.o -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.o hashtable.c gcc: unrecognized option '-03' mv -f .deps/hashtable.Tpo .deps/hashtable.Po gcc -DHAVE_CONFIG_H -I. -I../.. -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT load.o -MD -MP -MF .deps/load.Tpo -c -o load.o load.c gcc: unrecognized option '-03' mv -f .deps/load.Tpo .deps/load.Po gcc -DHAVE_CONFIG_H -I. -I../.. -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT strbuffer.o -MD -MP -MF .deps/strbuffer.Tpo -c -o strbuffer.o strbuffer.c gcc: unrecognized option '-03' mv -f .deps/strbuffer.Tpo .deps/strbuffer.Po gcc -DHAVE_CONFIG_H -I. -I../.. -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT utf.o -MD -MP -MF .deps/utf.Tpo -c -o utf.o utf.c gcc: unrecognized option '-03' mv -f .deps/utf.Tpo .deps/utf.Po gcc -DHAVE_CONFIG_H -I. -I../.. -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT value.o -MD -MP -MF .deps/value.Tpo -c -o value.o value.c gcc: unrecognized option '-03' mv -f .deps/value.Tpo .deps/value.Po rm -f libjansson.a ar cru libjansson.a dump.o hashtable.o load.o strbuffer.o utf.o value.o ranlib libjansson.a make[3]: Leaving directory `/home/user/Downloads/cpuminer/compat/jansson' make[3]: Entering directory `/home/user/Downloads/cpuminer/compat' make[3]: Für das Ziel »all-am« ist nichts zu tun. make[3]: Leaving directory `/home/user/Downloads/cpuminer/compat' make[2]: Leaving directory `/home/user/Downloads/cpuminer/compat' make[2]: Entering directory `/home/user/Downloads/cpuminer' gcc -DHAVE_CONFIG_H -I. -pthread -I./compat/jansson -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT minerd-cpu-miner.o -MD -MP -MF .deps/minerd-cpu-miner.Tpo -c -o minerd-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c gcc: unrecognized option '-03' mv -f .deps/minerd-cpu-miner.Tpo .deps/minerd-cpu-miner.Po gcc -DHAVE_CONFIG_H -I. -pthread -I./compat/jansson -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT minerd-util.o -MD -MP -MF .deps/minerd-util.Tpo -c -o minerd-util.o `test -f 'util.c' || echo './'`util.c gcc: unrecognized option '-03' mv -f .deps/minerd-util.Tpo .deps/minerd-util.Po gcc -DHAVE_CONFIG_H -I. -pthread -I./compat/jansson -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT minerd-scrypt.o -MD -MP -MF .deps/minerd-scrypt.Tpo -c -o minerd-scrypt.o `test -f 'scrypt.c' || echo './'`scrypt.c gcc: unrecognized option '-03' mv -f .deps/minerd-scrypt.Tpo .deps/minerd-scrypt.Po gcc -03 -mcpu=G4 -maltivec -fstrict-aliasing -pthread -o minerd minerd-cpu-miner.o minerd-util.o minerd-scrypt.o -lcurl compat/jansson/libjansson.a -lpthread gcc: unrecognized option '-03' make[2]: Leaving directory `/home/user/Downloads/cpuminer' make[1]: Leaving directory `/home/user/Downloads/cpuminer' user@iBookG4:~/Downloads/cpuminer$ ls aclocal.m4 config.sub install-sh mknsis.sh AUTHORS configure LICENSE NEWS autogen.sh configure.ac Makefile README autom4te.cache COPYING Makefile.am scrypt.c ChangeLog cpu-miner.c Makefile.in scrypt-cell-spu.c compat cpuminer-config.h minerd scrypt-cell-spu.h compat.h cpuminer-config.h.in minerd-cpu-miner.o scrypt-simd-helpers.h compile depcomp minerd-scrypt.o sha256-helpers.h config.guess elist.h minerd-util.o stamp-h1 config.log example-cfg.json miner.h util.c config.status INSTALL missing user@iBookG4:~/Downloads/cpuminer$ ./minerd --userpass meti.2:2 --url http://litecoinpool.org:9332 --algo scrypt [2012-01-02 19:17:27] Binding thread 0 to cpu 0 [2012-01-02 19:17:27] Long-polling activated for http://litecoinpool.org:9332/LP [2012-01-02 19:17:28] 1 miner threads started, using SHA256 'scrypt' algorithm. [2012-01-02 19:17:31] LONGPOLL detected new block [2012-01-02 19:17:31] thread 0: 144 hashes, 0.04 khash/sec [2012-01-02 19:18:00] LONGPOLL detected new block [2012-01-02 19:18:00] thread 0: 1306 hashes, 0.04 khash/sec [2012-01-02 19:18:11] LONGPOLL detected new block [2012-01-02 19:18:12] thread 0: 488 hashes, 0.04 khash/sec [2012-01-02 19:19:12] thread 0: 2651 hashes, 0.04 khash/sec [2012-01-02 19:20:12] thread 0: 2661 hashes, 0.04 khash/sec [2012-01-02 19:21:16] thread 0: 2659 hashes, 0.04 khash/sec
Thanks for the quick reply btw!
|
|
|
|
ssvb (OP)
Newbie
Offline
Activity: 39
Merit: 0
|
|
January 02, 2012, 07:14:11 PM |
|
Thanks for providing the log. The "gcc: unrecognized option '-03'" error message explains everything. We want -O3 option, written as "minus big-o three" and not "minus zero three" (which means 'O'ptimization level '3'). And because the compiler does not recognize the invalid -03 option, all the optimizations get disabled completely and the performance is totally screwed up. Copy/paste is safer than typing
|
|
|
|
meti
Newbie
Offline
Activity: 28
Merit: 0
|
|
January 02, 2012, 07:21:55 PM |
|
Omg i just saw it myself... well i'm not surfing the web on the ibook therefore no copy&paste thanks let's see what it will do! Now it's about 1.60!!
|
|
|
|
ssvb (OP)
Newbie
Offline
Activity: 39
Merit: 0
|
|
January 02, 2012, 07:47:43 PM |
|
Now it's about 1.60!!
Thanks. By the way, what is the MHz rating of this iBook? Would it be a good idea to add your benchmark data to the mining-hardware-comparison page?
|
|
|
|
meti
Newbie
Offline
Activity: 28
Merit: 0
|
|
January 02, 2012, 08:14:38 PM Last edit: January 02, 2012, 08:25:16 PM by meti |
|
Can you do that for me as i don't see an option there to add data.
cat /proc/cpuinfo gives me
cpu: 7447A, altivec supported clock: 1066,666 MHz revision 1.1 bogomips: 73.72 model: PowerBook6,5 L2 cache: 512K unified
I can't measure the power consumption.
Cores: 1
Command line arguments: none
OS: Debian Squeeze ppc
Model: iBook G4 1Ghz
kHash/s: 1,66
miner: Cell/BE optimized cpuminer
Edit: my main system isn't in the list too... Its a MacBook Pro 6,2 (Mid 2010) 2,53 GHz Intel Core i5 (I5-540M) 2 Cores (4 with HT) OS: Mac OsX 10.7.2 kHash/s: 11,7 miner: Poolers optimized miner
|
|
|
|
caston
|
|
January 03, 2012, 06:34:14 AM |
|
What kind of hash rate would we get on the xbox 360?
|
bitcoin BTC: 1MikVUu1DauWB33T5diyforbQjTWJ9D4RF bitcoin cash: 1JdkCGuW4LSgqYiM6QS7zTzAttD9MNAsiK
-updated 3rd December 2017
|
|
|
meti
Newbie
Offline
Activity: 28
Merit: 0
|
|
January 03, 2012, 07:21:48 AM |
|
That was my 2nd thought too I have One but it isn't the type that can run Linux. Maybe i can find a cheap One at eBay I think it would be quite good as it has 3 cores at 3,2ghz.
|
|
|
|
ZedZedNova
Sr. Member
Offline
Activity: 475
Merit: 265
Ooh La La, C'est Zoom!
|
|
January 03, 2012, 07:15:31 PM |
|
Hey Folks, I have access to a pair of PowerMac G5 machines. I don't know the specific model(s) yet, but I found out that Ubuntu 11.10 will run on them with a little effort. I'll be trying to install a persistent USB build for them and get them running. Once I have done that, and installed a few libraries and tools, I'll download and try to build pooler's most up-to-date/optimized miner. If that fails, I'll download an run the one mentioned here. Cheers, - Zed
|
No mining at the moment.
|
|
|
meti
Newbie
Offline
Activity: 28
Merit: 0
|
|
January 04, 2012, 09:21:22 AM |
|
Hey Folks, I have access to a pair of PowerMac G5 machines. I don't know the specific model(s) yet, but I found out that Ubuntu 11.10 will run on them with a little effort. I'll be trying to install a persistent USB build for them and get them running. Once I have done that, and installed a few libraries and tools, I'll download and try to build pooler's most up-to-date/optimized miner. If that fails, I'll download an run the one mentioned here. Cheers, - Zed I think pooler's optimized miner is optimized especially for Intel processors. You'll probably have more kh/s with the one from ssvb.
|
|
|
|
ZedZedNova
Sr. Member
Offline
Activity: 475
Merit: 265
Ooh La La, C'est Zoom!
|
|
January 07, 2012, 05:50:02 AM |
|
I think pooler's optimized miner is optimized especially for Intel processors. You'll probably have more kh/s with the one from ssvb.
More specifically it is x86 instruction set optimized assembly code something that will never apply to a PPC machine. You are both right, re: pooler's optimizations. I was thinking just about the hash rate increases, and not that the optimizations are Intel and now AMD specific. I still have the G5 machines, but have had no time to do anything since I posted that message on 3-Jan. Hopefully I can burn a few cycles this weekend and get the machines running, although the fans on those suckers are fscking loud. Even the two IBM X3650M2s I had running over the holidays weren't as loud as just one of the PowerMac G5s ... - Zed
|
No mining at the moment.
|
|
|
|