Bitcoin Forum
June 27, 2017, 05:43:25 AM *
News: Latest stable version of Bitcoin Core: 0.14.2  [Torrent].
 
   Home   Help Search Donate Login Register  
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 [43] 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 ... 133 »
  Print  
Author Topic: [XPM] [ANN] Primecoin High Performance | HP14 released!  (Read 384147 times)
ig0tik3d
Legendary
*
Offline Offline

Activity: 1218


*Crowdsale 13/06/2017* www.fundyourselfnow.com


View Profile
July 19, 2013, 01:49:29 PM
 #841

Does anyone have a guide for building on Windows.  I can't get the static libraries to bind using MingW.
https://bitcointalk.org/index.php?topic=149479.0

.FundYourselfNow.
██▀
██
██
██
██
██
██
██▄
Revolutionizing Crowdfunding
.
.★★ J O I N  I C O  N O W ! ★★.
▀██
██
██
██
██
██
██
▄██
1498542205
Hero Member
*
Offline Offline

Posts: 1498542205

View Profile Personal Message (Offline)

Ignore
1498542205
Reply with quote  #2

1498542205
Report to moderator
1498542205
Hero Member
*
Offline Offline

Posts: 1498542205

View Profile Personal Message (Offline)

Ignore
1498542205
Reply with quote  #2

1498542205
Report to moderator
1498542205
Hero Member
*
Offline Offline

Posts: 1498542205

View Profile Personal Message (Offline)

Ignore
1498542205
Reply with quote  #2

1498542205
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1498542205
Hero Member
*
Offline Offline

Posts: 1498542205

View Profile Personal Message (Offline)

Ignore
1498542205
Reply with quote  #2

1498542205
Report to moderator
1498542205
Hero Member
*
Offline Offline

Posts: 1498542205

View Profile Personal Message (Offline)

Ignore
1498542205
Reply with quote  #2

1498542205
Report to moderator
ReCat
Sr. Member
****
Offline Offline

Activity: 406



View Profile WWW
July 19, 2013, 02:25:35 PM
 #842

I just mined 3 blocks in a row... holy crap.


BTC: 1recatirpHBjR9sxgabB3RDtM6TgntYUW
Hold onto what you love with all your might, Because you can never know when - Oh. What you love is now gone.
mikaelh
Sr. Member
****
Offline Offline

Activity: 301


View Profile
July 19, 2013, 02:51:54 PM
 #843

I posted a new compilation guide for Linux:
https://bitcointalk.org/index.php?topic=259022.0

It shows you how to compile your own libgmp and everything else.
ReCat
Sr. Member
****
Offline Offline

Activity: 406



View Profile WWW
July 19, 2013, 03:02:21 PM
 #844

I posted a new compilation guide for Linux:
https://bitcointalk.org/index.php?topic=259022.0

It shows you how to compile your own libgmp and everything else.

Mikaelh. I have a question for you.

My CPU's have 12MB of cache each. Is that advantageous for primecoin mining? I have noticed I have been getting significantly higher primespersec than most of my friends when we use larger seivesizes, even when they have newer processors!

BTC: 1recatirpHBjR9sxgabB3RDtM6TgntYUW
Hold onto what you love with all your might, Because you can never know when - Oh. What you love is now gone.
mikaelh
Sr. Member
****
Offline Offline

Activity: 301


View Profile
July 19, 2013, 03:10:51 PM
 #845

I posted a new compilation guide for Linux:
https://bitcointalk.org/index.php?topic=259022.0

It shows you how to compile your own libgmp and everything else.

Mikaelh. I have a question for you.

My CPU's have 12MB of cache each. Is that advantageous for primecoin mining? I have noticed I have been getting significantly higher primespersec than most of my friends when we use larger seivesizes, even when they have newer processors!

Well, it might run a tiny bit faster if you have a large L3 cache. I wrote most of the code to run fast using the L1 and L2 caches, so the L3 cache is actually not that important. But of course it never hurts to have a big L3 cache. Wink

GPU architecture also has a big impact.
xyzzy099
Legendary
*
Offline Offline

Activity: 986



View Profile
July 19, 2013, 03:14:12 PM
 #846

I posted a new compilation guide for Linux:
https://bitcointalk.org/index.php?topic=259022.0

It shows you how to compile your own libgmp and everything else.

Mikaelh. I have a question for you.

My CPU's have 12MB of cache each. Is that advantageous for primecoin mining? I have noticed I have been getting significantly higher primespersec than most of my friends when we use larger seivesizes, even when they have newer processors!

Well, it might run a tiny bit faster if you have a large L3 cache. I wrote most of the code to run fast using the L1 and L2 caches, so the L3 cache is actually not that important. But of course it never hurts to have a big L3 cache. Wink

GPU architecture also has a big impact.

Running hp4 on a CPU with a 10M L3 cache, I found that if I set the sievesize any larger than 4M, the program would crash within seconds of startup.  What should be the maximum sievesize?

I am using hp5 now, but I have not checked to see if it still crashes.



Libertarians:  Diligently plotting to take over the world and leave you alone.
Koooooj
Member
**
Offline Offline

Activity: 75



View Profile
July 19, 2013, 03:15:32 PM
 #847

Just wanted to say great miner!  I feel like this is probably the most optimized miner on the market right now.  Looking over the source code of the original miner and yours I think I see a way to make the miner (potentially much) faster from a mathematical standpoint rather than a code-optimization standpoint.  My optimization centers around the Primorial and the loop that occurs in main.cpp on line 4622.

Before getting into the code, it is important to realize why a primorial is helpful (if you already understand this, skip this paragraph).  With numbers on the order of 2256 there is about a 1 in 177 chance that a random number is prime.  If you select 8 random numbers, then, the odds of all of them being prime is about 1 in 1 quintillion--impractically low.  If you limit your search to only odd numbers, though, the odds shoot up tremendously.  Further limiting your search to numbers not divisible by 3, 5, 7, and so on can cause the odds of finding a prime number to become much, much better.  If the hash value is divisible by lots of these small numbers then multiples of that hash ± 1 will not be divisible by any of those numbers.  Thus, it is convenient to use a hash that is already a multiple of 2 * 3 * 5 * 7 * ... as it will produce far more primes than another hash.

As I understand the aforementioned loop, the program is searching for a hash that is divisible by a primorial.  Each iteration of this loop requires a hash to be generated as it increments the nonce value.  In the present form the primorail is of degree 7 (line 4579: static const unsigned int nPrimorialHashFactor = 7).  I suspect that this value is carefully chosen and it's probably ideal with the way that it is written.  However, I think there's an additional step that can be added to make the process much faster.  Increasing the degree of the primorial is incredibly expensive as it gets larger, since adding the 8th prime requires 19 times as many hashes to be checked; the 9th prime requires 23 times as many, and so on.  There is another way, though.

Prime origins are required to be in the form O = H * N where O is the origin, H is the hash, and N is any integer; H is selected to be divisible by p#7 (the primorial shown above).  If we extend this to O = H * N * P2 where P2 is 19 * 23 * 29 * ... * 51--a product of primes starting after the last prime used in the existing search--then the checked origin is still valid (an integer times an integer is still an integer).  This grants the benefits of searching with a higher degree primorial while not requiring a longer search for a working hash.  

Nothing is free, though, as this method inflates the size of the primes to be checked.  If the fast modular exponentiation is implemented through the same method as is used on the Fermat Primality Test Wikipedia page then the algorithmic efficiency is O(log2(n) * log(log(n)) * log(log(log(n))) ).  There should be some sweet spot of how large of a primorial to use where the increased frequency of primes more than offsets the extra time required for the fast modular exponentiation.  It's possible that the sweet spot is 0 extra primes, but I think it's worth looking into.

Definitely a great. I haven't had the time to study the code from a mathematical perspective, so this is helping me understand the code better. Smiley

Unfortunately it seems that Sunny King was ahead of you here. The code is already doing what you proposed. It uses something called a round primorial which is dynamically adjusted. You can see these round primorials in debug.log if you enable the debugging options -debug -printmining. A fixed multiplier is calculated through division by the first primorial used to choose the hash value. This fixed multiplier corresponds to your P2.

I think some improvements could be made to the dynamic adjustment system. It seems to be picking lots of different values.

Darn.  I guess Sunny was on his game!  At any rate, I hope this at least opens a new door for additional tuning of the miner in the wild.  Perhaps a system that does away with the dynamic tuning in favor of a conf file/command line parameter.  I don't have the time to crawl through the source code right now--friend is getting married--but I'll take a look when I get back.
ReCat
Sr. Member
****
Offline Offline

Activity: 406



View Profile WWW
July 19, 2013, 03:23:50 PM
 #848

I posted a new compilation guide for Linux:
https://bitcointalk.org/index.php?topic=259022.0

It shows you how to compile your own libgmp and everything else.

Mikaelh. I have a question for you.

My CPU's have 12MB of cache each. Is that advantageous for primecoin mining? I have noticed I have been getting significantly higher primespersec than most of my friends when we use larger seivesizes, even when they have newer processors!

Well, it might run a tiny bit faster if you have a large L3 cache. I wrote most of the code to run fast using the L1 and L2 caches, so the L3 cache is actually not that important. But of course it never hurts to have a big L3 cache. Wink

GPU architecture also has a big impact.

It's 12MB of L2 cache, not L3 cache. Would having this much L2 cache help any significant amount?

BTC: 1recatirpHBjR9sxgabB3RDtM6TgntYUW
Hold onto what you love with all your might, Because you can never know when - Oh. What you love is now gone.
mikaelh
Sr. Member
****
Offline Offline

Activity: 301


View Profile
July 19, 2013, 03:31:15 PM
 #849

I posted a new compilation guide for Linux:
https://bitcointalk.org/index.php?topic=259022.0

It shows you how to compile your own libgmp and everything else.

Mikaelh. I have a question for you.

My CPU's have 12MB of cache each. Is that advantageous for primecoin mining? I have noticed I have been getting significantly higher primespersec than most of my friends when we use larger seivesizes, even when they have newer processors!

Well, it might run a tiny bit faster if you have a large L3 cache. I wrote most of the code to run fast using the L1 and L2 caches, so the L3 cache is actually not that important. But of course it never hurts to have a big L3 cache. Wink

GPU architecture also has a big impact.

It's 12MB of L2 cache, not L3 cache. Would having this much L2 cache help any significant amount?

Not really. Larger caches are also slower.
ReCat
Sr. Member
****
Offline Offline

Activity: 406



View Profile WWW
July 19, 2013, 03:37:23 PM
 #850

Hum. Strange. I've been finding more blocks than any of my friends. O_o maybe i'm having a crazy unreal luck-streak.

BTC: 1recatirpHBjR9sxgabB3RDtM6TgntYUW
Hold onto what you love with all your might, Because you can never know when - Oh. What you love is now gone.
n4ru
Sr. Member
****
Offline Offline

Activity: 308



View Profile
July 19, 2013, 03:38:32 PM
 #851

Just mined two back to back blocks. Awesome.
1l1l11ll1l
Hero Member
*****
Offline Offline

Activity: 711


TheMerchantShop.com


View Profile WWW
July 19, 2013, 03:41:18 PM
 #852

Just mined two back to back blocks. Awesome.

Are you running linux? Any particular settings you'd like to share?  Wink

High Volume and/or High Risk Credit Card Processing. TheMerchantShop.com
ReCat
Sr. Member
****
Offline Offline

Activity: 406



View Profile WWW
July 19, 2013, 03:43:13 PM
 #853



Mined four blocks in the past 24-ish hours.

Holy. Shit.

(Win 2008, HP4, specs down in siggy)

BTC: 1recatirpHBjR9sxgabB3RDtM6TgntYUW
Hold onto what you love with all your might, Because you can never know when - Oh. What you love is now gone.
bidji29
Sr. Member
****
Offline Offline

Activity: 392


View Profile
July 19, 2013, 03:43:51 PM
 #854

Just mined two back to back blocks. Awesome.

Are you running linux? Any particular settings you'd like to share?  Wink

He throw millions of PPS at it, that's the trick^^.

N4ru, do you still use the 2M sievesize?

http://www.freebieservers.com/  100% FREE GAME SERVERS
romerun
Legendary
*
Offline Offline

Activity: 1078


Bitcoin is new, makes sense to hodl.


View Profile
July 19, 2013, 03:44:25 PM
 #855

i got no shit for the last 24
n4ru
Sr. Member
****
Offline Offline

Activity: 308



View Profile
July 19, 2013, 03:48:22 PM
 #856

Just mined two back to back blocks. Awesome.

Are you running linux? Any particular settings you'd like to share?  Wink

He throw millions of PPS at it, that's the trick^^.

N4ru, do you still use the 2M sievesize?
Yep.
Tamis
Sr. Member
****
Offline Offline

Activity: 476



View Profile
July 19, 2013, 04:08:09 PM
 #857

Didn't the consensus show that 1M sievesize was some kind of sweet spot ?
mikaelh
Sr. Member
****
Offline Offline

Activity: 301


View Profile
July 19, 2013, 04:16:40 PM
 #858

Didn't the consensus show that 1M sievesize was some kind of sweet spot ?

Well, I'm not sure if I'm part of that consensus because I haven't seen any statistically significant data to support that.
xyzzy099
Legendary
*
Offline Offline

Activity: 986



View Profile
July 19, 2013, 04:18:23 PM
 #859

I posted a new compilation guide for Linux:
https://bitcointalk.org/index.php?topic=259022.0

It shows you how to compile your own libgmp and everything else.

Mikaelh. I have a question for you.

My CPU's have 12MB of cache each. Is that advantageous for primecoin mining? I have noticed I have been getting significantly higher primespersec than most of my friends when we use larger seivesizes, even when they have newer processors!

Well, it might run a tiny bit faster if you have a large L3 cache. I wrote most of the code to run fast using the L1 and L2 caches, so the L3 cache is actually not that important. But of course it never hurts to have a big L3 cache. Wink

GPU architecture also has a big impact.

Running hp4 on a CPU with a 10M L3 cache, I found that if I set the sievesize any larger than 4M, the program would crash within seconds of startup.  What should be the maximum sievesize?

I am using hp5 now, but I have not checked to see if it still crashes.

Is this a question so stupid that it just doesn't deserve consideration?

I've asked about this crashing with large sieve sizes twice now, but have had no reply.

I've verified that it happens with hp5 as well.  I wish I could provide more details about the crash, but Windows just pops up a dialog saying the program stopped working, and doesn't include much useful debug info.

Libertarians:  Diligently plotting to take over the world and leave you alone.
#Darren
Sr. Member
****
Offline Offline

Activity: 291



View Profile
July 19, 2013, 04:26:32 PM
 #860

i got no shit for the last 24


BTC:   1PZnh9xRt4ajDGsXggeyV1N76URKXqLEqB
LTC:    LRyJq7gCCzonZe6a8e4S4TdJpkMJ8ULkkp
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 [43] 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 ... 133 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!