![]() |
P95, P-1 and HighMemWorkers
I was curious about how P95 works in regards to doing P-1 when you have HighMemWorkers=1. If I start 2 cores on P-1, obviously the first one to finish stage 1 starts stage 2 while the 2nd one (I'm guessing) finishes stage 1 and then goes on to do another stage 1. The question I have is what happens when the stage 2 finishes? I figure that either 1) the second core stops the current P-1 in progress and starts the Stage 2 it skipped, 2) it completes the stage 1 in progress and then goes back to run the skipped stage 2 followed by the stage 2 for the exp just completed. Can someone shed light on this? Thanks.
|
[QUOTE=bcp19;281722]I was curious about how P95 works in regards to doing P-1 when you have HighMemWorkers=1. If I start 2 cores on P-1, obviously the first one to finish stage 1 starts stage 2 while the 2nd one (I'm guessing) finishes stage 1 and then goes on to do another stage 1. The question I have is what happens when the stage 2 finishes? I figure that either 1) the second core stops the current P-1 in progress and starts the Stage 2 it skipped, 2) it completes the stage 1 in progress and then goes back to run the skipped stage 2 followed by the stage 2 for the exp just completed. Can someone shed light on this? Thanks.[/QUOTE]
Absolutely.....I've got several multi core PCs doing all P-1. A. Both cores start stage 1 B. Assume core X finishes stage 1 first and starts stage 2 C. Later core Y finishes stage 1; Max HMW exceeded; it proceeds to stage 1 on the second exponent D. Core Y will likely finish stage 1 on second exponent and proceed to stage 1 on third exponent before Core X finishes stage 2 on first exponent. E. Core X finishes stage 2; Core Y IMMEDIATELY stops stage 1 in progress and goes back to first exponent to do stage 2. F. Core X finishes stage 1 on its second exponent and goes to stage 1 on third exponent exponent G. Core Y finishes stage 2 on first exponent and continues stage 1 where it left off on the second exponent etc. etc |
@[URL="http://www.mersenneforum.org/member.php?u=2879"]petrw1[/URL]: I really appreciate the detailed explanation of the "Dance of the P-1 Workers". Thanks!
|
[QUOTE=petrw1;281735]Absolutely.....I've got several multi core PCs doing all P-1.[/QUOTE]Thank you for this scenario.
[quote]< snip > D. Core Y will likely finish stage 1 on second exponent and proceed to stage 1 on third exponent before Core X finishes stage 2 on first exponent. < snip > G. Core Y finishes stage 2 on first exponent and continues stage 1 where it left off on the [strike]second[/strike][/quote] [I](you meant)[/I] third [quote]exponent etc. etc[/quote] |
[QUOTE=cheesehead;281738]Thank you for this scenario.
[I](you meant)[/I] third[/QUOTE] Oops correct because it is already done stage 1 on the second. |
Stupid question: Does the "switching off" of the "sequential work" in prime.txt has any influence on the behavior of P-1 that you described?
|
[QUOTE=petrw1;281735]Absolutely.....I've got several multi core PCs doing all P-1.
A. Both cores start stage 1 B. Assume core X finishes stage 1 first and starts stage 2 C. Later core Y finishes stage 1; Max HMW exceeded; it proceeds to stage 1 on the second exponent D. Core Y will likely finish stage 1 on second exponent and proceed to stage 1 on third exponent before Core X finishes stage 2 on first exponent. E. Core X finishes stage 2; Core Y IMMEDIATELY stops stage 1 in progress and goes back to first exponent to do stage 2. F. Core X finishes stage 1 on its second exponent and goes to stage 1 on third exponent exponent G. Core Y finishes stage 2 on first exponent and [B]starts stage 2 on exp 2[/B] [B]H. Core X finishes stage 1 on exp 3, starts stage 1 on exp 4[/B] [B]I. Core Y finishes stage 2 on 2nd exponent and [/B]continues stage 1 where it left off on the [B]third [/B]exponent [B]J. Core X stops work on exp 4 and does stage 2 on exp 2 and 3[/B] etc. etc[/QUOTE] If I am understanding you correctly, the bold I put in above is what you meant to say since the time to run stage 2 is generally about 1.5x the time to do stage 1? Meaning over time you will end up with a large stack of stage 2 waiting to be run, which is probably why I see people talk about tossing in a DC every now and then to let it catch up? |
[QUOTE=bcp19;281778]If I am understanding you correctly, the bold I put in above is what you meant to say since the time to run stage 2 is generally about 1.5x the time to do stage 1? Meaning over time you will end up with a large stack of stage 2 waiting to be run, which is probably why I see people talk about tossing in a DC every now and then to let it catch up?[/QUOTE]
Yes, and good point...1.5 is probably a good average; I've seen or heard of Stage 2 being anywhere from about equal to stage 1 and as high as twice. But the bottom line is, as you noted, that as soon as you run more than 1 core of P-1 on a PC and have a highmemworkers less than the number of P-1 cores for even some of the day you will start to see pending stage 2's pile up. And this happens because even the best PCs drop in thruput if all cores are working on stage 2 P-1; and on top of that most PCs are used for real work with Prime95/mprime in the background; and running a few memory intensive P-1 will to a small degree or even a large degree affect this real work. So we try to find the right balance of highmemworkers to maximize thruput and minimize impacts and at the same time not fall too far behind in stage 2. A few strategies are: 1. A you suggested, occasionally have a P-1 worker do other work until stage 2 catches up on others. 2. Allow for more highmemworkers over night or whenever your PC is less likely to be used for real work. 3. Some have done stage 1 on family PC#1 and the migrated the work to secondary PC for stage 2. |
[QUOTE=LaurV;281741]Stupid question: Does the "switching off" of the "sequential work" in prime.txt has any influence on the behavior of P-1 that you described?[/QUOTE]
There must be something which does indeed affect the description given above. In my experience, none of the workers ever stop what they are doing. So everytime a worker finishes it's job, it goes through it's worktodo list and picks up the first available job which satisfies the P95 work policies. |
Yes, the newer versions (from 26.x upward ??) have the SequentialWork=1 by default in prime.txt (even if you put nothing, is treated as 1). I had the feeling in the past that the switch is also influencing the P-1 behavior, but this I will not swear, it maybe was only my impression. Anyhow, I reverted it to SequentialWork=0, because I am happy with doing first the assignments that take shortest time, then struggle with the others. The disadvantage is that sometime LL tests are delayed forever and I have to take care not to add other type of work to worktodo.txt until they are finished.
|
My understanding is that SequentialWorkToDo=0 causes p95 to prioritise initial factoring (both trial and P-1) of LL and DC assignments over other types of work.
|
| All times are UTC. The time now is 20:52. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.