Bitcoin Forum
June 12, 2025, 12:38:29 PM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 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 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ... 131 »
  Print  
Author Topic: [XPM] [ANN] Primecoin High Performance | HP14 released!  (Read 397723 times)
mikaelh (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


View Profile
July 23, 2013, 03:03:47 PM
 #1141

hey mikaelh!
try this: in the function FermatProbablePrimalityTestFast, you don't need this part:

Code:
   // Failed Fermat test, calculate fractional length
    mpz_sub(mpzE, mpzN, mpzR);
    mpz_mul_2exp(mpzR, mpzE, nFractionalBits);
    mpz_tdiv_q(mpzE, mpzR, mpzN);
    unsigned int nFractionalLength = mpz_get_ui(mpzE);
    if (nFractionalLength >= (1 << nFractionalBits))
        return error("FermatProbablePrimalityTest() : fractional assert");
    nLength = (nLength & TARGET_LENGTH_MASK) | nFractionalLength;

If Fermat's test fails, just return false. The fractional part is irrelevant if your first number in the chain is not prime. Since most candidates fail Fermat's test, this code is executed many times, so it should give you some speed up. It did increase PPS 25% for me, but I didn't have the trial division optimization.
btw, I don't know how effective is that, we are looking for Fermat's pseudo primes to the base 2, not for actual primes, so maybe your optimization is filtering numbers that would have passed the test.

For those who'd like to share some love: ARQYnPjkeSgtmx41bypmnkbcHLvWPafGR5
I'd do a pull request, but there's no github anymore


regards

Well, that's a nice idea. The fractional part is definitely useless if the first number in the chain is not a prime. My profiling software shows that about 0.4% of cycles are spent calculating the fractional part. So it's not a huge optimization but it's something.

You need to be careful with the return values though. You can easily start getting false positives if you get them wrong.

And yes, github is still disabled. I probably need to send them another e-mail. In the meantime you use bitbucket or just send me some patches.
mikaelh (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


View Profile
July 23, 2013, 03:13:37 PM
 #1142

OK I was full of sh!t, I went back to version 5 and 1M SS as I had been using and I get relatively low PPS, so it must simply be the difficulty increase you mentioned. The highest PPS values I am seeing now with v5 is ~1760 but often it reports lower than that, usually ~1300-1400. This is what I was getting with v7. I'm surprised the difficulty has had such a impact so quickly, I'm sure just last night it was regularly over 2000 PPS. I just saw your OP edit:

Quote
2. Network difficulty has changed. Prime rate goes down when the integer part of the difficulty changes (i.e. going from 8.xx to 9.xx). It's a feature of the mining algorithm and nothing can be done about it.

I had been assuming it was continuously varying between the integers.  Undecided

FWIW I'm using a Core2Quad Q9550 @ stock speeds (2.83 GHz).

I am glad though that the sievesize parameter issue has been cleared up though.

Yup, I'm also glad it got sorted out. I updated the FAQ yet again about the command line parameters.
gateway
Hero Member
*****
Offline Offline

Activity: 552
Merit: 500


View Profile
July 23, 2013, 04:33:55 PM
 #1143

Can some kind soul give a good non mathematical explanation of sievesize, and what is a good setting, when to change it etc.. ?

cheers
bitrich
Member
**
Offline Offline

Activity: 109
Merit: 10



View Profile
July 23, 2013, 04:44:22 PM
 #1144

Ok, Im running i5 2410M @2.30mhz hp7
Have 3mb cache I believe
Seems I get the best pps with sieve size 1M and Sieve percentage 1
Im getting around 2600pps and only 3-5 chains per min.
Ive adjusted the sieve size to 2M pps goes down slightly CPM stays the same
Ive tried playing with sieve percentage and as I go up pps goes down and CPM jumps around but basically stays between 3-5
When I increase sieve size to 4M my pps goes way down to around 600-900pps and 1-2CPM
Cant seem to find a sweet spot yet havent found a block in 3 days. Anyone have any info on settings for my cpu or just performance with different parameters?
paulthetafy
Hero Member
*****
Offline Offline

Activity: 820
Merit: 1000


View Profile
July 23, 2013, 04:48:37 PM
 #1145

Ok, Im running i5 2410M @2.30mhz hp7
Have 3mb cache I believe
Seems I get the best pps with sieve size 1M and Sieve percentage 1
Im getting around 2600pps and only 3-5 chains per min.
Ive adjusted the sieve size to 2M pps goes down slightly CPM stays the same
Ive tried playing with sieve percentage and as I go up pps goes down and CPM jumps around but basically stays between 3-5
When I increase sieve size to 4M my pps goes way down to around 600-900pps and 1-2CPM
Cant seem to find a sweet spot yet havent found a block in 3 days. Anyone have any info on settings for my cpu or just performance with different parameters?

From my experience you really don't want sievepercentage lower than 8.  1 is very bad and way too low.  Use the 5-chains value from debug.log as a performance guide too.  A lower sievepercentage will increase PPS but that's a bad indicator to use.  The sievepercentage is 10 by default for a reason and that is because for many people this will be the optimal number.  The same is true for sievesize.  You do have to play around to get a good combination but do NOT use PPS as a performance guide. 
shandafa
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
July 23, 2013, 05:07:26 PM
 #1146

Is it already too difficult to get some results?

I'm mining with an i7 and get ~800-1000 pps. But didn't find anything in the last 20h  Sad
bitrich
Member
**
Offline Offline

Activity: 109
Merit: 10



View Profile
July 23, 2013, 05:33:31 PM
 #1147

Ok, Im running i5 2410M @2.30mhz hp7
Have 3mb cache I believe
Seems I get the best pps with sieve size 1M and Sieve percentage 1
Im getting around 2600pps and only 3-5 chains per min.
Ive adjusted the sieve size to 2M pps goes down slightly CPM stays the same
Ive tried playing with sieve percentage and as I go up pps goes down and CPM jumps around but basically stays between 3-5
When I increase sieve size to 4M my pps goes way down to around 600-900pps and 1-2CPM
Cant seem to find a sweet spot yet havent found a block in 3 days. Anyone have any info on settings for my cpu or just performance with different parameters?

From my experience you really don't want sievepercentage lower than 8.  1 is very bad and way too low.  Use the 5-chains value from debug.log as a performance guide too.  A lower sievepercentage will increase PPS but that's a bad indicator to use.  The sievepercentage is 10 by default for a reason and that is because for many people this will be the optimal number.  The same is true for sievesize.  You do have to play around to get a good combination but do NOT use PPS as a performance guide. 

Seems my 5-chains value is between 60-360 with SP=8 and SS=1M (running closer to default settings)
Whats would be a decent 5-chains value range for my system?
Looking back on the log I have had up to 500 5-chains, but I will have to go back again and see what settings produced what. How useful is CPM?

Stinky_Pete
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500


View Profile
July 23, 2013, 06:20:27 PM
Last edit: July 23, 2013, 09:57:33 PM by Stinky_Pete
 #1148

Installed hp7 last night and today got my first block for a week  Smiley

Of course it may be coincidence  Undecided

Off to install on my other machines

*** 4 hours later ***
3 more newly mined blocks - mikaelh is a mining god!

notlist3d
Legendary
*
Offline Offline

Activity: 1456
Merit: 1000



View Profile
July 23, 2013, 06:29:17 PM
 #1149

anything over 2000000 and mine crashes. x64 bit launches and stops closes window.
PoolMinor
Legendary
*
Offline Offline

Activity: 1844
Merit: 1338


XXXVII Fnord is toast without bread


View Profile
July 23, 2013, 06:51:48 PM
 #1150

anything over 2000000 and mine crashes. x64 bit launches and stops closes window.

+1 running on Windows

Btc=C2MF       Free BTC Poker
Being defeated is often a temporary condition. Giving up is what makes it permanent. -Marilyn vos Savant
eule
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


View Profile
July 23, 2013, 06:54:02 PM
 #1151

Hmm i run at 2048000 on debian x64.  Grin

gigawatt
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
July 23, 2013, 07:52:02 PM
 #1152

anything over 2000000 and mine crashes. x64 bit launches and stops closes window.

You sure you're on the newest version (hp7)?  I just tested 10mil on x64 and it worked fine.

BTC: 1E2egHUcLDAmcxcqZqpL18TPLx9Xj1akcV   Ψ: AWHJbwoM67Ez12SHH4pH5DnJKPoMSdvLz2   Primecoin All-In-One VPS Setup Script   Quarkcoin All-In-One VPS Setup Script   Metiscoin VPS Pool Mining Script
xyzzy099
Legendary
*
Offline Offline

Activity: 1068
Merit: 1109



View Profile
July 23, 2013, 08:01:13 PM
 #1153

anything over 2000000 and mine crashes. x64 bit launches and stops closes window.

You sure you're on the newest version (hp7)?  I just tested 10mil on x64 and it worked fine.

What kind of CPU are you using?  I have an i7 3820, and I have been reporting this problem since at least hp4.  I used to be able to go up to 4M just fine, and anything over that crashed - but with hp7, anything much over 2M crashes.

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

Activity: 168
Merit: 100



View Profile
July 23, 2013, 08:14:54 PM
 #1154

anything over 2000000 and mine crashes. x64 bit launches and stops closes window.

You sure you're on the newest version (hp7)?  I just tested 10mil on x64 and it worked fine.

What kind of CPU are you using?  I have an i7 3820, and I have been reporting this problem since at least hp4.  I used to be able to go up to 4M just fine, and anything over that crashed - but with hp7, anything much over 2M crashes.


Core i5-3210, 2.50GHz

I've had mine running at ~4M for the last few hours without a hiccup.  I ran 10M on accident (had an extra zero) for about half an hour.

BTC: 1E2egHUcLDAmcxcqZqpL18TPLx9Xj1akcV   Ψ: AWHJbwoM67Ez12SHH4pH5DnJKPoMSdvLz2   Primecoin All-In-One VPS Setup Script   Quarkcoin All-In-One VPS Setup Script   Metiscoin VPS Pool Mining Script
wlwesq
Newbie
*
Offline Offline

Activity: 52
Merit: 0



View Profile
July 23, 2013, 08:27:23 PM
 #1155

Is it already too difficult to get some results?

I'm mining with an i7 and get ~800-1000 pps. But didn't find anything in the last 20h  Sad

I think it might be already too difficult. I'm running on OS X 10.8.4, and I set up an Ubuntu OS in VMWare Fusion. It's running around 600-700 ops, has gone through almost 80,000 blocks in 24 hours, and there's nothing produced so far. I'll let it keep running for a few days. I understand that luck is a major factor, so maybe lady luck will visit me.
notlist3d
Legendary
*
Offline Offline

Activity: 1456
Merit: 1000



View Profile
July 23, 2013, 08:55:45 PM
 #1156

anything over 2000000 and mine crashes. x64 bit launches and stops closes window.

You sure you're on the newest version (hp7)?  I just tested 10mil on x64 and it worked fine.

What kind of CPU are you using?  I have an i7 3820, and I have been reporting this problem since at least hp4.  I used to be able to go up to 4M just fine, and anything over that crashed - but with hp7, anything much over 2M crashes.


I7 3930
crendore
Sr. Member
****
Offline Offline

Activity: 363
Merit: 250


View Profile
July 23, 2013, 09:05:28 PM
 #1157

Is it already too difficult to get some results?

I'm mining with an i7 and get ~800-1000 pps. But didn't find anything in the last 20h  Sad

I think it might be already too difficult. I'm running on OS X 10.8.4, and I set up an Ubuntu OS in VMWare Fusion. It's running around 600-700 ops, has gone through almost 80,000 blocks in 24 hours, and there's nothing produced so far. I'll let it keep running for a few days. I understand that luck is a major factor, so maybe lady luck will visit me.

Why not run native? you could probably get better PPS than that. and the code compiles fine native OSX.

Tamis
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250



View Profile
July 23, 2013, 09:36:24 PM
 #1158

SS 4M crashes client here, 3.6M works, i7 3770k
redphlegm
Sr. Member
****
Offline Offline

Activity: 246
Merit: 250


My spoon is too big!


View Profile
July 23, 2013, 09:58:16 PM
 #1159

Is it already too difficult to get some results?

I'm mining with an i7 and get ~800-1000 pps. But didn't find anything in the last 20h  Sad

I think it might be already too difficult. I'm running on OS X 10.8.4, and I set up an Ubuntu OS in VMWare Fusion. It's running around 600-700 ops, has gone through almost 80,000 blocks in 24 hours, and there's nothing produced so far. I'll let it keep running for a few days. I understand that luck is a major factor, so maybe lady luck will visit me.

Why not run native? you could probably get better PPS than that. and the code compiles fine native OSX.

I've tried it. For some reason running it in a VM on Ubuntu gives 2-3x the performance. No idea why.

Whiskey Fund: (BTC) 1whiSKeYMRevsJMAQwU8NY1YhvPPMjTbM | (Ψ) ALcoHoLsKUfdmGfHVXEShtqrEkasihVyqW
Trillium
Hero Member
*****
Offline Offline

Activity: 546
Merit: 500



View Profile
July 24, 2013, 12:18:34 AM
 #1160

So it seems like a few people cant get sievesize to 4M or more.

I am not experienced enough with the code/theory to explain why this might be happening, maybe mikaelh can work it out of we post our infos.

I have it crashing on both machines that I mine with when I set it to 4M.

As another member pointed out, it seems possible to mine with 3.6M but going to 3.7M will make it crash every time.

My machines are fairly different:

Main rig:
Core2Quad Q9550 (2.83 GHz)
4 GB DDR3 @ 667 MHz
Asus P5Q3 Deluxe Wifi@n version
6870+5970+5750
Vista 64 fully updated

Repurposed Dell office PC:
Core2Duo E8400 (3 GHz)
4 GB DDR2 @ 400 MHz
Dell 0Y958C (intel?) motherboard
PCI 8 MB Ati Rage graphics card + onboard
Win7 64 fully updated

both now running hp7 of course.

Looking further, it seems that the limit is around 3642400... but it is not a fixed thing. For example sometimes it will work and othertimes it wont, but it seems to center around this value for me. If it doesn't crash immediately then it seems to mine happily. It crashes as soon as a network connection is established and mining begins, if it's going to crash.

BTC:1AaaAAAAaAAE2L1PXM1x9VDNqvcrfa9He6
Pages: « 1 ... 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 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ... 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!