mersenneforum.org  

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

Reply
 
Thread Tools
Old 2010-08-01, 20:42   #1
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

32×103 Posts
Question Seeking Guidance on Prime95 Settings

Hello,

I signed up one of my PCs to contribute to GIMPS, and before the machine gets much deeper into things I'd like to ask a few questions about the Prime95 settings.

Please forgive me if these questions have already been asked a thousand times, but my quick-and-dirty search for answers didn't turn up a lot. I'm hoping that this is the right section to post these questions.

If it helps, the CPU is a Pentium Dual-Core T4200 @2.00 GHz running LL first tests.

1) What are "worker windows," and how do I decide how many to set that value to? Is this setting related in any way to the number of "CPUs to use" (see the next question)?

2) How do I decide what value to enter in "CPUs to use (multithreading")?

3) How can I tell if my machine is using both cores for Prime95?

4) I'm getting an estimated finish time of 108 days. Is that normal/expected?

5) How do I decide how much RAM to allocate for each possible type of work? The default for LL seems to be 8MB. What difference does it make to set that value smaller or bigger (and how much bigger)? Is there a point of diminishing returns, and if so, what is it?

Unfortunately, although there's a menu option for it, there doesn't seem to be an actual "Help" file that might elaborate on these setting choices. If possible, I would welcome guidance of a more general sort (not just specific to that CPU) that would help me to avoid having to come back and pester you all with questions for the next several computers that I add to GIMPS.

Thanks very much for your help.

Rodrigo
Rodrigo is offline   Reply With Quote
Old 2010-08-01, 23:02   #2
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

71·101 Posts
Default

1) For maximum throughput, set it to the number of "cores" on your machine. In your case, two. Each worker window processes its own exponent.

2) Set this to "number of cores on your machine" / "number of worker windows".

Your machine could be set up to run 2 worker windows each using 1 core, OR 1 worker window using 2 cores (but this will be less than twice as fast)

3) Task manager. Prime95 should be getting close to 100% of the CPU time.

4) Yes. You could do double-checking which will take about a quarter of the time.

5) See readme.txt. The 8MB setting is fine -- the extra memory can only be used during stage 2 of P-1 factoring. If you have memory available 500MB should be pretty good. Yes, there are definitely diminishing returns, but it is complicated to provide an exact formula.

6) My fault, I'm lazy. On second thought it's also Microsoft's fault. They've changed help file formats and tools several times and I lack the motivation to relearn this stuff every few years.

Last fiddled with by Prime95 on 2010-08-01 at 23:02
Prime95 is offline   Reply With Quote
Old 2010-08-01, 23:53   #3
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

32×103 Posts
Default

Wow, I'm getting the information from the best possible source! Thank you very much.

I changed the workers setting to 2, and using your formula in #2 (i.e., 2/2) I left the CPUs at 1, then clicked on OK. The worker that was already running stopped briefly and then resumed, but right after the "new" one got started, I received the following two lines:

"Setting affinity to run worker on logical CPU#1.
"Stopping worker at user request."

I'm not sure what I did to request it to stop, all I did was to click on "OK" to change the settings in the hope of activating a second worker. Now I have two windows showing (in addition to the Communications thread), but still only one worker active.

FWIW, Task Manager shows 50% usage on both cores.

Gratefully,

Rodrigo
Rodrigo is offline   Reply With Quote
Old 2010-08-02, 00:02   #4
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

717110 Posts
Default

That sounds weird (a bug?). Choose Test/Continue to get the second worker running again.
Prime95 is offline   Reply With Quote
Old 2010-08-02, 00:24   #5
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

32·103 Posts
Default

Quote:
Originally Posted by Prime95 View Post
That sounds weird (a bug?). Choose Test/Continue to get the second worker running again.
That worked, thank you!!

Now I have two cores working on separate exponents. Curiously, the one that just got added is estimated to be finished in 101 days, as opposed to the original one which was 108 days.

Worker #2 is shown as working at "P-1 stage 1" of its assigned exponent. But I had set the preference for LL. Is that all right? (I understand that I should set the RAM much higher for P-1 work.)

Trying to develop an understanding of the process. Task Manager does now show both cores running at 100%. Does this happen only if the computer isn't working on anything else?

This is all very interesting. Pretty neat to watch the numbers grow.

Rodrigo
Rodrigo is offline   Reply With Quote
Old 2010-08-02, 00:42   #6
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3·2,083 Posts
Default

Quote:
Originally Posted by Rodrigo View Post
That worked, thank you!!

Now I have two cores working on separate exponents. Curiously, the one that just got added is estimated to be finished in 101 days, as opposed to the original one which was 108 days.
Most likely, either (or both) of two things is at play here: a) one exponent may be a little larger than the other; b) one of them may need P-1 and the other not. (See below.)

Quote:
Worker #2 is shown as working at "P-1 stage 1" of its assigned exponent. But I had set the preference for LL. Is that all right? (I understand that I should set the RAM much higher for P-1 work.)
Ideally, all prospective LL candidates would have their P-1 work already done by people who have their preferences specifically set to do P-1. However, GIMPS is currently a little short of people doing dedicated P-1, so they can't completely keep up with the rate of LL assignments. Whenever you're assigned an LL test that is not finished being "pre-tested" (TF to the standard level, P-1 done), that pre-testing will be completed before starting the actual LL to ensure that you don't waste your time on a big, long LL if a factor can be found more easily to eliminate the exponent.

Quote:
Trying to develop an understanding of the process. Task Manager does now show both cores running at 100%. Does this happen only if the computer isn't working on anything else?
Yes. As other applications request CPU time from the operating system's scheduler, Prime95 automatically "makes room" for them; because its worker threads are set to Low priority, the OS scheduler just gives applications with higher priority (pretty much everything) precedence when they ask for CPU cycles. For instance, it's not uncommon to have a web browser that intermittently uses about 15% or so of the CPU; at those times, Prime95 would decrease to 85%. In the end, all cycles are put to use doing something.

Last fiddled with by mdettweiler on 2010-08-02 at 00:43
mdettweiler is offline   Reply With Quote
Old 2010-08-02, 01:12   #7
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

32·103 Posts
Default

mdettweiler,

Fascinating -- thank you! This is growing on me fast.

You're right, the second exponent IS a little lower than the first one. And after a little less than one hour doing P-1 work on it, almost 4% of stage 1 is complete. So I guess that it's not necessary to increase the RAM setting. (Right?)

The "Per iteration time" on the first worker increased from 0.068 seconds to 0.079 seconds after I got the second worker going. Is that a coincidence, or a result of starting the second worker?

And finally (for now!), if only Prime95 is running on the PC (such that it's almost always at 100%), does that help the computer to finish the exponent faster?

Rodrigo

Last fiddled with by Rodrigo on 2010-08-02 at 01:13
Rodrigo is offline   Reply With Quote
Old 2010-08-02, 05:56   #8
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3·2,083 Posts
Default

Quote:
Originally Posted by Rodrigo View Post
mdettweiler,

Fascinating -- thank you! This is growing on me fast.

You're right, the second exponent IS a little lower than the first one. And after a little less than one hour doing P-1 work on it, almost 4% of stage 1 is complete. So I guess that it's not necessary to increase the RAM setting. (Right?)
I would HIGHLY recommend increasing the RAM. Even if you're going to be doing primarily LL work, the occasional P-1 pretesting stint is going to need a lot more than 8 MB to do a decent job. Adding more memory is not going to speed it up, but what it will do is increase your chances of finding a factor in P-1 (and therefore eliminating the need for the LL test) by quite a bit. What Prime95 does is automatically calculate how much time it should optimally spend on P-1 relative to the LL test. At a given set of bounds (B1 and B2) P-1 will run faster with more memory. Thus, as you add more memory, Prime95 increases the bounds to compensate--therefore taking the same amount of time but increasing the chance of a factor.

As George suggested earlier, if you can spare it, 500MB is a good minimum amount to allot for P-1. Beyond that point adding more still helps, though it's around there that the returns begin to diminish rather quickly. Note that the full RAM allotment is only used during P-1 stage 2--everything else (including the LL test itself and any TF) uses a minimal amount of RAM (a few MB) because it doesn't need any more than that. So if having 500MB less RAM for a few days at the beginning of some LL tests is not going to severely impact performance on your computer, I'd definitely go for it.

Quote:
The "Per iteration time" on the first worker increased from 0.068 seconds to 0.079 seconds after I got the second worker going. Is that a coincidence, or a result of starting the second worker?
My guess is that the hit is due to the slight CPU overhead created by normal use of the computer (if you had a web browser open with a few tabs or maybe a webmail interface, that would do it). When you only have one worker going, the other core is completely idle--which means that the operating system's scheduler puts any additional requests for CPU time (web browser, etc.) onto the idle core, leaving the worker all to itself on one core. But when you start the second worker, both cores are filled, which means that the scheduler has got to arbitrarily choose which core to send additional time requests to--which can mean one core or the other at any given moment. The unlucky core then takes a bit of a performance hit on Prime95.

Disclaimer: this is just a hypothesis. I could be completely off-base.

Quote:
And finally (for now!), if only Prime95 is running on the PC (such that it's almost always at 100%), does that help the computer to finish the exponent faster?
Marginally. As I explained above, normal use of the computer does take away a little bit from Prime95. However, as long as you don't have any programs running that drain much CPU time over the long term (most programs don't), you shouldn't see much of a difference.
mdettweiler is offline   Reply With Quote
Old 2010-08-02, 13:55   #9
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

11100111112 Posts
Default

Quote:
Originally Posted by mdettweiler View Post
As George suggested earlier, if you can spare it, 500MB is a good minimum amount to allot for P-1. Beyond that point adding more still helps, though it's around there that the returns begin to diminish rather quickly. Note that the full RAM allotment is only used during P-1 stage 2--everything else (including the LL test itself and any TF) uses a minimal amount of RAM (a few MB) because it doesn't need any more than that. So if having 500MB less RAM for a few days at the beginning of some LL tests is not going to severely impact performance on your computer, I'd definitely go for it.
mdettweiler,

Thank you! I increased the RAM to 500MB, and immediately the "Chance of finding a factor" estimate jumped from the original 3.22% to 5.97%.

Quote:
Originally Posted by mdettweiler View Post
My guess is that the hit is due to the slight CPU overhead created by normal use of the computer (if you had a web browser open with a few tabs or maybe a webmail interface, that would do it). When you only have one worker going, the other core is completely idle--which means that the operating system's scheduler puts any additional requests for CPU time (web browser, etc.) onto the idle core, leaving the worker all to itself on one core. But when you start the second worker, both cores are filled, which means that the scheduler has got to arbitrarily choose which core to send additional time requests to--which can mean one core or the other at any given moment. The unlucky core then takes a bit of a performance hit on Prime95.

Disclaimer: this is just a hypothesis. I could be completely off-base.
The odd thing is, there were no changes in the way the PC was being used, other than adding the second worker. No programs that wouldn't already be running have been opened. (None that I specifically launched, at any rate.)

Anyway, as you pointed out it's not a big hit. Mostly I'm curious as to how this all works. Thanks for filling me in.

Rodrigo
Rodrigo is offline   Reply With Quote
Old 2010-08-02, 14:13   #10
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·2,383 Posts
Default

Quote:
Originally Posted by Rodrigo View Post
mdettweiler,

Thank you! I increased the RAM to 500MB, and immediately the "Chance of finding a factor" estimate jumped from the original 3.22% to 5.97%.


The odd thing is, there were no changes in the way the PC was being used, other than adding the second worker. No programs that wouldn't already be running have been opened. (None that I specifically launched, at any rate.)

Anyway, as you pointed out it's not a big hit. Mostly I'm curious as to how this all works. Thanks for filling me in.

Rodrigo
My wild, blind guess: a big exponent needs a big FFT to be tested.
A big FFT requires a big amount of memory.
While Prime95 makes use of cache memory when available, big exponents need a huge quantity of free memory, causing data exchanging from cache to RAM and vice versa.
Maybe the data transfer somewhat hit the performances of the two cores, slowing down the execution of a few percent points.

Luigi

Last fiddled with by ET_ on 2010-08-02 at 14:17
ET_ is offline   Reply With Quote
Old 2010-08-02, 14:50   #11
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

11100111112 Posts
Default

Thanks, ET!

BTW, do I need to notify you in order to register a computer for OBD, or as with Prime95 do I simply download the factor_X program and start? (I hope this isn't considered hijacking the topic. Self-hijacking?)

Rodrigo
Rodrigo is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
prime95 settings evanh Software 3 2017-12-04 15:18
Some Prime95 settings lost rharmz Software 1 2014-05-20 07:36
Prime95 always uses nighttime settings fox_mccloud_123 Information & Answers 6 2013-05-07 21:12
The 'CPU Settings & Info' box in Prime95 Roy_Sirl Software 3 2013-01-27 15:24
[26.5] some Prime95 settings reset on their own ixfd64 Software 2 2012-07-18 14:41

All times are UTC. The time now is 22:59.

Wed Sep 30 22:59:01 UTC 2020 up 20 days, 20:09, 0 users, load averages: 1.95, 1.94, 1.76

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.