mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2011-06-07, 17:04   #1
Unregistered
 

670110 Posts
Default Settings for Macbook Pro8,2 (QC Intel i7 with HT)

What are the correct settings for this computer for workers? It is quad-core with hyperthreading so 8 logical cores. Should it be 4 workers with 2 threads each, or 8 workers 1 thread each or something else? Also Prime95 says it can't detect which virtual cores match with physical cores.
  Reply With Quote
Old 2011-06-07, 22:29   #2
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

22·1,873 Posts
Default

You want to run 4 workers with only one thread per worker.

You may need to use Activity Monitor to make sure each worker is running on a different physical CPU.
Prime95 is offline   Reply With Quote
Old 2011-06-08, 00:10   #3
Unregistered
 

2×193 Posts
Default

Thanks. How can I tell which physical CPUs are being used in Activity Monitor? The only windows I can find show 8 bars (one for each logical CPU) but no indication of which bars are on which physical CPU. Also do you mind explaining why using two threads per worker or 8 workers is not recommended? I only get 50% cpu usage in Activity Monitor when using 4 workers with one thread each.
  Reply With Quote
Old 2011-06-08, 03:20   #4
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

1E0C16 Posts
Default

Answering your last two questions in reverse order:

Quote:
Originally Posted by Unregistered View Post
I only get 50% cpu usage in Activity Monitor when using 4 workers with one thread each.
On a system with hyperthreading, Activity Monitor treats each of the virtual CPUs as though it were a real CPU. So, if only half the virtual CPUs (i.e., one HT thread per physical CPU) are busy, it displays that as though only half of eight CPUs were busy, and shows only 50% usage even though each physical CPU is actually 100% busy. So, what you saw is normal when each of 4 workers has only one thread each.

Quote:
Also do you mind explaining why using two threads per worker or 8 workers is not recommended?
_If_ all you're running is prime95 (no browsing, no word processing, no other applications, just prime95), then using 8 workers or two threads per worker might make a small (5-10%) increase in throughput. Because folks have reported different results, the best way to find out is to try it one way, then the other, and compare timings.

However, if you are running other applications (at normal priority) plus prime95 workers using two threads per CPU (at lowest priority) ... what can happen is that your non-prime95 applications might run at half-speed!

Here is someone else's explanation (equally valid on Mac as on Windows AFAIK if the process schedulers treat virtual CPUs the same way):

Quote:
Originally Posted by Ethan Hansen View Post
When you run a single process of your own that consumes the entire CPU, the Windows process scheduler still sees an unused CPU. It happily lets Prime95 run on the second, hyperthreaded, CPU. The result is that both Prime95 and your process get equal amounts of real CPU time, even though P95 runs at low priority. This brings even the fastest computer to a relative crawl.

Last fiddled with by cheesehead on 2011-06-08 at 03:42
cheesehead is offline   Reply With Quote
Old 2011-06-08, 03:37   #5
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

749210 Posts
Default

Quote:
Originally Posted by Unregistered View Post
Thanks. How can I tell which physical CPUs are being used in Activity Monitor?.
I was hoping Activity Monitor would give you the info you need. My mac is not hyperthreaded.

The other way to make sure each worker is on its own physical processor is more difficult. Start just one worker and look at its per-iteration timings. Then start all the workers, each should have roughly the same timings as when one worker was running. If not, then we'll have to use AffinityScramble as documented in undoc.txt.

Also, if you can put "DebugAffinityScramble=1" in prime.txt and post the timings you get at startup when prime95 is trying to detect the hyperthreaded CPUs, that may prove helpful.
Prime95 is offline   Reply With Quote
Old 2011-08-31, 23:32   #6
bstrick1
 
Aug 2011

3 Posts
Default same issue

Instead of making a new thread for the same problem, I can use this one as it is very close to my issue.

I am running on OS X 10.7.1 and this macbook pro has a quad core i7 that is hyper threaded. I have four workers each seeming to use one thread from the pool of 8. So it is using 4 of 8 threads available. I know it is posted above that is in fact using everything but I can run xp in parallels and then run 8 workers there but not in OS X. I can run four workers in OS X and then four in xp at the same time and my cpu will be at 98% in the activity monitor. I consider this to be maximizing my hardware. I want to be able to tell Prime95 that this is hyper threaded but the directions say AffinityScramble2=string needs to be changed in local.txt. This is what is in my local.txt:

OldCpuSpeed=2916
NewCpuSpeedCount=0
NewCpuSpeed=0
ComputerGUID=255e96af77a5700240f613571656de5f
ComputerID=11bs909
SrvrUID=263564043
SrvrComputerName=1541580468
SrvrPO1=0
SrvrPO2=1
SrvrPO3=5
SrvrPO4=250
SrvrPO5=250
SrvrPO6=1
SrvrPO7=1410
SrvrPO8=1
SrvrPO9=4
SrvrP00=4
LastEndDatesSent=1314831011
Memory=250 during 0:01-23:30 else 250
RollingHash=2392975857
RollingStartTime=0
RollingCompleteTime=16492933
RollingAverage=1000


Do I need to add it or should it be there already. Also I read this:

The program automatically computes the number of CPUs, hyperthreading, and speed.
This information is used to calculate how much work to get.
If the program did not correctly figure out your CPU information,
you can override the info in local.txt:
NumCPUs=n
CpuNumHyperthreads=1 or 2
CpuSpeed=s

As you can see in the local.txt, I do not have two of these options. I tried adding them and then saving but it did not effect anything.



I tried to cover as many bases as possible so there will be less time spent on going over things I have read and have done.

In case you say my computer will be slow at 100%, I am aware how it feels at 100% and its fine, I only browse the internet and check my email on this computer so the 1% or 2% idle gives no lag when I do these things. I will pause the workers when I play a game in parallels.
bstrick1 is offline   Reply With Quote
Old 2011-09-01, 00:58   #7
bstrick1
 
Aug 2011

3 Posts
Default

Resolved!!!!!

This is usually how it works, I post something and I fix it.

Under tests, worker windows, worker windows. i set it to eight and fix, using 100% or 791% according to activity log.

This is what I wanted. Thanks if you were thinking about it!!!

P.S.

I couldn't figure out what I was doing with affinity scramble or whatever I was supposed to be messing with but it was cool for the debugger!
bstrick1 is offline   Reply With Quote
Old 2011-09-01, 01:00   #8
Christenson
 
Christenson's Avatar
 
Dec 2010
Monticello

5·359 Posts
Default

NumCPUs=4
CpuNumHyperthreads=2

in Local.txt did not do what you wanted? Which version, exactly, of P95 are you running?

The computer works well at 100% because P95 runs at bottom priority; as long as nothing else is also at bottom priority, everything will be OK.
Christenson is offline   Reply With Quote
Old 2011-09-01, 21:32   #9
bstrick1
 
Aug 2011

3 Posts
Default

putting
NumCPUs=4
CpuNumHyperthreads=2

into local.txt didn't help. I don't really know why it doesn't but it didn't work unless I don't know what to look for (soooo many negatives...). Nifty little program though. Thanks for the help.

btw, version 26.6 for os x 64 bit
bstrick1 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble getting programme to load on macbook frink Information & Answers 7 2013-12-21 16:00
How much should one expect to pay for a used/refurb. macbook? ewmayer Lounge 6 2013-01-23 19:45
Overheating to 90C on Macbook Sve Hardware 19 2009-12-25 01:15
new MacBook Pro! ixfd64 Hardware 15 2009-12-16 20:05
New MacBook Mac OSx 10.4.8 jrc334 Software 4 2007-02-02 01:20

All times are UTC. The time now is 07:16.

Thu May 13 07:16:05 UTC 2021 up 35 days, 1:56, 1 user, load averages: 2.08, 1.98, 1.85

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.