Author Topic: Open source optimized PTS CPU miner (BETA)  (Read 18001 times)

0 Members and 1 Guest are viewing this topic.

Offline jernau

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #90 on: January 23, 2014, 06:51:22 am »
You can use just sse4.
PTS: PgiEykg2RATYwWYhFtyNRqwSxQyEApLSmW

Offline ptsrush

  • Full Member
  • ***
  • Posts: 84
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #91 on: January 24, 2014, 03:01:26 am »
hi dga,

I found that yam support beeeeer.org and report about 7% RJ too.

Since both miner report almost same reject rate, I guess your code is OK and
 don't worry about RJ any more.

Thank you very much.

Offline mmao

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #92 on: January 24, 2014, 10:18:12 am »
I downloaded the beta7.1 static binary, and run it on my centos6 box but failed:

Code: [Select]
using SSE4
spawning 4 worker thread(s)
[WORKER[WORKER[WORKER2] starting
3] starting
1] starting
[WORKER0] starting
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
[WORKER1] GoGoGo!
[WORKER2] GoGoGo!
[WORKER0] GoGoGo!
[WORKER3] GoGoGo!
connecting to 54.201.26.128:1337
Mining for approx 60 seconds to support further development
Payments to: Pr8cnhz5eDsUegBZD4VZmGDARcKaozWbBc
[MASTER] work received - sharetarget: 03ffffffffffffffffffffffffffffffffffffffffffffffffffffffbeefde4d
ptsminer-dga-beta7.1-avxsse-linux64-static.bin: malloc.c:2369: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t)) < __alignof__ (long double) ? __alignof__ (long double) : 2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t)) < __alignof__ (long double) ? __alignof__ (long double) : 2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
aborted (core dumped)

it failed also with sph mode:
Code: [Select]
using SPHLIB
spawning 4 worker thread(s)
[WORKER[WORKER12[WORKER] starting] starting

3] starting
[WORKER0] starting
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
[WORKER2] GoGoGo!
[WORKER3] GoGoGo!
[WORKER0] GoGoGo!
[WORKER1] GoGoGo!
connecting to 54.201.26.128:1337
Mining for approx 60 seconds to support further development
Payments to: Pr8cnhz5eDsUegBZD4VZmGDARcKaozWbBc
[MASTER] work received - sharetarget: 03ffffffffffffffffffffffffffffffffffffffffffffffffffffffbeefde4d
Segmentation fault (core dumped)

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #93 on: January 24, 2014, 07:02:20 pm »
Hm.  What happens if you run with only 1 thread?

What happens if you first run, as root:
   echo 2048 > /proc/sys/vm/nr_hugepages

and then run with only one thread?

If it works with 1 thread, does it also work with 2?

  -Dave

I downloaded the beta7.1 static binary, and run it on my centos6 box but failed:

Code: [Select]
using SSE4
spawning 4 worker thread(s)
[WORKER[WORKER[WORKER2] starting
3] starting
1] starting
[WORKER0] starting
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
[WORKER1] GoGoGo!
[WORKER2] GoGoGo!
[WORKER0] GoGoGo!
[WORKER3] GoGoGo!
connecting to 54.201.26.128:1337
Mining for approx 60 seconds to support further development
Payments to: Pr8cnhz5eDsUegBZD4VZmGDARcKaozWbBc
[MASTER] work received - sharetarget: 03ffffffffffffffffffffffffffffffffffffffffffffffffffffffbeefde4d
ptsminer-dga-beta7.1-avxsse-linux64-static.bin: malloc.c:2369: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t)) < __alignof__ (long double) ? __alignof__ (long double) : 2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t)) < __alignof__ (long double) ? __alignof__ (long double) : 2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
aborted (core dumped)

it failed also with sph mode:
Code: [Select]
using SPHLIB
spawning 4 worker thread(s)
[WORKER[WORKER12[WORKER] starting] starting

3] starting
[WORKER0] starting
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for big table.  Enable huge pages for a slight speed boost.
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
Couldn't use the hugepage speed optimization for small table.  Enable huge pages for a slight speed boost
[WORKER2] GoGoGo!
[WORKER3] GoGoGo!
[WORKER0] GoGoGo!
[WORKER1] GoGoGo!
connecting to 54.201.26.128:1337
Mining for approx 60 seconds to support further development
Payments to: Pr8cnhz5eDsUegBZD4VZmGDARcKaozWbBc
[MASTER] work received - sharetarget: 03ffffffffffffffffffffffffffffffffffffffffffffffffffffffbeefde4d
Segmentation fault (core dumped)

Offline mmao

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #94 on: January 25, 2014, 10:50:49 am »
Hm.  What happens if you run with only 1 thread?

What happens if you first run, as root:
   echo 2048 > /proc/sys/vm/nr_hugepages

and then run with only one thread?

If it works with 1 thread, does it also work with 2?

  -Dave

after executing "echo 2048 > /proc/sys/vm/nr_hugepages", it works with 4 threads!!!
and with 4 threads sse4 mode on my [email protected], it gives about 170 cpm
it's quite good, thank you!

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #95 on: January 25, 2014, 08:18:14 pm »
I've placed beta8 for haswell/avx2 and now for avxsse online.  It fixes (I believe) the bug that was causing failures when not enough hugepages were available, and incorporates the latest round of speed improvements for Haswell/AVX2.  Speed isn't changed much for avxsse, but I'm narrowing in on some more general improvements that should help there too.

http://www.cs.cmu.edu/~dga/ptsminer/

This is a quite worthwhile upgrade for the Haswell/AVX2 crowd.  Expect at least a 20cpm jump and probably more - I'm still letting the cpm benchmarks run, but my dev benchmarks suggest somewhere between a 5-10% speedup over beta7.  I'll update this post tonight with some actual CPM numbers from an i7-4770.

Update 2:
Totally rough guesstimate:

[STATS] 2014-Jan-25 17:34:57 | 570.1 c/m | 8.9 sh/m | VL: 299 (99.7%), RJ: 1 (0.3%), ST: 0 (0.0%)

I expect sustained rates of 565 c/m over a longer period of time.  Not bad, little CPU, not bad.

  -Dave
« Last Edit: January 25, 2014, 10:35:25 pm by dga »

Offline ptsrush

  • Full Member
  • ***
  • Posts: 84
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #96 on: January 25, 2014, 11:20:41 pm »
haswell e3-1230 v3 upgraded.

beta7 avx2 cpm : 530
beta8 avx2 cpm : 542

It's now faster than my 530 cpm GT 560!

by the way, seems ptsminer work 60 s for developer then 200 s for miner.
next round 1200 s for developer and 40,000 s for miner.

That's good if I'm running a server and never power off.

But when I run ptsminer on my desktop, in most case I run about 20,000 s
then power off.

So 1200 / 20000 = 6%.

for avx2 even 6% the ptsminer still far better than yam, so just for your information.
« Last Edit: January 26, 2014, 12:32:26 am by ptsrush »

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #97 on: January 26, 2014, 12:40:56 am »
haswell e3-1230 v3 upgraded.

beta7 avx2 cpm : 530
beta8 avx2 cpm : 542

It's now faster than my 530 cpm GT 560!

by the way, seems ptsminer work 60 s for developer then 200 s for miner.
next round 1200 s for developer and 40,000 s for miner.

That's good if I'm running a server and never power off.

But when I run ptsminer on my desktop, in most case I run about 20,000 s
then power off.

So 1200 / 20000 = 6%.

for avx2 even 6% the ptsminer still far better than yam, so just for your information.

Glad to hear it's running well on the E3.

Noted about the devmine fee.  I'll fix that in a few betas.  What it really should be is an exponentially increasing sequence (with a cap) -- dev 60, user 2000;  dev 120, user 4000;  dev 240, user 8000; etc., which would reduce the problem you're seeing if you kill at exactly the wrong time, while still reducing the amount of interruption due to mining switches.  There are a few other things I want to do to make the dev mining more robustly fair under disconnects/etc., which is why I haven't just thrown out the exponential version.

Offline ptsrush

  • Full Member
  • ***
  • Posts: 84
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #98 on: January 30, 2014, 12:19:43 am »
Hi dga,

After 3 or 4 days, the v8 avx slow down from 320 to 260 cpm.
v8 avx2 not sure since run as daemon, but profit seems drop to 75%。

kill the ptsminer and restart seems fix it.

I'm not sure what's happening, since the yam get a lot of reject from beeeeer.org too.

yam on 1GH has no problem using new xpt2h protocol and port 18120.

Now ptsminer is beeeeer.org lock-in.

Any plan to support xpt2h protocol?

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #99 on: January 30, 2014, 11:04:27 am »
Hi dga,

After 3 or 4 days, the v8 avx slow down from 320 to 260 cpm.
v8 avx2 not sure since run as daemon, but profit seems drop to 75%。

kill the ptsminer and restart seems fix it.

I'm not sure what's happening, since the yam get a lot of reject from beeeeer.org too.

yam on 1GH has no problem using new xpt2h protocol and port 18120.

Now ptsminer is beeeeer.org lock-in.

Any plan to support xpt2h protocol?

I haven't seen avx2 slow down, but beeeeer has had a bad string of luck lately with block finding - my profit is also down a fair bit. 

My own avx beta8 client hasn't slowed down:

2014-Jan-25 17:00:19 | 760.0 c/m | 14.1 sh/m
2014-Jan-30 06:00:07 | 774.9 c/m | 12.2 sh/m

but that doesn't mean there's not something wrong.  What CPU are you running the avx one on and with how many threads?

I do hope to add more protocol support.  I have real work taking up all of my time until this weekend, but I'll check out xpt2h then.

  -Dave

Offline rots

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #100 on: February 01, 2014, 01:06:22 pm »
Any plan to release windows bineary file?

Following up on yvg1900's release of yam, I figured I'd improve the state of the art of the open source versions a bit:

https://github.com/dave-andersen/ptsminer

I haven't made it build yet on windows (it just needs to compile the avx2 assembly code - should be straightforward if someone wants to clue me in on how to appropriately invoke gcc there), but it should work on other platforms.  As a warning, I've only really tried it on avx2, since I'm a fan of Haswell.  THIS SOFTWARE SHOULD BE CONSIDERED A BETA QUALITY RELEASE.  At best. 

As with my GPU release, this one is based very directly on ptsminer, so it's tied to beeeeer for the moment.  I plan to fix that and let it be used with other pools in the near future, but that's going to take some dev work.  sigh.

There's a lot of optimization to be done, but this gets the basics as far as memory subsystem optimization, and bridges a lot of the gap between the old OSS version and yam M7i.  I haven't tried out M7j, mind you -- it's probably a bit faster still, but this release should bridge the gap considerably.

It incorporates the same optional, extendible 1% dev fee that the gpu miner does.  Prior ptsminer devs, if you feel like you should be in the list, please PM me and I'll get you added!

With gratitude to FreeTrade for the donation that kept me interested in hacking on and releasing this stuff, and to yvg1900 for some very engaging unofficial competition. *grin*

  -Dave

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #101 on: February 01, 2014, 07:19:38 pm »
beta9 for AVX2 is now online in the usual place:  http://www.cs.cmu.edu/~dga/ptsminer/

This is a speed-boost release.  I'm still doing the benchmarking runs, but on my i7-4770, it's the first of my releases to crack 600 cpm.  Looks like it's going to settle in between 610 and 620 cpm with 7 threads running on my test box.

beta9 is haswell-only right now;  its optimizations are specific to avx2.  I plan to address some of the portability/pool selection issues soon (because I'm running out of great ideas for how to make this thing faster without getting ugly).

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #102 on: February 01, 2014, 08:24:32 pm »
beta9 for AVX2 is now online in the usual place:  http://www.cs.cmu.edu/~dga/ptsminer/

beta9 for AVX is also now online.  This one should be a good speed boost - I'm seeing my test machine go from about 780cpm to 1020cpm.

Note:  Unlike prior avxsse releases, this avx release really does require AVX.  It's compiled to target sandy bridge and higher.  I've changed the name of the binary to reflect this, and left the old avxsse one (which will run on sse4) online.

Direct link:  http://www.cs.cmu.edu/~dga/ptsminer/ptsminer-dga-beta9-avx-linux64-static.bin

Happy mining!

Update:  This one is producing very mixed results.  Try beta8 and beta9 and use whichever is better for you.  Beta9 is rocking on my AMD test CPU, but it seems slower on some others.  Definitely needs improvement still.
« Last Edit: February 01, 2014, 09:26:39 pm by dga »

Offline bytemaster

Re: Open source optimized PTS CPU miner (BETA)
« Reply #103 on: February 01, 2014, 09:12:13 pm »
beta9 for AVX2 is now online in the usual place:  http://www.cs.cmu.edu/~dga/ptsminer/

beta9 for AVX is also now online.  This one should be a good speed boost - I'm seeing my test machine go from about 780cpm to 1020cpm.

Note:  Unlike prior avxsse releases, this avx release really does require AVX.  It's compiled to target sandy bridge and higher.  I've changed the name of the binary to reflect this, and left the old avxsse one (which will run on sse4) online.

Direct link:  http://www.cs.cmu.edu/~dga/ptsminer/ptsminer-dga-beta9-avx-linux64-static.bin

Happy mining!

Nice... how does this compare to the latest GPU mining?
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #104 on: February 01, 2014, 09:40:24 pm »
beta9 for AVX2 is now online in the usual place:  http://www.cs.cmu.edu/~dga/ptsminer/

beta9 for AVX is also now online.  This one should be a good speed boost - I'm seeing my test machine go from about 780cpm to 1020cpm.

Note:  Unlike prior avxsse releases, this avx release really does require AVX.  It's compiled to target sandy bridge and higher.  I've changed the name of the binary to reflect this, and left the old avxsse one (which will run on sse4) online.

Direct link:  http://www.cs.cmu.edu/~dga/ptsminer/ptsminer-dga-beta9-avx-linux64-static.bin

Happy mining!

Nice... how does this compare to the latest GPU mining?

I think I broke something.  This one is a lot better on my AMD test CPU and absolutely horrible on my Intel CPUs.  Back to the drawing board.  Beta8 is the one to stick with for Intel. (update:  beta9 is now working properly for Intel)

The haswell/AVX2 release is very solid and beats low-end GPUs:  It's sitting just above 600 c/m.  A cheap GPU (GT 640 GDDR5 -- $85) can get about 250 cpm.  The fastest ($600-$1000) get around 2000-2200cpm.  The GPUs are still ahead in cpm/$, but not by a shocking margin.  Haswell is 610cpm for $300, or about 2cpm/$.  An R9 290x is 2200cpm/$610 = 3.6cpm/$.
« Last Edit: February 02, 2014, 01:05:37 am by dga »