On Wednesday 30 October 2002 02:34,  Nathan Russell wrote:
>
> Thanks to everyone who responded.  In this case, it's a bug in my
> thinking.  I had the memory usage set to the max allowable, because I
> wanted P-1 to succeed whenever possible, even if it inconvenienced me
> - I do most of my academic work via VNC into timeshares, so it isn't a
> big deal if the system thrashes.
>
> Is that the Wrong Thing (tm) to do in terms of improving Prime95's
> efficiency?

No, in principle its the Right Thing (tm). In practise you want to set the 
memory parameters big enough that that all available memory is in use, but 
just small enough that swap thrashing doesn't occur. Because swap thrashing 
is _so_ limiting to memory access speed, it's best to be on the cautious side 
- especially since you may occasionally want to do some "real work" on the 
system.

My current practise is as follows:

On systems with 128 MB memory, or less, set max memory to half the memory 
size. (Obviously this is not sane on systems with very small memory ...)
On systems with more than 128 MB memory, set max memory to memory size less 
80 MB. Except for one system with 512 MB which regularly processes very large 
files, so I limit mprime to 128 MB to avoid any possibility of the system 
having to sort files hundreds of megabytes in size in only ~ 40 MBytes real 
memory. Remember the OS kernel consumes memory too!

>From the point of view of "torture testing" a system, again the sane thing 
is to test as much memory as possible. Causing swap thrashing by setting the 
memory allocation set a bit too high may be a good way of testing the disk 
I/O subsystem; however the fact that the processor will be idle waiting for 
data for a lot of the time may (depending on the CPU, power economy settings 
in the BIOS etc) allow the CPU to run cooler than it normally would. So, if 
you're testing out CPU cooling rather than memory problems, setting memory 
allocation very small (i.e. 8 MB) for the duration of the torture test is 
probably wise.

If you really suspect you have a memory subsystem problem, ideally it's best 
to use a specialist program like memtest86 which runs without an operating 
system. You simply can't guarantee to test all memory properly with any 
program running on a multitasking operating system (unless the basic 
capability is built into the kernel itself!)

Regards
Brian Beesley

_________________________________________________________________________
Unsubscribe & list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers

Reply via email to