mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware

Reply
 
Thread Tools
Old 2010-04-15, 06:35   #1
odin
 
Apr 2010

1B16 Posts
Default What is minimum RAM needed for 6 Core CPU for P-1?

Hello,

I want to build a 6 core system and would like to know what is the minimum amount of ram needed per core to perform P-1 factoring and LL tests optimally?

Is it 300MB per core or more or less?

Thanks.
odin is offline   Reply With Quote
Old 2010-04-15, 06:51   #2
lfm
 
lfm's Avatar
 
Jul 2006
Calgary

52·17 Posts
Default

Quote:
Originally Posted by odin View Post
Hello,

I want to build a 6 core system and would like to know what is the minimum amount of ram needed per core to perform P-1 factoring and LL tests optimally?

Is it 300MB per core or more or less?

Thanks.
300 megabytes per core would probably be overkill if you just want to run prime95 or mprime. I'd recommend Linux 64 bit for best results but ms-windows of almost any vintage works OK too.

If you want to run anything else as well that will probably be more important influence on the memory needed.
lfm is offline   Reply With Quote
Old 2010-04-15, 07:09   #3
odin
 
Apr 2010

110112 Posts
Default

Quote:
Originally Posted by lfm View Post
300 megabytes per core would probably be overkill if you just want to run prime95 or mprime. I'd recommend Linux 64 bit for best results but ms-windows of almost any vintage works OK too.

If you want to run anything else as well that will probably be more important influence on the memory needed.

Thanks for the reply. What is the minimum ram needed to run P-1 factoring tests?

Also why would 64bit linux run better than 32bit linux considering the total amount of ram installed is not any where near 4GB?

I thought 32 bit vs 64 bit only had to do with the amount of memory addressable?

Thanks.
odin is offline   Reply With Quote
Old 2010-04-15, 07:18   #4
lfm
 
lfm's Avatar
 
Jul 2006
Calgary

6518 Posts
Default

Quote:
Originally Posted by odin View Post
Thanks for the reply. What is the minimum ram needed to run P-1 factoring tests?
SOmething like 8mb but it is not quite as effective at finding factors that way.

Quote:
Also why would 64bit linux run better than 32bit linux considering the total amount of ram installed is not any where near 4GB?

I thought 32 bit vs 64 bit only had to do with the amount of memory addressable?
There are also some other 64 bit integer arithmetic operations that can be useful.
lfm is offline   Reply With Quote
Old 2010-04-15, 07:25   #5
odin
 
Apr 2010

33 Posts
Default

Quote:
Originally Posted by lfm View Post
SOmething like 8mb but it is not quite as effective at finding factors that way.
useful.
What would you recommend as optimal then for P-1 factoring?

Could anyone else familiar with the code for mprime way in please?

Thanks lfm.
odin is offline   Reply With Quote
Old 2010-04-15, 07:31   #6
lycorn
 
lycorn's Avatar
 
Sep 2002
Oeiras, Portugal

2×13×53 Posts
Default

If you plan to select P-1 tests as a work type, you should give each test a much bigger amount of memory than the default 8 Mb. Otherwise you will not be performing the tests in an effective manner. P-1 tests are done in 2 stages, and stage 2 will only run if there is enough memory. The chances of finding a factor are much better if you run both stages. I would recommend no less than 300 Mb per core engaged on P-1 tests. Therefore, if you are, say, doing 3 P-1 tests and 3 LL tests on your 6-core system, you should assign no less than 1Gb to Prime95. Note that apart from the P-1 Stage 2, the memory usage of the program is low.
lycorn is offline   Reply With Quote
Old 2010-04-15, 10:01   #7
garo
 
garo's Avatar
 
Aug 2002
Termonfeckin, IE

13·211 Posts
Default

lycorn has made a reasonable suggestion. It might be overkill to set all 6 cores to do P-1 - though there is no reason not to particularly since we are always short of P-1 testers. 300MB is a good amount for 53M tests that are being done today. 500MB is better. After that the marginal gains with every extra MB of RAM get smaller. George's recommendation from the readme.txt is
50000000 85MB 170MB 250MB
for a 50M the min, reasonable and desirable memory.

Also since the max memory is only used during stage 2, you can limit the number of threads that do stage 2 at any one time.
MaxHighMemWorkers=n
This will stagger your stage 2s and when the number of workers doing stage 2 reaches the limit, additional workers will skip stage 2 and do stage 1 on subsequent exponents before returning to do stage 2 when the memory becomes free. If six cores are doing P-1, you could get by with setting MaxHighMemWorkers=4 and still achieve maximal throughput. So you really could get by with only 1GB of RAM and 6 P-1s if you needed to.

If you do real work with the computer during the day you may want to set different amounts of memory available to the computer during the day and night. And set Prime95 to only do stage2 when max memory is available with this switch:
OnlyRunStage2WithMaxMemory=1

Last fiddled with by garo on 2010-04-15 at 10:03
garo is offline   Reply With Quote
Old 2010-04-15, 18:49   #8
odin
 
Apr 2010

33 Posts
Default

Quote:
Originally Posted by garo View Post
lycorn has made a reasonable suggestion. It might be overkill to set all 6 cores to do P-1 - though there is no reason not to particularly since we are always short of P-1 testers. 300MB is a good amount for 53M tests that are being done today. 500MB is better. After that the marginal gains with every extra MB of RAM get smaller. George's recommendation from the readme.txt is
50000000 85MB 170MB 250MB
for a 50M the min, reasonable and desirable memory.

Also since the max memory is only used during stage 2, you can limit the number of threads that do stage 2 at any one time.
MaxHighMemWorkers=n
This will stagger your stage 2s and when the number of workers doing stage 2 reaches the limit, additional workers will skip stage 2 and do stage 1 on subsequent exponents before returning to do stage 2 when the memory becomes free. If six cores are doing P-1, you could get by with setting MaxHighMemWorkers=4 and still achieve maximal throughput. So you really could get by with only 1GB of RAM and 6 P-1s if you needed to.

If you do real work with the computer during the day you may want to set different amounts of memory available to the computer during the day and night. And set Prime95 to only do stage2 when max memory is available with this switch:
OnlyRunStage2WithMaxMemory=1
Thanks garo for the suggestion. I actually don't want this to run P-1 factoring test only but I want it to primarily run LL test but the assignment from the server may require a P-1 test performed first so that is why I'm interested in RAM requirements. I would like to give mprime the best chance of finding a factor and avoid having to run a pointless LL test.

Here is what I think I'll do. I'll install 2GB of RAM and run mprime under Ubuntu Server 64bit. I'll allocate 1800MB of RAM for testing and then use:

MaxHighMemWorkers=1
OnlyRunStage2WithMaxMemory=1

That way the full RAM is available to each Stage 2 test and has the best opportunity for finding a factor and avoiding a useless LL test.

Garo forgot to mention that the above parameters should be placed in local.txt

What do you all think. Is this a good idea?

I'm currently testing this on a Duo system with only 1 core running stage 2 tests and 2GB allocated. I'll time how long a full P-1 prime test will take with more ram allocated. It should take longer because the stage 2 would scan a longer range.
odin is offline   Reply With Quote
Old 2010-04-15, 19:56   #9
CADavis
 
CADavis's Avatar
 
Jul 2005
Des Moines, Iowa, USA

2·5·17 Posts
Default

i think you have a good plan
CADavis is offline   Reply With Quote
Old 2010-04-15, 23:13   #10
lycorn
 
lycorn's Avatar
 
Sep 2002
Oeiras, Portugal

101011000102 Posts
Default

Two points:

1) If you plan to allocate up to 1800 Mb to testing, you should install more than 2 Gb of RAM, otherwise the system will get real sluggish, if not at all unusable, during the Stage 2 of the tests. As you are using a 64-bit OS you can go to 4Gb without any waste of RAM.

2) The parameters referred by garo are to be placed in prime.txt, not local.txt
lycorn is offline   Reply With Quote
Old 2010-04-15, 23:36   #11
odin
 
Apr 2010

33 Posts
Default

Quote:
Originally Posted by lycorn View Post
Two points:

1) If you plan to allocate up to 1800 Mb to testing, you should install more than 2 Gb of RAM, otherwise the system will get real sluggish, if not at all unusable, during the Stage 2 of the tests. As you are using a 64-bit OS you can go to 4Gb without any waste of RAM.

2) The parameters referred by garo are to be placed in prime.txt, not local.txt
Thanks for the reply lycorn.

This system would be dedicated to running mprime so I think the linux kernel can suffice with 200MB. Also I tried placing the parameters in prime.txt and they did not work. Both workers ran a stage 2 test.

MaxHighMemWorkers=1
OnlyRunStage2WithMaxMemory=1

When I placed them in local.txt however (and of course removed it from prime.txt) one worker ran a stage 2 and the other worker moved on to another exponent to start a stage 1.
odin is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extrapolation: How long until the minimum megaprime? CRGreathouse Math 170 2013-07-01 16:32
Estimating minimum relations bchaffin Factoring 24 2012-03-24 18:37
Minimum/desired CPU specs for ECM factoring Kaboom PrimeNet 10 2009-04-17 14:58
Msieve NFS minimum size 10metreh Msieve 35 2009-04-02 19:14
Minimum primes of various forms database? jasong Information & Answers 1 2007-11-01 01:58

All times are UTC. The time now is 13:03.

Tue May 26 13:03:18 UTC 2020 up 62 days, 10:36, 1 user, load averages: 1.14, 1.28, 1.40

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.