P1 Stage 2 uses "Available Memory" to set up work areas for storing certain repeatedlyused intermediate computed values so that when they are needed again, they need not be recomputed from scratch but can be simply copied from a work area. So the firstorder effect of increased memory is to speed up calculations. One specifies larger "Available Memory" in order to reach a given B2 bound more rapidly.
Or ... (ways it's more commonly thought of) ...
One can specify larger "Available Memory" in order to reach higher B2 bounds in the same amount of time ...
or to reach even higher B2 bounds in an amount of time that is larger, but not as much larger as it would take at a lower "Available Memory".
 
When Prime95 is choosing the B1/B2 combination that optimizes GIMPS throughput, it is only amounts of LL time saved per time of P1 run that are optimized, not space used to perform the P1 calculation.
Example:
(Note: In this example, I made up the limit numbers, probabilities, and run times, to approximate realistic actual numbers I've seen in P1 runs. Yeah, I chose numbers so that the results came out the way I wanted, but I think they're close enough to reality for illustration purposes.)
Suppose that P1 is choosing its own B1/B2 limits, and it's choosing among three alternatives:
combination X (B1=590000,B2=590000  so only Stage 1) has a 1.0% chance of finding a factor,
combination Y (B1=460000,B2=2100000) has a 1.3% chance of finding a factor, and
combination Z (B1=410000,B2=3900000) has a 1.5% chance of finding a factor.
Suppose that if "Available Memory" is 512M, combination X takes 10 hours, combination Y takes 15 hours, and combination Z takes 16 hours.
The efficiency of each choice is proportional to the ratio (chance of finding a factor)/(time to find a factor), so that ratio calculation is the one I use in the following: Prime95 will prefer combination X because 1.0%/10 (.010/10) is greater than 1.3%/15 (.013/15) or 1.5%/16 (.015/16).
Suppose that if "Available Memory" is 1024M, then combination X takes 10 hours, combination Y takes 11 hours, and combination Z takes 15 hours. Prime95 will prefer combination Y because .013/11 is greater than .010/10 or .015/15.
Suppose that if "Available Memory" is 2048M, then combination X takes 10 hours, combination Y takes 10 hours, and combination Z takes 11 hours. Prime95 will prefer combination Z because .015/11 is greater than .010/10 or .013/10.
So with 512M, P1 has a 1.0% chance of finding a factor, with 1024M it has a 1.3% chance, and with 2048M it has a 1.5% chance.
Last fiddled with by cheesehead on 20070526 at 06:42
