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

0 Members and 1 Guest are viewing this topic.

Offline noobster

  • Jr. Member
  • **
  • Posts: 35
  • cryptocurrencies vs. fed
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #71 on: January 18, 2014, 11:31:34 am »
I wanted more ram options so I can experiment a bit with different settings. Say from 512 to 2048 MB per thread adjustable by 256MB… no idea this could take a lot of work maybe.

And you were right about the rejects, beta4 update increased the reject rate to over 30% in my case lol
BTC: 15mey7vTkkvHm4UoZgVEP4Yo3REDpH87KW
PTS: PkzbnN7Nkv6TcqJuNjpcLfmPqpPUphpu5W
drop some =)

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #70 on: January 18, 2014, 10:13:36 am »
Replying to a bunch of the previous comments:

- I'll disable the "aborting scan" message in the next set of changes.  I still want to put in a slightly better method for doing this, because I think it is increasing the reject rate a little bit.  @ptsrush, my guess is it's a little bit because of latency and a little bit because the miner works in bigger chunks.  I'll make it a priority to get that in the next build.

@allano, re source code to github: 
  (a)  Which opteron do you have?  I'm running the SSE one on AMD CPUs with SSE support.  It works just fine.
  (b)  I have a few reasons I'm not pushing the source yet:  First, the build is a mess, and I need to move it to using autoconf or some other method.  There are currently four different makefiles that the project inherited from ptsminer, and part of my recent optimization adds different code that runs on different CPUs.  The combination of this is currently unmanageable.

  Second, I'm trying to figure out what the right strategy is for this one to fund development.  It's pretty clear based on what happened with the GPU miners that if I release all of my tricks without supporting more pools and windows, a whole lot of clones will spring up with binary builds for other platforms with high dev fees that go to someone else.  I'm fine with that in the long term, but I want to be careful.  I've put .. um .. rather a lot of work into the current optimized CPU version.

  My current thought is that I'm going to wait until *I* can provide easy-to-use binaries for both linux and windows with a 1-2% dev fee that supports both beeeeer and ypool, and then release the source as well.  Of course, I'd also be happy to go with a sponsored code release again or explore other options, but the dev fee really does seem like a very equitable way.

@noobster: Agreed.  The 3% dev fee is temporary.  I'm going to cut it down to 2% pretty soon.
  - Do you mind the 60 second dev mine starting time?  I'd rather increase the user time from 2000 to 3000 seconds than reduce dev mine from 60 to 40 --- it's more efficient to run for longer.

- Amount of RAM per thread:  The algorithms I'm using in this are completely different from what previous miners did.  There's no way to use less RAM because of the way I store the data, and using more RAM will actually make it slower.

Did you want to use *less* RAM, or more because you want it go to faster?

  -Dave

Offline noobster

  • Jr. Member
  • **
  • Posts: 35
  • cryptocurrencies vs. fed
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #69 on: January 18, 2014, 09:52:02 am »
with the pool fee the 3% miner fee is preety high together

also it would be nice if one can specify the amount of ram per thread

thanks
BTC: 15mey7vTkkvHm4UoZgVEP4Yo3REDpH87KW
PTS: PkzbnN7Nkv6TcqJuNjpcLfmPqpPUphpu5W
drop some =)

Offline allano

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #68 on: January 18, 2014, 06:40:15 am »
Hi dga,

ptsminer-dga-beta5-avx2-linux64-static.bin rush at about 580 - 610 cpm on my i7-4770 CPU @ 3.40GHz Ubuntu.

I wish to compile it to my AMD Opteron can you make the source code to githube, please?

Very nice work from you ;)

Offline aliasme

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #67 on: January 18, 2014, 02:15:27 am »
[STATS] 2014-Jan-18 02:46:35 | 255.8 c/m | 2.2 sh/m | VL: 12 (100.0%), RJ: 0 (0.0%), ST: 0 (0.0%)

This is at least 2x.

Wow, nice work.
« Last Edit: January 18, 2014, 02:47:58 am by alaisme »

Offline ptsrush

  • Full Member
  • ***
  • Posts: 84
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #66 on: January 18, 2014, 02:12:29 am »
Hi dga,

ptsminer-dga-beta5-avx2-linux64-static rush at about 530 - 535 cpm on my e3-1230 v3 haswell gentoo box.

Really crazy.

I'm not native speaker, but maybe in such case guess I should say it's "damn fast"!

Anyway, once a new block start, seems all my 6 worker print "Aborting scan run because of new work."

It's is a little annoying. Could you output them only 1 time?

And sometime it says "Not inserted: <298324783427234980742398> at 7744". Is it OK?

The RJ is about 5% in China. I'm not sure is due to broken internet or something else.

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #65 on: January 18, 2014, 02:00:29 am »
Output when compiling by hand:

user@testbox:/home/proto/ptsminer/src# g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_avx2.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread
g++: obj/sha512_avx2.o: No such file or directory

First run:

gcc -O3 intel/sha512_avx2.S -o obj/sha512_avx2.o

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #64 on: January 18, 2014, 01:59:54 am »
model name   : Intel(R) Xeon(R) CPU           E5645  @ 2.40GHz

http://ark.intel.com/products/48768/Intel-Xeon-Processor-E5645-12M-Cache-2_40-ghz-5_86-gts-Intel-qpi

The SSE one.  LMK if it works - I haven't tested on that model.

  -Dave

Offline plane501

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #63 on: January 18, 2014, 01:55:16 am »
Windows version please :)

Offline aliasme

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #62 on: January 18, 2014, 01:54:06 am »
Output when compiling by hand:

user@testbox:/home/proto/ptsminer/src# g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_avx2.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread
g++: obj/sha512_avx2.o: No such file or directory

Offline aliasme

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #61 on: January 18, 2014, 01:52:24 am »
user@testbox:/home/proto/ptsminer/src# make -f makefile.unix.no-chrono

g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread
obj/sha512.o: In function `Init_SHA512_avx2':
sha512.c:(.text+0x27): undefined reference to `sha512_transform_rorx'
sha512.c:(.text+0x32): undefined reference to `sha512_transform_single_rorx'
collect2: ld returned 1 exit status
make: *** [ptsminer] Error 1

What do I need to do? Thanks in advance

Ah - I haven't updated the no-chrono makefile

You can run by hand:

gcc intel/sha512_avx2.S -O3 -o obj/sha512_avx2.o

g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_avx2.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread

Or try grabbing one of the newer, faster binary builds.

I'll patch up that makefile pretty soon.  Thanks for letting me know - I wasn't sure if anyone wanted to use it.

  -Dave

Thanks much. I nuked my post after finding the makefile and assuming I needed to comment out the avx2 code.

Going to try again --- here's the CPU output, which binary?

processor   : 7
vendor_id   : GenuineIntel
cpu family   : 6
model      : 44
model name   : Intel(R) Xeon(R) CPU           E5645  @ 2.40GHz
stepping   : 2
cpu MHz      : 2400.260
cache size   : 4096 KB
fpu      : yes
fpu_exception   : yes
cpuid level   : 11
wp      : yes
flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm
bogomips   : 4800.52
clflush size   : 64
cache_alignment   : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:


Thanks for your help. Understanding the CPU features and seeing this performance improvement is cool. Great stuff you are doing.

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #60 on: January 18, 2014, 01:47:56 am »
user@testbox:/home/proto/ptsminer/src# make -f makefile.unix.no-chrono

g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread
obj/sha512.o: In function `Init_SHA512_avx2':
sha512.c:(.text+0x27): undefined reference to `sha512_transform_rorx'
sha512.c:(.text+0x32): undefined reference to `sha512_transform_single_rorx'
collect2: ld returned 1 exit status
make: *** [ptsminer] Error 1

What do I need to do? Thanks in advance

Ah - I haven't updated the no-chrono makefile

You can run by hand:

gcc intel/sha512_avx2.S -O3 -o obj/sha512_avx2.o

g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_avx2.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread

Or try grabbing one of the newer, faster binary builds.

I'll patch up that makefile pretty soon.  Thanks for letting me know - I wasn't sure if anyone wanted to use it.

  -Dave

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #59 on: January 18, 2014, 01:35:10 am »
Hi dga,

beta4 avxsse has 315 - 320 cpm in my e3-1230 v2 avx gentoo box.

the yam is about 305 - 310 cpm.

so you win about 3% ahead :)

Hah.  Thanks!  Not quite enough to justify that dev fee, though.  I'll see if I can make it a bit faster and earn my keep.

In the meantime, I'm just going to go ahead and admit that I have a problem.  I can't keep my toes out of optimizing the avx2 build, so I've put beta5 online.  This one is even more annoyingly architecture-specific, so ONLY haswell / avx2 people should even bother with it.  I just put the static build online because I'm still working out more kinks I introduced into the build process for optimization.  It's getting about 530 cpm on my stock i7-4770.

  -Dave

Offline ptsrush

  • Full Member
  • ***
  • Posts: 84
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #58 on: January 18, 2014, 01:29:50 am »
Hi dga,

beta4 avxsse has 315 - 320 cpm in my e3-1230 v2 avx gentoo box.

the yam is about 305 - 310 cpm.

so you win about 3% ahead :)

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #57 on: January 17, 2014, 10:57:43 pm »
Ok - there's now an advanced preview of beta4 for avx/sse in addition to the avx one. 

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

Be sure to grab the right version (beta4) and architecture (avx2 or avxsse) for your machine.  If you're not using the latest Ubuntu, grab the -static version to have a better chance of it working.

Feedback welcome.  I don't have a good set of avxsse machines to compare on, so I don't know how this one compares against yam.  Where the avx2 version is quite a bit faster, this one is still probably just in the same ballpark.  3% dev fee, but I'll cut that down to 1% if it's not beating yam by enough to make it worth paying the dev fee.  *grin*

Making headway at getting the build working better, but it's still a ghastly piece of spaghetti and not fit for pushing to the repository.

  -Dave