Bitcoin Forum
November 06, 2024, 04:06:18 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 »
  Print  
Author Topic: New demonstration CPU miner available  (Read 386311 times)
jgarzik (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 1100


View Profile
March 03, 2011, 10:32:48 PM
 #221

Probably because there's a whole JSON parser that's part of the miner...so might as well reuse the code!

Bingo.


Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
March 03, 2011, 10:55:16 PM
 #222

If anybody is interested, this is the assembly code from Intel Compiler which gives me the fastest 4way code on AMD K10. 1.13 GH/s per 1 GHz per physical core.
https://gist.github.com/853566
Compile cpuminer-0.7.1, download the above code, issue:
gcc -c sha256_4way.s
and do make again to link the object file to the executable.  It's about 7% faster than the gcc version.

1.13 GH/s ?!?

Raulo
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
March 03, 2011, 11:30:10 PM
 #223

1.13 GH/s ?!?

1.13MH/s, of course. Sorry.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
smgoller
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
March 03, 2011, 11:47:54 PM
 #224

Just tried to run 0.7.1 on a q6600, ubuntu 10.10 32-bit, and got segfaults when i tried to run cryptopp_asm32. Tried compiling from git, same result. Any thoughts?
myrkul
Hero Member
*****
Offline Offline

Activity: 532
Merit: 500


FIAT LIBERTAS RVAT CAELVM


View Profile WWW
March 04, 2011, 12:02:08 AM
 #225

Just tried to run 0.7.1 on a q6600, ubuntu 10.10 32-bit, and got segfaults when i tried to run cryptopp_asm32. Tried compiling from git, same result. Any thoughts?

check your options. I had that happen to me when I had a malformed url in there... mining.bitboin.cz. Wink

BTC1MYRkuLv4XPBa6bGnYAronz55grPAGcxja
Need Dispute resolution? Public Key ID: 0x11D341CF
No person has the right to initiate force, threat of force, or fraud against another person or their property. VIM VI REPELLERE LICET
decibel
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 04, 2011, 06:00:41 AM
 #226

Patch for successfull compilation of minerd under FreeBSD:

Expanding on hangover's work; I had to also patch cpu-miner.c and util.c. Complete patch-set is:
Code:
diff -u cpuminer-0.7.1.orig/cpu-miner.c cpuminer-0.7.1/cpu-miner.c
--- cpuminer-0.7.1.orig/cpu-miner.c     2011-02-17 00:54:45.000000000 -0600
+++ cpuminer-0.7.1/cpu-miner.c  2011-03-03 23:38:39.000000000 -0600
@@ -24,7 +24,7 @@
 #include <pthread.h>
 #include <getopt.h>
 #include <jansson.h>
-#include <curl/curl.h>
+#include </usr/local/include/curl/curl.h>
 #include "compat.h"
 #include "miner.h"
 
diff -u cpuminer-0.7.1.orig/miner.h cpuminer-0.7.1/miner.h
--- cpuminer-0.7.1.orig/miner.h 2011-02-17 00:20:34.000000000 -0600
+++ cpuminer-0.7.1/miner.h      2011-03-03 23:28:11.000000000 -0600
@@ -5,7 +5,7 @@
 #include <stdint.h>
 #include <sys/time.h>
 #include <jansson.h>
-#include <curl/curl.h>
+#include </usr/local/include/curl/curl.h>
 
 #ifdef __SSE2__
 #define WANT_SSE2_4WAY 1
@@ -18,7 +18,12 @@
 #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
 #define WANT_BUILTIN_BSWAP
 #else
-#include <byteswap.h>
+/* #include <byteswap.h> */  // <-- doesn't exist under FreeBSD
+# define bswap_64 __bswap64
+# define bswap_32 __bswap32
+# define bswap_16 __bswap16
+# define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN)
+#include <sys/endian.h>
 #endif
 
 #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
Only in cpuminer-0.7.1: patch
diff -u cpuminer-0.7.1.orig/util.c cpuminer-0.7.1/util.c
--- cpuminer-0.7.1.orig/util.c  2011-03-02 21:06:20.000000000 -0600
+++ cpuminer-0.7.1/util.c       2011-03-03 23:42:56.000000000 -0600
@@ -15,7 +15,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <jansson.h>
-#include <curl/curl.h>
+#include </usr/local/include/curl/curl.h>
 #include "miner.h"
 
 struct data_buffer {
adv
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
March 08, 2011, 05:07:33 AM
 #227

I build debian package 0.7.1 for SPARC architectures (sparc64).

Unfortunately it's more of a test assembly, as on Sun Enterprise 250 (2 * 400MHz) I managed to achieve maximum performance: ~87Khps with "--algo c" and ~81Kps with "--algo cryptopp". Algorithms foк via, 4waySSE2 and cryptopp_asm32 on this architecture is not available. :^(

Some tech info:
Code:
uname -a
Linux debsparc 2.6.32-5-sparc64-smp #1 SMP Wed Jan 12 05:23:55 UTC 2011 sparc64 GNU/Linux

Code:
 cat /proc/cpuinfo
cpu             : TI UltraSparc II  (BlackBird)
fpu             : UltraSparc II integrated FPU
pmu             : ultra12
prom            : OBP 3.22.0 2000/12/20 16:20
type            : sun4u
ncpus probed    : 2
ncpus active    : 2
D$ parity tl1   : 0
I$ parity tl1   : 0
Cpu0ClkTck      : 0000000017d78400
Cpu1ClkTck      : 0000000017d78400
MMU Type        : Spitfire
State:
CPU0:           online
CPU1:           online

Command line:
Code:
btc-cpuminer --url http://192.168.1.1:8334 -r -1 -D -s 5 --threads=2
.....
HashMeter(1): 462143 hashes, 84.75 khash/sec
HashMeter(0): 462143 hashes, 86.89 khash/sec
HashMeter(1): 462143 hashes, 84.75 khash/sec
HashMeter(0): 462143 hashes, 86.80 khash/sec

2 cpu's load at 80-100% by 3 btc-cpuminer threads.

System load: 2.09 2.02 1.74

Is there any hope for improvement in performance for this architecture?


Discussion of issues related to the Debian packages is welcome in this thread: http://bitcointalk.org/index.php?topic=2207

U may thank me here: 14Js1ng1SvYBPgUJnjNAEPYH4d6SHF79UF
jgarzik (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 1100


View Profile
March 09, 2011, 01:29:03 AM
 #228


Call for hacking:

Anybody want to volunteer to add server failover support to cpuminer?  (m0mchil's miner, too...)

Server failure should not interrupt mining [much], ideally.


Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
TurdHurdur
Full Member
***
Offline Offline

Activity: 216
Merit: 100


View Profile
March 09, 2011, 12:14:46 PM
 #229


Call for hacking:

Anybody want to volunteer to add server failover support to cpuminer?  (m0mchil's miner, too...)

Server failure should not interrupt mining [much], ideally.


Hah, you're going to make my script do a double-take. Tongue
mtve
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile WWW
March 10, 2011, 01:32:43 PM
Last edit: March 11, 2011, 02:40:54 PM by mtve
 #230

I build debian package 0.7.1 for SPARC architectures (sparc64).
just of curiosity, small performance test here:

sun fire v120 (sun4u), sparcv9 650 MHz - 109.6 Khash/s
sun netra t2000 (sun4v), sparcv9 1.2 GHz - 117.4 Khash/s (strange)

second box has 32 virtual cpus, so supposedly it can do 3.7 Mhash/s total.

yes, cryptopp speed is around 82% of c's.

i've managed to compile only 32bit binary of cpuminer, hope it does not beat performance too much.

Quote
Is there any hope for improvement in performance for this architecture?
There is ncp crypto provider in UltraSPARC T1, but it accelerates only RSA (really good).
UltraSPARC T2 with n2cp should help to SHA256.

Would somebody with T2 play with http://frox25.no-ip.org/~mtve/tmp/sun_pkcs11_sha256.c please?   On T1 it's around 58 Khash/s.

Update: from http://cs.anu.edu.au/student/projects/10S2/Reports/Cody%20Christopher.pdf it can be concluded that for 32 bytes (one block of SHA256) and for 64 bytes (full bitcoin block) without special efforts it will be slower than CPU.
lucky
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
March 12, 2011, 05:08:38 AM
 #231

0.7.1 fails to build on Mac OS X 10.6.6...

I went with % ./configure ; make

and :

Code:
joel@baldur:~/cpuminer-0.7.1% make
make  all-recursive
Making all in compat
Making all in jansson
gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT dump.o -MD -MP -MF .deps/dump.Tpo -c -o dump.o dump.c
mv -f .deps/dump.Tpo .deps/dump.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT hashtable.o -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.o hashtable.c
mv -f .deps/hashtable.Tpo .deps/hashtable.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT load.o -MD -MP -MF .deps/load.Tpo -c -o load.o load.c
mv -f .deps/load.Tpo .deps/load.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT strbuffer.o -MD -MP -MF .deps/strbuffer.Tpo -c -o strbuffer.o strbuffer.c
mv -f .deps/strbuffer.Tpo .deps/strbuffer.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT utf.o -MD -MP -MF .deps/utf.Tpo -c -o utf.o utf.c
mv -f .deps/utf.Tpo .deps/utf.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT value.o -MD -MP -MF .deps/value.Tpo -c -o value.o value.c
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]: Nothing to be done for `all-am'.
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson    -g -O2 -MT cpu-miner.o -MD -MP -MF .deps/cpu-miner.Tpo -c -o cpu-miner.o cpu-miner.c
In file included from cpu-miner.c:29:
miner.h:21:22: error: byteswap.h: No such file or directory
make[2]: *** [cpu-miner.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
joel@baldur:~/cpuminer-0.7.1%
jgarzik (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 1100


View Profile
March 12, 2011, 05:25:44 AM
 #232

Yep, OSX is known broken at this time.  Waiting for someone to fix it, in a way that doesn't break everyone else's build...

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
mrballcb
Newbie
*
Offline Offline

Activity: 10
Merit: 0



View Profile
March 12, 2011, 04:06:23 PM
 #233

Yep, OSX is known broken at this time.  Waiting for someone to fix it, in a way that doesn't break everyone else's build...
There was a guy on IRC last week building your miner who made a quick change per some post he found via google that got byteswap to work.  I'll dig and see if I can find it.

Regards...      Todd
mrballcb
Newbie
*
Offline Offline

Activity: 10
Merit: 0



View Profile
March 12, 2011, 04:15:43 PM
 #234

Yep, OSX is known broken at this time.  Waiting for someone to fix it, in a way that doesn't break everyone else's build...
There was a guy on IRC last week building your miner who made a quick change per some post he found via google that got byteswap to work.  I'll dig and see if I can find it.

Regards...      Todd
Some asshat came into the channel and trolled the entire freakin channel on Thu and wiped out all my scrollback (gotta remember to increase that on Monday).  But was able to find the post he was talking about.  From http://www.mail-archive.com/barry-devel@lists.sourceforge.net/msg00113.html , there is a link to this commit that defines it inline if OSX is detected:  http://lists.freedesktop.org/archives/xorg-commit/2007-January/010041.html

Regards...     Todd
fatalfurry
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 13, 2011, 01:05:16 PM
 #235

Is there a way of adding or removing threads on the fly? I like running it with three threads on my 4 core processor but when I'm doing something a little more intense I would want to throttle it down to two or one thread.
jgarzik (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 1100


View Profile
March 15, 2011, 03:46:47 AM
 #236

Version 0.7.2 is released.  Changes:

- Add port of ufasoft's sse2 assembly implementation (Linux only)
  This is a substantial speed improvement on Intel CPUs.

  Big thanks to mmarker/chromicant for this work.

- Move all JSON-RPC I/O to separate thread.  This reduces the
  number of HTTP connections from one-per-thread to one, reducing resource
  usage on upstream bitcoind / pool server.

  This is prepartion for adding long-polling support.

See top of thread for URLs and info.

SHA1: 2673c5f5c2cd85acc332a9c8a1f48415b8dd0fc9  cpuminer-installer-0.7.2.zip
MD5: 24211f26b1d6b0c68fe696662b3082e7  cpuminer-installer-0.7.2.zip

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
gbl4ck
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
March 16, 2011, 05:09:02 AM
 #237

Quick question on estimating my hash rate....  I'm currently running 12 threads and each is running @ ~1400 khash/sec.  Each line looks like:

HashMeter(0): 8288293 hashes, 1455.67 khash/sec
HashMeter(4): 7778834 hashes, 1462.78 khash/sec
HashMeter(11): 8287566 hashes, 1505.17 khash/sec
etc for the rest of the threads (one for each logical processor)

So would my total CPU rate be ~16800 khash/sec?
jgarzik (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 1100


View Profile
March 16, 2011, 05:20:31 AM
 #238

So would my total CPU rate be ~16800 khash/sec?

Yes, that's correct.  HashMeter output is per-thread, not a total for all threads.

Do you really have a 12-core?  If not, I bet you could do better with fewer threads and perhaps another algo.


Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
gbl4ck
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
March 16, 2011, 05:42:22 AM
 #239

So would my total CPU rate be ~16800 khash/sec?

Yes, that's correct.  HashMeter output is per-thread, not a total for all threads.

Do you really have a 12-core?  If not, I bet you could do better with fewer threads and perhaps another algo.



Not 12 cores but 6 cores with HT on.  I did just realize tho that running it like this is killing my GPU processing which i'm using poclbm-gui.  I was around 80 Mhash/s but now it drops down to around 30 and will jump to 60 but is very inconsistant. 
gbl4ck
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
March 16, 2011, 05:46:46 AM
 #240

Looks like I found a better combo.  I'm still using the 4way algo but I dropped the threads down to 6.  Now all 6 threads are around 2000 khash/s but my GPU is staying steady at 85 Mhash/s.

edit - According to taskmanager i'm only using 50% CPU so maybe I'm not yet in the sweet spot and need to try another algo... i'm running a i7 980x
Pages: « 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 »
  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!