mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Data > Marin's Mersenne-aries

Reply
 
Thread Tools
Old 2006-08-27, 17:21   #34
drew
 
drew's Avatar
 
Jun 2005

2·191 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
This is pretty much why I suggested a unified worktodo.ini. If exponents aren't explicitly split between threads ahead of time, but all lumped into a single pool, and the threads just get the next available work on the list, then it should be much easier to schedule things intelligently. With a unified worktodo, and using your scenario, when (2) happens then Thread 2 will simply continue with the stage2 work that Thread 1 skipped in (1).
That's an excellent point.

Another good solution would be to, upon completion of *any* stage 2 test, have the controller (main?) thread determine which thread has more stage 2 work queued, and give that thread stage 2 priority.

To be efficient, that thread's stage 1 test should be interrupted mid-stream, so memory time isn't wasted. Otherwise, you'll run out of stage 1 work more quickly.

Another thing that shouldn't happen (in either scenario) is that the threads should never request work from Primenet just because it needs stage 1 work to do. You don't want the stage 1s to get arbitrarily far ahead of the stage 2s.

Drew
drew is offline   Reply With Quote
Old 2006-08-27, 17:26   #35
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3,361 Posts
Default

edit: drew's post immediately above -- yes, that's exactly what I was thinking of. Stage1 can (I believe) be interupted anytime with minimal performance penalty, whereas Stage2 needs to reload stuff into memory on every restart. Stage2 should always have priority, that is, if any stage2 work is available then one thread should always be working on it, no matter how much stage1 there is left to do (other threads can worry about that). Only if there's a backlog of stage2 work and no stage1 work should more than 1 thread work on stage2 simultaneously, but as drew says above, avoid grabbing more stage1 work if there's plenty of stage2 left to do.



Quote:
Originally Posted by Prime95 View Post
It should fix the hyperthread mis-detection.
It does for me at least, it shows "2 cores" now.

Quote:
Originally Posted by Prime95
Benchmark times for 66 bits and higher should be the same.
Are "should be" and "is" always identical?
Anyhow, would it hurt to have benchmarking times up to 71 bits anyway? On my Opteron system benchmark times from 64-67 bits are more-or-less identical (within 1.00%, interestingly with 64 the slowest and 67 the fastest on that benchmark run), but it might be nice to get actual benchmark confirmation of that, at least for the end user (who, like me, wouldn't know that 66+ should all be identical).

Last fiddled with by James Heinrich on 2006-08-27 at 17:32
James Heinrich is offline   Reply With Quote
Old 2006-08-27, 17:31   #36
drew
 
drew's Avatar
 
Jun 2005

2×191 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
This is pretty much why I suggested a unified worktodo.ini. If exponents aren't explicitly split between threads ahead of time, but all lumped into a single pool, and the threads just get the next available work on the list, then it should be much easier to schedule things intelligently. With a unified worktodo, and using your scenario, when (2) happens then Thread 2 will simply continue with the stage2 work that Thread 1 skipped in (1).
I should've guessed George would have some foresight. My thread 2 just completed its stage 2 test and thread 1 *immediately* switched gears and moved on to finish its own stage 2 test.

Now I think it'll work just fine. And the code is a lot more efficient than it was yesterday because of it.

Last fiddled with by drew on 2006-08-27 at 17:38
drew is offline   Reply With Quote
Old 2006-08-27, 17:44   #37
drew
 
drew's Avatar
 
Jun 2005

2·191 Posts
Default

Quote:
Originally Posted by Prime95 View Post
let me know if you have tools that indicate I'm allocating too much memory.
Task manager shows Prime95 using 1076998 kB. By my calculation, that's 1052 MB. I specified 1024 in the CPU options.
drew is offline   Reply With Quote
Old 2006-08-27, 18:10   #38
axn
 
axn's Avatar
 
Jun 2003

3·5·331 Posts
Default

Quote:
Originally Posted by drew View Post
Task manager shows Prime95 using 1076998 kB. By my calculation, that's 1052 MB. I specified 1024 in the CPU options.
Quote:
Originally Posted by Prime95 View Post
Not that prime95 allocates more memory than you enter in Options/CPU, but should keep the working set within your Options/CPU setttings. unfortunately, measuring working set size isn't easy. let me know if you have tools that indicate I'm allocating too much memory.
I guess 1052 MB is near enough to 1024 (which is what I think George was saying it would do)
axn is offline   Reply With Quote
Old 2006-08-27, 18:14   #39
drew
 
drew's Avatar
 
Jun 2005

2×191 Posts
Default

Quote:
Originally Posted by axn1 View Post
I guess 1052 MB is near enough to 1024 (which is what I think George was saying it would do)
Not sure. I figure providing extraneous feedback is better than not enough.

It could be just latent garbage collection or something. Perhaps if my memory were to become in short supply, it would readily free up those extra Megs.
drew is offline   Reply With Quote
Old 2006-08-27, 18:22   #40
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

1101001000012 Posts
Default

If I can dredge up an old feature request, a FreeUpMemoryWhileRunning= option would be nice where you could prevent any threads from running Stage2 while (photoshop|premiere|etc) are running; if those programs are detected then all threads revert to stage1 only.
James Heinrich is offline   Reply With Quote
Old 2006-08-27, 19:40   #41
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

22×1,873 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
Are "should be" and "is" always identical?
Anyhow, would it hurt to have benchmarking times up to 71 bits anyway? On my Opteron system benchmark times from 64-67 bits are more-or-less ide
"Should be" and "is" should be identical

You'll be running the exact same code for 65, 66, 67, 68, etc. bit factors. There is no reason the run times should differ more than a percent or two.
Prime95 is offline   Reply With Quote
Old 2006-08-27, 19:58   #42
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3,361 Posts
Default

I just noticed something about CPU time allocation. With 2 threads running on the new test version, I fired up an older v24.x version and ran the benchmark, and then the torture test, and in both cases the v24.x was getting only 25%-33% of the CPU time, with v25.x getting the rest. I would've thought that the benchmark at least runs in higher-than-idle priority so it should get a full core all to itself... no? Anyhow, I ran an instance of SuperPI and it got 45%-48% of the CPU time, which is definitely better, but I still wonder if maybe Prime95 v25.x isn't ceding CPU time to higher-priority tasks quite as well as it should?
James Heinrich is offline   Reply With Quote
Old 2006-08-29, 22:56   #43
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3,361 Posts
Default

It's nice to seethis version freely takes advantage of more RAM when it's available, that is when switching between high and low RAM limits. Previous versions would always give me "ignoring suggested B1/B2, using value from savefile" when restarting with a higher memory limit than the test was first started with, which always gave me the impression it wasn't being as efficient as it could be.

On a related note, could you provide a formula for calculating:
1) bare minimum RAM required for performing acceptable P-1 on given exponent
2) desirable RAM level for performing P-1 reasonably well & efficiently
3) amount of RAM required to achieve E=6, and/or the amount of RAM beyond which no real benefit is gained.
I mostly just want this information for my own curiosity, but maybe it could be put in Prime95, something like "Using 500MB (but optimal performance requires at least 750MB allocated for P-1 testing)".
James Heinrich is offline   Reply With Quote
Old 2006-08-30, 00:09   #44
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

22×1,873 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
Previous versions would always give me "ignoring suggested B1/B2, using value from savefile" when restarting with a higher memory limit than the test was first started with
That code has not changed.

Quote:
On a related note, could you provide a formula for calculating:
1) bare minimum RAM required for performing acceptable P-1 on given exponent
2) desirable RAM level for performing P-1 reasonably well & efficiently
3) amount of RAM required to achieve E=6, and/or the amount of RAM beyond which no real benefit is gained.
I mostly just want this information for my own curiosity, but maybe it could be put in Prime95, something like "Using 500MB (but optimal performance requires at least 750MB allocated for P-1 testing)".
That is real complicated stuff, there is no simple formula.
Prime95 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to retire one core in a dual-core CPU? Rodrigo PrimeNet 4 2011-07-30 14:43
Dual Core to Quad Core Upgrade Rodrigo Hardware 6 2010-11-29 18:48
dual core i7, eh? xorbe PrimeNet 4 2009-04-04 15:32
Importance of dual channel memory for dual core processors patrik Hardware 3 2007-01-07 09:26
Dual Core? BFD R.D. Silverman Hardware 12 2005-02-20 21:46

All times are UTC. The time now is 09:11.

Sat May 15 09:11:14 UTC 2021 up 37 days, 3:52, 0 users, load averages: 1.32, 1.71, 1.73

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, 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.