Newbie query re multithreading

2009-08-18 Thread McLaughlin, Michael P.
I am converting a Carbon app to Cocoa (where I'm a newbie). The Carbon app was multithreaded and heavily dependent on cblas and clapack. It worked well and was fully twice as fast with 2 CPUs as with 1. However, the code was becoming increasingly obsolete. I now have a Cocoa [ObjectiveC++] vers

Re: Newbie query re multithreading

2009-08-18 Thread Jonathan Dann
FWIW you can't always be sure that NSOperationQueue will be using a thread per operation. The number of active operations (I explicitly don't say "threads" here) depends on system contention. Are your operations dependent on each other or using shared resources? Are you setting -[NSOperat

Re: Newbie query re multithreading

2009-08-18 Thread I. Savant
I don't have very much by way of help for you because honestly I don't think there's enough information here for more than generalities, but .. 1) With 1 CPU (NSOperation not used), I get 50% of CPU-time devoted to auto_collection_thread which I presume means Garbage Collection. Is th

Re: Newbie query re multithreading

2009-08-18 Thread I. Savant
On Aug 18, 2009, at 10:36 AM, Jonathan Dann wrote: You may even find that NSOperationQueue/NSOperation allows you to split up your calculations into smaller chunks than 1 per CPU (or effective cores). In support (I think) of this point, have you seen this article, Michael? http://www.

Re: Newbie query re multithreading

2009-08-18 Thread Bill Bumgarner
On Aug 18, 2009, at 7:25 AM, McLaughlin, Michael P. wrote: 1) With 1 CPU (NSOperation not used), I get 50% of CPU-time devoted to auto_collection_thread which I presume means Garbage Collection. Is this normal? It seems excessive. It sounds like your algorithm is doing a tremendous amount

Re: Newbie query re multithreading

2009-08-18 Thread Bill Bumgarner
On Aug 18, 2009, at 10:19 AM, McLaughlin, Michael P. wrote: On 8/18/09 11:34 AM, "Bill Bumgarner" wrote: On Aug 18, 2009, at 7:25 AM, McLaughlin, Michael P. wrote: 1) With 1 CPU (NSOperation not used), I get 50% of CPU-time devoted to auto_collection_thread which I presume means Garbage C

Re: Newbie query re multithreading

2009-08-18 Thread McLaughlin, Michael P.
On 8/18/09 1:46 PM, "Bill Bumgarner" wrote: > On Aug 18, 2009, at 10:19 AM, McLaughlin, Michael P. wrote: > >> On 8/18/09 11:34 AM, "Bill Bumgarner" wrote: >> >>> On Aug 18, 2009, at 7:25 AM, McLaughlin, Michael P. wrote: >>> 1) With 1 CPU (NSOperation not used), I get 50% of CPU-time >>

Re: Newbie query re multithreading

2009-08-18 Thread Greg Parker
On Aug 18, 2009, at 7:25 AM, McLaughlin, Michael P. wrote: 1) With 1 CPU (NSOperation not used), I get 50% of CPU-time devoted to auto_collection_thread which I presume means Garbage Collection. Is this normal? It seems excessive. 2) With 2 CPUs, I get 26% of CPU-time for auto_collection_th