Pages:
Author

Topic: [XPM] [ANN] Primecoin High Performance | HP14 released! - page 91. (Read 397616 times)

full member
Activity: 200
Merit: 100
29 hours is not found block. The rate has increased by 200-300pps, but no blocks.
How are you?
Sorry my english.
member
Activity: 72
Merit: 10
primecoin@HP5 ... just finded block
4k pps
full member
Activity: 224
Merit: 100
2 dedicated rigs mining with 1500pps each since 9days.
One got 9 blocks last block 3 days ago.
other got 0 blocks.
random is random.

sr. member
Activity: 294
Merit: 250
Sorry i am new to all this ...
But there is one thing i dont get.
I tryed to run it with a primecoin.conf file and changed parameters like rpcuser ... rpcpassword ... gen=0 gen=1 and also with rpcport=9910 rpcallowip=127.0.0.1 with server=1 and daemon=1.
I did not receive any block in earlier stages ... difficulty was past 8 to this stage ...
as i deleted the conf file and run the wallet without it i received two blocks in two hours ...
How can that be ... Luck ? I was using hp3 ...
So my question is is the conf file needed or not ??

Thx

That is indeed called pure luck.

Any news with HP5 and if its doing any good?

What has your results shown from all different versions?
sr. member
Activity: 301
Merit: 250
Sorry i am new to all this ...
But there is one thing i dont get.
I tryed to run it with a primecoin.conf file and changed parameters like rpcuser ... rpcpassword ... gen=0 gen=1 and also with rpcport=9910 rpcallowip=127.0.0.1 with server=1 and daemon=1.
I did not receive any block in earlier stages ... difficulty was past 8 to this stage ...
as i deleted the conf file and run the wallet without it i received two blocks in two hours ...
How can that be ... Luck ? I was using hp3 ...
So my question is is the conf file needed or not ??

Thx

That is indeed called pure luck.
sr. member
Activity: 301
Merit: 250
aws cc2.8xlarge,
primecoin-0.1.1-hp5 two changes:

1) prime.cpp
const unsigned int nPrimes = (uint64)nTotalPrimes * 8 / 100;  // down from 10

2) main.cpp
static const unsigned int nPrimorialHashFactor = 9; // up from 7

You seem to be testing two changes at the same time. The first change will definitely affect performance while the second change shouldn't as people have already pointed out. It's likely you're only seeing the effects of the first change you did.
mikael, knowing your work I'll take your word for it, do you agree that 1) is a change for the better and will not negatively effect block finding?

The first parameter he changed definitely has a huge impact on performance, that's for sure. The parameter is based on sieve round limit implemented by Sunny King. As you probably know, that resulted in a pretty big performance boost. I'm using a static percentage value in my code instead of counting microseconds.

Changing that percentage may indeed improve performance on some system. It depends on the efficiency difference between the sieve and the primality tester. I may change the percentage into a configuration parameter in the future.
newbie
Activity: 18
Merit: 0
Sorry i am new to all this ...
But there is one thing i dont get.
I tryed to run it with a primecoin.conf file and changed parameters like rpcuser ... rpcpassword ... gen=0 gen=1 and also with rpcport=9910 rpcallowip=127.0.0.1 with server=1 and daemon=1.
I did not receive any block in earlier stages ... difficulty was past 8 to this stage ...
as i deleted the conf file and run the wallet without it i received two blocks in two hours ...
How can that be ... Luck ? I was using hp3 ...
So my question is is the conf file needed or not ??

Thx
hero member
Activity: 820
Merit: 1000
aws cc2.8xlarge,
primecoin-0.1.1-hp5 two changes:

1) prime.cpp
const unsigned int nPrimes = (uint64)nTotalPrimes * 8 / 100;  // down from 10

2) main.cpp
static const unsigned int nPrimorialHashFactor = 9; // up from 7

You seem to be testing two changes at the same time. The first change will definitely affect performance while the second change shouldn't as people have already pointed out. It's likely you're only seeing the effects of the first change you did.
mikael, knowing your work I'll take your word for it, do you agree that 1) is a change for the better and will not negatively effect block finding?
hero member
Activity: 518
Merit: 502
Huh. If this chart is correct, me and a friend are collectively mining 10% of all blocks in the past 24 hours. Kind of cool to be a big fish for once.

Sunny and Mikael are going to be seeing a huge donation from me if this goes well. Smiley
You're claiming you found 400 blocks in the last 24 hours?
Each of us has collected over 2k XPM in the past day. 200 blocks*

Just out of curiosity: How much pps are you fielding for that?
sr. member
Activity: 301
Merit: 250
aws cc2.8xlarge,
primecoin-0.1.1-hp5 two changes:

1) prime.cpp
const unsigned int nPrimes = (uint64)nTotalPrimes * 8 / 100;  // down from 10

2) main.cpp
static const unsigned int nPrimorialHashFactor = 9; // up from 7

You seem to be testing two changes at the same time. The first change will definitely affect performance while the second change shouldn't as people have already pointed out. It's likely you're only seeing the effects of the first change you did.
sr. member
Activity: 301
Merit: 250
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.
sr. member
Activity: 392
Merit: 250
me too. I reboot my vps and then it work.
sr. member
Activity: 294
Merit: 250
can someone provide proper instructions for HP5?

Seems like the folders are different and I am getting a blank screen after running the watch command.
grc
newbie
Activity: 40
Merit: 0
Quote
I could be wrong, but I'm not convinced this change will make any significant difference. The primorial of 7 is the same as that of 9, since 8 and 9 aren't primes.
No this is not what primorial means.  

primorial(1) = 2
primorial(2) = 2 * 3
primorial(3) = 2 * 3 * 5
and so forth.
primorial(7) = 2 * 3 * 5 * 7 * 11 * 13 * 17 = 510510
primorial(9) = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19 * 23 = 223092870



Notice the list of divisors this produces when using p#9 * some random price
> bc
print 223092870 * 498497689
111211280127377430

http://www.wolframalpha.com/input/?i=factor+%28111211280127377430%29



Honestly I can't say I really understand what the code is doing here, but based on some the comments from Kooooooj and running through gprof, Weave is sucking up all the time -- so I was trying to push some of the work out of there and into the caller function.  I am 100% speculating also that the increases in difficulty may make the primorial a little more important. But anyway, mostly just hacking.


oh well, off to bed.

Sorry, I was thinking of this definition, where the primorial of a number is defined as the product of all primes ≤ n.

It seems to be implemented this way in prime.cpp, as the Primorial function stops at the first prime greater than the given number:

Code:
void Primorial(unsigned int p, mpz_class& mpzPrimorial)
{
    mpzPrimorial = 1;
    BOOST_FOREACH(unsigned int nPrime, vPrimes)
    {
        if (nPrime > p) break;
        mpzPrimorial *= nPrime;
    }
}
newbie
Activity: 23
Merit: 0
Quote
Have you found any blocks with these changes? My very poor understanding of the algorithm suggests that changing the has factor will not work...

No - I only was testing based on some of Koooooj's comments to see if there was a possible tradeoff.
The primecoin paper says:

Quote
In one case, varying nonce and finding a block header hash that is divisible by a small
primorial number – the product of all primes smaller than a given prime p – can help
only slightly. It allows the prime miner to work on somewhat smaller primes, like maybe
a few digits shorter, for prime numbers of typically 100 digits, only a very small
advantage.

which suggested further that this is only used to help make finding candidates faster.

--------

Related, I finally was able to coerce primecoind to compile on FreeBSD.  Here are some stats for an HP DL 585 w/64 cores -- which is actually almost the same for 5-chains as the cc2.8xlarge:
2013-07-19 07:21:20 primemeter  52706242 prime/h 409095802 test/h      2700 5-chains/h
2013-07-19 07:22:20 primemeter  55256799 prime/h 430313188 test/h      2820 5-chains/h
2013-07-19 07:23:20 primemeter  57252732 prime/h 451175301 test/h      3180 5-chains/h
2013-07-19 07:24:20 primemeter  60431918 prime/h 472296745 test/h      2280 5-chains/h
2013-07-19 07:25:20 primemeter  49530089 prime/h 384528982 test/h      2460 5-chains/h
2013-07-19 07:26:20 primemeter  51512423 prime/h 400527689 test/h      1980 5-chains/h


If you're interested in compiling for FreeBSD, you also will need to install the usual libraries and also change init.cpp:
Code:
//    nMaxConnections = std::max(std::min(nMaxConnections, FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS), 0);
    nMaxConnections = std::max(std::min(nMaxConnections, static_cast(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS)), 0);
I had to specify the install paths for a lot of things and remove the explicit -ldl in the makefile as well.. go figure.



Quote
Did you test with other number aswell?
Yes, I did 10, 11, 12, 13, 14, 15, 16, 17.  It starts to get bad around 13 on the big aws instance.

Quote
I could be wrong, but I'm not convinced this change will make any significant difference. The primorial of 7 is the same as that of 9, since 8 and 9 aren't primes.
No this is not what primorial means.  

primorial(1) = 2
primorial(2) = 2 * 3
primorial(3) = 2 * 3 * 5
and so forth.
primorial(7) = 2 * 3 * 5 * 7 * 11 * 13 * 17 = 510510
primorial(9) = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19 * 23 = 223092870



Notice the list of divisors this produces when using p#9 * some random price
> bc
print 223092870 * 498497689
111211280127377430

http://www.wolframalpha.com/input/?i=factor+%28111211280127377430%29



Honestly I can't say I really understand what the code is doing here, but based on some the comments from Kooooooj and running through gprof, Weave is sucking up all the time -- so I was trying to push some of the work out of there and into the caller function.  I am 100% speculating also that the increases in difficulty may make the primorial a little more important. But anyway, mostly just hacking.


oh well, off to bed.
grc
newbie
Activity: 40
Merit: 0
2) main.cpp
static const unsigned int nPrimorialHashFactor = 9; // up from 7

I could be wrong, but I'm not convinced this change will make any significant difference. The primorial of 7 is the same as that of 9, since 8 and 9 aren't primes.
sr. member
Activity: 392
Merit: 250
Thanks for the data Astrokev.
We see the pps is lower but the 5-chain bigger with your change. I think it's good, 5chain seems a better indicator.

Did you test with other number aswell?
hero member
Activity: 820
Merit: 1000
Some more stats for people to have fun with:

aws cc2.8xlarge,
primecoin-0.1.1-hp5 native

2013-07-19 06:03:07 primemeter  79132085 prime/h 688566896 test/h      2040 5-chains/h
2013-07-19 06:04:07 primemeter  79653622 prime/h 698384521 test/h      2700 5-chains/h
2013-07-19 06:05:07 primemeter  79337338 prime/h 695558447 test/h      2040 5-chains/h
2013-07-19 06:06:07 primemeter  79792250 prime/h 695628406 test/h      1560 5-chains/h
2013-07-19 06:07:07 primemeter  80470419 prime/h 705139328 test/h      2280 5-chains/h
2013-07-19 06:08:07 primemeter  80764354 prime/h 704518758 test/h      1980 5-chains/h
2013-07-19 06:09:07 primemeter  76383887 prime/h 667428216 test/h      1500 5-chains/h


avg 5-chains/h ~~ 2000

------

aws cc2.8xlarge,
primecoin-0.1.1-hp5 two changes:

1) prime.cpp
const unsigned int nPrimes = (uint64)nTotalPrimes * 8 / 100;  // down from 10

2) main.cpp
static const unsigned int nPrimorialHashFactor = 9; // up from 7

2013-07-19 06:12:12 primemeter  52307908 prime/h 395403610 test/h      2640 5-chains/h
2013-07-19 06:13:12 primemeter  56580497 prime/h 440204443 test/h      2820 5-chains/h
2013-07-19 06:14:12 primemeter  56291842 prime/h 438057079 test/h      3000 5-chains/h
2013-07-19 06:15:12 primemeter  56267549 prime/h 437380981 test/h      2100 5-chains/h
2013-07-19 06:16:12 primemeter  56236005 prime/h 432883711 test/h      2580 5-chains/h
2013-07-19 06:17:12 primemeter  54281275 prime/h 412524505 test/h      2580 5-chains/h
2013-07-19 06:18:12 primemeter  54689509 prime/h 419307812 test/h      2220 5-chains/h

avg 5-chains/h ~~ 2500


Have you found any blocks with these changes? My very poor understanding of the algorithm suggests that changing the has factor will not work...
newbie
Activity: 23
Merit: 0
Some more stats for people to have fun with:

aws cc2.8xlarge,
primecoin-0.1.1-hp5 native

2013-07-19 06:03:07 primemeter  79132085 prime/h 688566896 test/h      2040 5-chains/h
2013-07-19 06:04:07 primemeter  79653622 prime/h 698384521 test/h      2700 5-chains/h
2013-07-19 06:05:07 primemeter  79337338 prime/h 695558447 test/h      2040 5-chains/h
2013-07-19 06:06:07 primemeter  79792250 prime/h 695628406 test/h      1560 5-chains/h
2013-07-19 06:07:07 primemeter  80470419 prime/h 705139328 test/h      2280 5-chains/h
2013-07-19 06:08:07 primemeter  80764354 prime/h 704518758 test/h      1980 5-chains/h
2013-07-19 06:09:07 primemeter  76383887 prime/h 667428216 test/h      1500 5-chains/h


avg 5-chains/h ~~ 2000

------

aws cc2.8xlarge,
primecoin-0.1.1-hp5 two changes:

1) prime.cpp
const unsigned int nPrimes = (uint64)nTotalPrimes * 8 / 100;  // down from 10

2) main.cpp
static const unsigned int nPrimorialHashFactor = 9; // up from 7

2013-07-19 06:12:12 primemeter  52307908 prime/h 395403610 test/h      2640 5-chains/h
2013-07-19 06:13:12 primemeter  56580497 prime/h 440204443 test/h      2820 5-chains/h
2013-07-19 06:14:12 primemeter  56291842 prime/h 438057079 test/h      3000 5-chains/h
2013-07-19 06:15:12 primemeter  56267549 prime/h 437380981 test/h      2100 5-chains/h
2013-07-19 06:16:12 primemeter  56236005 prime/h 432883711 test/h      2580 5-chains/h
2013-07-19 06:17:12 primemeter  54281275 prime/h 412524505 test/h      2580 5-chains/h
2013-07-19 06:18:12 primemeter  54689509 prime/h 419307812 test/h      2220 5-chains/h

avg 5-chains/h ~~ 2500




sr. member
Activity: 784
Merit: 250
DIA | Data infrastructure for DeFi
Where do I go for the latest miner updates etc?

Page 1 of this thread.
Pages:
Jump to: