Re: How many processors do I have?
Re: How many processors do I have?
- Subject: Re: How many processors do I have?
- From: Shawn Erickson <email@hidden>
- Date: Wed, 11 Nov 2009 15:19:24 -0800
On Wed, Nov 11, 2009 at 2:34 PM, Ben Haller
<email@hidden> wrote:
> OK, either I'm being exceptionally dense or there's a bug in NSProcessInfo
> on 10.5. If I execute:
>
> NSProcessInfo *processInfo = [NSProcessInfo processInfo];
> int processorCount = [processInfo activeProcessorCount];
>
> NSLog(@"processorCount == %d", processorCount);
>
> I get a log that says "processorCount == 16". But I am under the strong
> impression that I have a dual-processor quad-core machine, which makes 8
> processors, and System Profiler backs me up on this:
>
> Model Name: Mac Pro
> Model Identifier: MacPro4,1
> Processor Name: Quad-Core Intel Xeon
> Processor Speed: 2.26 GHz
> Number Of Processors: 2
> Total Number Of Cores: 8
IIRC the latest Mac Pro system use Xeon processors that are HT
(hyper-threading, aka SMT) capable, each core is capable of running
two threads concurrently. This gives you 16 "logical" cores even
though you only have 8 physical cores.
Try the following...
[0:512] > sysctl hw.physicalcpu hw.logicalcpu
hw.physicalcpu: 8
hw.logicalcpu: 8
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden