Pages:
Author

Topic: An (even more) optimized version of cpuminer (pooler's cpuminer, CPU-only) - page 55. (Read 1958546 times)

hero member
Activity: 770
Merit: 502

Well, to be honest I doubt RAM can affect the miner's performance. All the memory used by the miner should fit into L2 cache.

I am not speaking of memory in terms but talking about the memory timings, tighter-lower ram timings = greater performance in any application Smiley.

If you have several different sticks of ram "value to performance" and test it with the same processor, I bet you will see a noticable increase of mining with performance ram.
hero member
Activity: 845
Merit: 507
Could you add this switch to the OP? "--algo scrypt" stating this is the correct switch to use with litecoin & not to use the --algo sha256d.

"--algo scrypt" is the default, you don't need to specify it. The "--algo sha256d" option was only added in version 2.2.


Quote
Other than that I am mining at 20 KH/s with my i3-2100 & I am sure the ram helps a lot which I got tight timings ram which is this set here F3-12800CL8D-8GBXM, set @ 8-8-8-23 in the bios.

Well, to be honest I doubt RAM can affect the miner's performance. All the memory used by the miner should fit into L2 cache.
hero member
Activity: 770
Merit: 502
Is this normal?

[...]

Using
minerd.exe --url http://lc.ozco.in:9332/ --userpass *removed*.*removed*:*removed* --threads 4 --algo sha256d

You are connecting to a Litecoin pool (lc.ozco.in) but then you tell the miner to use the Bitcoin algorithm (--algo sha256d) instead of the Litecoin one.
Please make up your mind.

It is important to understand that the --algo option doesn't work the same way as it did in the original cpuminer by jgarzik. In the original version you had a bunch of implementations of the same algorithm (SHA-256d) to choose from, while here you have two completely different algorithms, which are not interchangeable. If you try to use "--algo=sha256d" to mine Litecoins all you will get is invalid shares.


Like stated, I've never litecoin mined, I am new to it, meaning new to know what the switches are for.

I was using the "--algo=sha256d" because from a small look at the end of this thread was the only switch I found.

Could you add this switch to the OP? "--algo scrypt" stating this is the correct switch to use with litecoin & not to use the --algo sha256d.

Other than that I am mining at 20 KH/s with my i3-2100 & I am sure the ram helps a lot which I got tight timings ram which is this set here F3-12800CL8D-8GBXM, set @ 8-8-8-23 in the bios. Using
Code:
minerd.exe --url http://lc.ozco.in:9332/ --userpass ajshdjshajsh.1:1234 --threads 4 --algo scrypt
.

Thanks, Pooler for this lovely program for ones that cannot GPU mine bitcoins. Two thumbs up.
hero member
Activity: 845
Merit: 507
Is this normal?

[...]

Using
minerd.exe --url http://lc.ozco.in:9332/ --userpass *removed*.*removed*:*removed* --threads 4 --algo sha256d

You are connecting to a Litecoin pool (lc.ozco.in) but then you tell the miner to use the Bitcoin algorithm (--algo sha256d) instead of the Litecoin one.
Please make up your mind.

It is important to understand that the --algo option doesn't work the same way as it did in the original cpuminer by jgarzik. In the original version you had a bunch of implementations of the same algorithm (SHA-256d) to choose from, while here you have two completely different algorithms, which are not interchangeable. If you try to use "--algo=sha256d" to mine Litecoins all you will get is invalid shares.
hero member
Activity: 770
Merit: 502
I had the same problem with sha256d. You want to use "--algo scrypt".

Fantastic.

Wroking very well now, Yay!!!
Code:
[2012-06-02 22:02:23] thread 1: 2904 hashes, 4.90 khash/s
[2012-06-02 22:02:23] accepted: 32/32 (100.00%), 20.32 khash/s (yay!!!)
[2012-06-02 22:02:25] thread 1: 8148 hashes, 5.07 khash/s
[2012-06-02 22:02:25] accepted: 33/33 (100.00%), 20.49 khash/s (yay!!!)
[2012-06-02 22:02:25] thread 3: 57864 hashes, 5.18 khash/s
[2012-06-02 22:02:25] accepted: 34/34 (100.00%), 20.49 khash/s (yay!!!)
[2012-06-02 22:02:27] thread 3: 12840 hashes, 5.18 khash/s
[2012-06-02 22:02:27] accepted: 35/35 (100.00%), 20.48 khash/s (yay!!!)
[2012-06-02 22:02:29] thread 2: 59988 hashes, 5.15 khash/s
[2012-06-02 22:02:29] accepted: 36/36 (100.00%), 20.52 khash/s (yay!!!)
[2012-06-02 22:02:30] thread 0: 136968 hashes, 5.17 khash/s
[2012-06-02 22:02:30] accepted: 37/37 (100.00%), 20.56 khash/s (yay!!!)
[2012-06-02 22:02:31] thread 1: 28932 hashes, 4.65 khash/s
[2012-06-02 22:02:31] accepted: 38/38 (100.00%), 20.14 khash/s (yay!!!)
[2012-06-02 22:02:32] thread 3: 24156 hashes, 5.18 khash/s
[2012-06-02 22:02:32] accepted: 39/39 (100.00%), 20.14 khash/s (yay!!!)
[2012-06-02 22:02:43] thread 2: 72012 hashes, 5.13 khash/s
[2012-06-02 22:02:43] accepted: 40/40 (100.00%), 20.12 khash/s (yay!!!)
sr. member
Activity: 294
Merit: 250
Bitcoin today is what the internet was in 1998.
Using the latest Pooler Win x64.

Is the Pooler suppose to go on and off?

At first, both of my cores and two of my threads are mining away, then I see a mode where pooler goes into which is a bunch of accepted and I don't see the cpu utilized again for another 3 minutes or so maybe 5 minutes and repeat through out the same.

Is this normal?

CPU@not utilized.


Using
minerd.exe --url http://lc.ozco.in:9332/ --userpass *removed*.*removed*:*removed* --threads 4 --algo sha256d


I had the same problem with sha256d. You want to use "--algo scrypt".
hero member
Activity: 770
Merit: 502
Using the latest Pooler Win x64.

Is the Pooler suppose to go on and off?

At first, both of my cores and two of my threads are mining away, then I see a mode where pooler goes into which is a bunch of accepted and I don't see the cpu utilized again for another 3 minutes or so maybe 5 minutes and repeat through out the same.

Is this normal?

CPU@not utilized.


Using
minerd.exe --url http://lc.ozco.in:9332/ --userpass *removed*.*removed*:*removed* --threads 4 --algo sha256d
hero member
Activity: 845
Merit: 507
adding the --algo sha256d fixed it

With the sha256d algorithm all speed improvement I was getting with the new version mining litecoins using scrypt is now lost.

from just below
28,000 khash/s
to about
15,000 khash/s

I think that should be about 28 khash/s for scrypt, not 28,000 khash/s... which makes it not 2 times faster but 500 times slower. That is perfectly normal, since scrypt is a much more complex algorithm than SHA-256d.

Just for the sake of clarity, let me add that either you mine litecoins using scrypt, or you mine bitcoins using SHA-256d. You cannot (and there is no reason to) do both at the same time with just one instance of the miner.
sr. member
Activity: 271
Merit: 250
adding the --algo sha256d fixed it

With the sha256d algorithm all speed improvement I was getting with the new version mining litecoins using scrypt is now lost.

from just below
28,000 khash/s
to about
15,000 khash/s
hero member
Activity: 845
Merit: 507
So I removed the --quiet parameter and can now see the separate threads and the speed per thread.

I am not getting any work accepted though. I check my stats with the pool and it shows no shares being accepted either.

As pieppiep remarked, you need to use --algo=sha256d (or the equivalent short option -a sha256d) for mining bitcoins, otherwise the miner will default to scrypt.
sr. member
Activity: 271
Merit: 250
So I removed the --quiet parameter and can now see the separate threads and the speed per thread.

I am not getting any work accepted though. I check my stats with the pool and it shows no shares being accepted either.

This happens for both a Q9650 and also a Q9400, both running windows 7.

Very nice improvement by the way, the speeds showing here are the same when mining litecoin. Nearly doubled for both processors from a 2.1 version I had used previously

Quote
C:\minerd>minerd.exe --url http://pool_I_use.com:8337 --userpass
 XXX:XXX --threads 4 --debug
[2012-05-25 16:14:39] 4 miner threads started, using 'scrypt' algorithm.
[2012-05-25 16:14:39] Long-polling activated for http://pool_I_use.com:8337/LP

[2012-05-25 16:14:39] DEBUG: got new work
[2012-05-25 16:14:40] thread 1: 4104 hashes, 6.86 khash/s
[2012-05-25 16:14:40] thread 2: 4104 hashes, 6.86 khash/s
[2012-05-25 16:14:40] thread 0: 4104 hashes, 6.83 khash/s
[2012-05-25 16:14:40] thread 3: 4104 hashes, 5.59 khash/s
[2012-05-25 16:15:38] thread 3: 329868 hashes, 5.71 khash/s
[2012-05-25 16:15:38] DEBUG: got new work
[2012-05-25 16:15:38] thread 1: 404892 hashes, 6.95 khash/s
[2012-05-25 16:15:38] thread 0: 402876 hashes, 6.91 khash/s
[2012-05-25 16:15:38] thread 2: 404892 hashes, 6.92 khash/s
[2012-05-25 16:16:27] thread 3: 342516 hashes, 6.87 khash/s
[2012-05-25 16:16:27] DEBUG: got new work
[2012-05-25 16:16:38] thread 0: 414312 hashes, 6.92 khash/s
[2012-05-25 16:16:38] thread 2: 415320 hashes, 6.90 khash/s
[2012-05-25 16:16:48] thread 1: 417096 hashes, 5.93 khash/s
[2012-05-25 16:17:22] thread 1: 231288 hashes, 6.80 khash/s
[2012-05-25 16:17:22] DEBUG: got new work
[2012-05-25 16:17:27] thread 0: 339264 hashes, 6.88 khash/s
[2012-05-25 16:17:27] thread 2: 337896 hashes, 6.90 khash/s
[2012-05-25 16:17:45] thread 3: 412272 hashes, 5.34 khash/s
[2012-05-25 16:18:22] thread 0: 378384 hashes, 6.91 khash/s
[2012-05-25 16:18:22] DEBUG: got new work
[2012-05-25 16:18:24] thread 2: 379476 hashes, 6.69 khash/s
[2012-05-25 16:18:24] thread 1: 407916 hashes, 6.56 khash/s
[2012-05-25 16:18:27] thread 3: 197508 hashes, 4.65 khash/s
[2012-05-25 16:19:09] thread 2: 310536 hashes, 6.91 khash/s
[2012-05-25 16:19:09] thread 3: 231612 hashes, 5.54 khash/s
[2012-05-25 16:19:09] thread 1: 306660 hashes, 6.87 khash/s
[2012-05-25 16:19:09] thread 0: 327336 hashes, 6.95 khash/s
[2012-05-25 16:19:09] DEBUG: got new work
[2012-05-25 16:20:09] thread 1: 412440 hashes, 6.87 khash/s
[2012-05-25 16:20:09] thread 2: 414528 hashes, 6.91 khash/s
[2012-05-25 16:20:09] DEBUG: got new work
[2012-05-25 16:20:09] thread 0: 417156 hashes, 6.94 khash/s
[2012-05-25 16:20:09] thread 3: 332340 hashes, 5.50 khash/s
[2012-05-25 16:21:08] thread 3: 330168 hashes, 5.66 khash/s
[2012-05-25 16:21:08] DEBUG: got new work
[2012-05-25 16:21:09] thread 1: 412440 hashes, 6.91 khash/s
[2012-05-25 16:21:09] thread 0: 416484 hashes, 6.95 khash/s
[2012-05-25 16:21:09] thread 2: 414360 hashes, 6.87 khash/s


If I add the --protocol-dump parameter I get back this

Quote
C:\minerd>minerd.exe --url http://pool_I_use.com:8337 --userpass
 XXX:XXX --threads 4 --debug --protocol-dump
[2012-05-25 16:24:04] 4 miner threads started, using 'scrypt' algorithm.
[2012-05-25 16:24:04] JSON protocol request:
{"method": "getwork", "params": [], "id":0}


* timeout on name lookup is not supported
* About to connect() to pool_I_use.com port 8337 (#0)
*   Trying xxx.xxx.xxx.xxx...
* TCP_NODELAY set
* connected
* Connected to pool_I_use.com (xxx.xxx.xxx.xxx) port 8337 (#0)
* Server auth using Basic with user 'XXX'
> POST / HTTP/1.1
Authorization: Basic c3RvcHBvdHNfQ1BVMjpteW1pbnI=
Host: pool_I_use.com:8337
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 45
User-Agent: cpuminer 2.2
X-Mining-Extensions: midstate

< HTTP/1.1 200 OK
< X-Source-Code: /src/
[2012-05-25 16:24:05] HTTP hdr(X-Source-Code): /src/
< Content-Length: 542
[2012-05-25 16:24:05] HTTP hdr(Content-Length): 542
< X-Roll-NTime: expire=120
[2012-05-25 16:24:05] HTTP hdr(X-Roll-NTime): expire=120
< X-Long-Polling: /LP
[2012-05-25 16:24:05] HTTP hdr(X-Long-Polling): /LP
< Server: Eloipool
[2012-05-25 16:24:05] HTTP hdr(Server): Eloipool
< Date: Fri, 25 May 2012 21:24:09 GMT
[2012-05-25 16:24:05] HTTP hdr(Date): Fri, 25 May 2012 21:24:09 GMT
< Content-Type: application/json
[2012-05-25 16:24:05] HTTP hdr(Content-Type): application/json
<
* Connection #0 to host pool_I_use.com left intact
[2012-05-25 16:24:05] Long-polling activated for http://pool_I_use.com:8337/LP

[2012-05-25 16:24:05] JSON protocol response:
{
   "error": null,
   "result": {
      "hash1": "0000000000000000000000000000000000000000000000000000000000000000
0000008000000000000000000000000000000000000000000000000000010000",
      "data": "000000013bea60ae4a218fa782c09a94dc389a89ef9b47e31223f86b0000091a0
0000000f80c20f32283698687a959a38e156c04d396fecf09f0ef1d8beec2bfbb24e8c44fbff879 1
a0a8b5f456c6f690000008000000000000000000000000000000000000000000000000000000000 0
0000000000000000000000080020000",
      "target": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000
0",
      "submitold": true
   },
   "id": 0
}
[2012-05-25 16:24:05] JSON protocol request:
{"method": "getwork", "params": [], "id":0}


[2012-05-25 16:24:05] DEBUG: got new work
* timeout on name lookup is not supported
* About to connect() to pool_I_use.com port 8337 (#0)
*   Trying xxx.xxx.xxx.xxx...
* TCP_NODELAY set
* connected
* Connected to pool_I_use.com (xxx.xxx.xxx.xxx) port 8337 (#0)
* Server auth using Basic with user 'XXX'
> POST /LP HTTP/1.1
Authorization: Basic c3RvcHBvdHNfQ1BVMjpteW1pbnI=
Host: pool_I_use.com:8337
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 45
User-Agent: cpuminer 2.2
X-Mining-Extensions: midstate

[2012-05-25 16:24:05] thread 3: 4104 hashes, 6.93 khash/s
[2012-05-25 16:24:05] thread 1: 4104 hashes, 6.92 khash/s
[2012-05-25 16:24:05] thread 0: 4104 hashes, 6.89 khash/s
[2012-05-25 16:24:05] thread 2: 4104 hashes, 5.90 khash/s
[2012-05-25 16:24:57] thread 2: 354288 hashes, 6.91 khash/s
[2012-05-25 16:24:57] JSON protocol request:
{"method": "getwork", "params": [], "id":0}


* Re-using existing connection! (#0) with host (nil)
* Connected to (nil) (xxx.xxx.xxx.xxx) port 8337 (#0)
* Server auth using Basic with user 'XXX'
> POST / HTTP/1.1
Authorization: Basic c3RvcHBvdHNfQ1BVMjpteW1pbnI=
Host: pool_I_use.com:8337
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 45
User-Agent: cpuminer 2.2
X-Mining-Extensions: midstate

< HTTP/1.1 200 OK
< X-Source-Code: /src/
< Content-Length: 542
< X-Roll-NTime: expire=120
< X-Long-Polling: /LP
< Server: Eloipool
< Date: Fri, 25 May 2012 21:25:01 GMT
< Content-Type: application/json
<
* Connection #0 to host (nil) left intact
[2012-05-25 16:24:57] JSON protocol response:
{
   "error": null,
   "result": {
      "hash1": "0000000000000000000000000000000000000000000000000000000000000000
0000008000000000000000000000000000000000000000000000000000010000",
      "data": "000000013bea60ae4a218fa782c09a94dc389a89ef9b47e31223f86b0000091a0
0000000739f2f40b89200c995cac8382d7a044bc4ab8e52f09cbcb1b34606d59a57bb014fbff8ad 1
a0a8b5f456c6f690000008000000000000000000000000000000000000000000000000000000000 0
0000000000000000000000080020000",
      "target": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000
0",
      "submitold": true
   },
   "id": 0
}
[2012-05-25 16:24:57] DEBUG: got new work
[2012-05-25 16:25:05] thread 3: 415932 hashes, 6.94 khash/s
[2012-05-25 16:25:06] thread 1: 415224 hashes, 6.84 khash/s
[2012-05-25 16:25:20] thread 0: 413136 hashes, 5.55 khash/s
[2012-05-25 16:25:49] thread 0: 205248 hashes, 6.93 khash/s
[2012-05-25 16:25:49] JSON protocol request:
{"method": "getwork", "params": [], "id":0}


* Re-using existing connection! (#0) with host (nil)
* Connected to (nil) (xxx.xxx.xxx.xxx) port 8337 (#0)
* Server auth using Basic with user 'XXX'
> POST / HTTP/1.1
Authorization: Basic c3RvcHBvdHNfQ1BVMjpteW1pbnI=
Host: pool_I_use.com:8337
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 45
User-Agent: cpuminer 2.2
X-Mining-Extensions: midstate

< HTTP/1.1 200 OK
< X-Source-Code: /src/
< Content-Length: 542
< X-Roll-NTime: expire=120
< X-Long-Polling: /LP
< Server: Eloipool
< Date: Fri, 25 May 2012 21:25:54 GMT
< Content-Type: application/json
<
* Connection #0 to host (nil) left intact
[2012-05-25 16:25:49] JSON protocol response:
{
   "error": null,
   "result": {
      "hash1": "0000000000000000000000000000000000000000000000000000000000000000
0000008000000000000000000000000000000000000000000000000000010000",
      "data": "000000013bea60ae4a218fa782c09a94dc389a89ef9b47e31223f86b0000091a0
00000000a7599aefcd104a49f73a339a5ab5f0979f50b038b5af9c2dd464bdb183442504fbff8e2 1
a0a8b5f456c6f690000008000000000000000000000000000000000000000000000000000000000 0
0000000000000000000000080020000",
      "target": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000
0",
      "submitold": true
   },
   "id": 0
}
[2012-05-25 16:25:49] DEBUG: got new work
[2012-05-25 16:25:56] thread 2: 414468 hashes, 6.94 khash/s
[2012-05-25 16:25:57] thread 3: 360852 hashes, 6.98 khash/s
[2012-05-25 16:26:00] thread 1: 348756 hashes, 6.44 khash/s
hero member
Activity: 845
Merit: 507
Yeah neither algorithm will work for me. Doesn't come back with an error or anything, just loads and sits there with a blinking cursor.
Quote
C:\minerd>minerd.exe --algo sha256d --threads 4 --url http://my.pool.com:8337 --userpass XXX:XXX --quiet
[2012-05-24 19:52:05] 4 miner threads started, using 'sha256d' algorithm.
[2012-05-24 19:52:05] Long-polling activated for http://my.pool.com:8337/LP
_

Do you expect to get verbose output when you specify the "--quiet" option? Smiley

For Bitcoin, also consider that the share target used by pools is relatively high, so it can take some time to generate a share with a CPU.
With a high-end CPU you can expect to find a share every 3-4 minutes on average.
hero member
Activity: 1596
Merit: 502
Did you use the --url http://my.pool.com:8337 --userpass XXX:XXX ?
Thats just an example url and username/password.
For example, if you want to mine at pool-x for me, you can use :
minerd -o http://mine.pool-x.eu/ -O pieppiep.1:x -t 4 --quiet

If you go to http://pool-x.eu/ of some other litecoin pool you can make an account and set the url and userpass correctly.
For standalone mining I have no idea how you should do that.
sr. member
Activity: 271
Merit: 250
Yeah neither algorithm will work for me. Doesn't come back with an error or anything, just loads and sits there with a blinking cursor.


Quote
C:\minerd>minerd.exe --algo scrypt --threads 4 --url http://my.pool.com:8337 --userpass XXX:XXX --quiet
[2012-05-24 19:45:53] 4 miner threads started, using 'scrypt' algorithm.
[2012-05-24 19:45:53] Long-polling activated for http://my.pool.com:8337/LP
_
Quote
C:\minerd>minerd.exe --algo sha256d --threads 4 --url http://my.pool.com:8337 --userpass XXX:XXX --quiet
[2012-05-24 19:52:05] 4 miner threads started, using 'sha256d' algorithm.
[2012-05-24 19:52:05] Long-polling activated for http://my.pool.com:8337/LP
_

If I add the --debug I get an extra line and it will continue repeating that line of "got new work"

Quote
C:\minerd>minerd.exe --algo sha256d --threads 4 --url http://my.pool.com:8337 --userpass XXX:XXX --quiet
[2012-05-24 19:52:05] 4 miner threads started, using 'sha256d' algorithm.
[2012-05-24 19:52:05] Long-polling activated for http://my.pool.com:8337/LP

[2012-05-24 19:59:31] DEBUG: got new work
hero member
Activity: 1596
Merit: 502
minerd --help

-a, --algo=ALGO       specify the algorithm to use
                        scrypt    scrypt(1024, 1, 1) (default)
                        sha256d   SHA-256d

So if you use -a sha256d it will mine bitcoins.
When I try it with my intel q6600 (quad [email protected]) I get a little over 3 MHash/s each core, about 13 MHash/s total.
Not really worth it, my older videocard gets 60 MHash/s with good miner.
sr. member
Activity: 271
Merit: 250
Is it my understanding that this cpu miner is able to mine bitcoins now? If so wat commands must be used to do so?
hero member
Activity: 845
Merit: 507
Version 2.2.1

  • Initial optimizations for ARM processors. Speedup should be about 55% for scrypt, but don't expect huge speeds. According to my tests, an ARM11 should only yield 0.39 khps/GHz. A Cortex-A8 will be much faster, at 0.70 khps/GHz. Please note that the present release does not include NEON optimizations yet. I'm working on that.
  • Building on NetBSD, OpenBSD, and even AIX (!!) using gcc should now work out of the box.

There are absolutely no changes for Windows and Mac OS systems, so no binaries will be released this time.

Thanks go to pontius for helping with compatibility fixes, and to ssvb for introducing me to the ARM architecture!
hero member
Activity: 518
Merit: 500
On OSX 10.5 the binary works straight out of the box.

Great news !

I have a nice 10.5.8 system and I will be trying this out soon to report the hashrate here.

Pity it is only i386 but the CPU is 64 bit capable ...
hero member
Activity: 860
Merit: 1004
BTC OG and designer of the BitcoinMarket.com logo
On OSX 10.5 the binary works straight out of the box.
member
Activity: 75
Merit: 10
Sorry, I forgot to mention this. In order to take advantage of AVX instructions, the miner needs support from the operating system.

  • Windows supports AVX starting from Windows 7 SP1 and Windows Server 2008 SP1. Windows 8 supports it natively.
  • Linux supports AVX starting from kernel version 2.6.30.
  • Mac OS X added AVX support in the 10.6.8 (Snow Leopard) update.

As regards building the miner, you will need at least binutils 2.19 to get AVX support, and at least 2.20.51.0.3 to get XOP support. (Current version is 2.22.)
The configure script will warn you if your version of binutils doesn't support AVX or XOP; you can check the currently installed version with "ld -v".
A final note: building the miner with AVX support on OS X is possible, but requires some tweaking of the build chain.

I just build on Snow Leopard with clang 3.1 from MacPorts, it seems work fine.
Pages:
Jump to: