Bitcoin Forum
April 25, 2024, 12:47:45 PM *
News: Latest Bitcoin Core release: 27.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 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 ... 131 »
  Print  
Author Topic: [XPM] [ANN] Primecoin High Performance | HP14 released!  (Read 397580 times)
ReCat
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



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

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.
1714049265
Hero Member
*
Offline Offline

Posts: 1714049265

View Profile Personal Message (Offline)

Ignore
1714049265
Reply with quote  #2

1714049265
Report to moderator
1714049265
Hero Member
*
Offline Offline

Posts: 1714049265

View Profile Personal Message (Offline)

Ignore
1714049265
Reply with quote  #2

1714049265
Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
mikaelh (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


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

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: 1062
Merit: 1041



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

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
Merit: 10



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

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
Merit: 250



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

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 (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


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

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
Merit: 250



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

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: 350
Merit: 250



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

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

Activity: 1274
Merit: 1000


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

Just mined two back to back blocks. Awesome.

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

ReCat
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



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



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
Merit: 250


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

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
Merit: 1001


Bitcoin is new, makes sense to hodl.


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

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

Activity: 350
Merit: 250



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

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
Merit: 250



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

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

Activity: 301
Merit: 250


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

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: 1062
Merit: 1041



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

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: 784
Merit: 250


DIA | Data infrastructure for DeFi


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

i got no shit for the last 24



      ████████████████
   ████████████████████████
██████████████████████████████
█████████████████████████████████
███████████████████████████████████
█████████████████████████████████████
██████████████████████████████████████
███████████████████████████████████████
█████████████████   ███████████████████
█████████████████        ███████████████
█████████████████          █████████████
█████████████████            ████████████
█████████████████             ███████████
█████████████████             ███████████
█████████████████              ██████████
█████████████████              ██████████
█████████████████             ███████████
█████████████████            ███████████
█████████████████          █████████████
█████████████████      ███████████████
█████████████████ ████████████████████
█████████████████████████████████████
███████████████████████████████████
█████████████████████████████████
██████████████████████████████
██████████████████████████
     █████████████████
          ████
DIA | OPEN ACCESS FINANCIAL DATA
nmersulypnem
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 19, 2013, 04:33:15 PM
 #838

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

Can I pass in the sieve size, or do I need to recompile?
xyzzy099
Legendary
*
Offline Offline

Activity: 1062
Merit: 1041



View Profile
July 19, 2013, 04:35:55 PM
 #839

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

Can I pass in the sieve size, or do I need to recompile?

You can pass it on the command line with the '-sievesize' parameter, or you can put sievesize=<size> in your primecoin.conf.

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

Activity: 217
Merit: 100


View Profile
July 19, 2013, 04:38:49 PM
 #840

I have 60 computers 30 i5-3550 and 30 core2duo 8200...for the last 2 days i just mined 3 blocks OMG each pc have different wallet, now i try all of them using just 1 wallet, are those 60 cpu add their primespersec when mining? because when i try to getprimespersec they give different value.
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 ... 131 »
  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!