SETTING
AVAILABLE MEMORY
The P-1 factoring step prior to running a Lucas-Lehmer test is more effective if it
is given more memory to work with. However,
if you let the program use too much memory then the performance of ALL programs
will suffer. The good news is that 98%
of the time the program uses less than 8MB.
In fact, the program will work just fine if you instruct the program to
use only 8MB or less.
So how do you intelligently choose the available
memory settings? Below are some steps
you might take to figure this out:
1.
Be conservative.
It is better to set the available memory too low than too high. Setting the value too high can cause
thrashing which slows down all programs.
Remember, the program will only use the extra memory in stage 2 of P-1
factoring (about 12 hours a month).
2.
Start with how much memory is installed in your
machine. Allow a reasonable amount of
memory for the OS and whatever background tasks you run (say 16 or 24MB). This represents the maximum value you should
use. The program won't let you enter more than 90% of installed memory.
3.
Assuming you run your machine 24 hours a day, what
hours of the day do you not use your computer?
Make these your nighttime hours and let the program use a lot of memory
during these hours. But reduce this
value if you also run batch jobs at night.
4.
Factor in the information below about minimum,
reasonable, and desirable memory amounts for some sample exponents.
Exponent |
Minimum |
Reasonable |
Desirable
|
6,000,000 |
12MB |
23MB |
33MB |
10,000,000 |
19MB |
36MB |
53MB |
33,000,000 |
65MB |
125MB |
185MB |
For example, my machine is a dual-processor with 128MB
of memory. Each CPU runs an LL test on
an exponent near 10 million. On the off
chance that both CPUs wind up doing P-1 factoring at the same time, I don't
want to set the available memory to more than half of the 128MB. I guess Windows NT can survive on 24MB of
memory. Thus, I set the available
memory to (128 - 24) / 2 or 52MB. This
is my nighttime setting. During the day, I set the available memory to 24MB. I can always stop prime95 if it is doing P-1
factoring and I detect memory thrashing.
More casual users will probably want to set the daytime memory to 8MB so
they don't have to worry about it.
If at all in doubt, leave the settings at 8MB. The worst that will happen is you end up
running a Lucas-Lehmer primality test
when stage 2 of P-1 factoring would have found a factor.