Threading resulting in worse perfomance. Can COM be the cause ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I've written a little app to process OLAP partitions on an Analysis Services
2000 database. I've been trying to multi-thread it to improve the overall
through-put. I've managed to multi-thread it, and I'm sure that the Thread
only block each other in one very small critical section, but my through-put
is worse by 30% when I use 2 "worker" threads. (This is on a 2 physical CPU
box).

If split the work load between 2 instances of the application, then the
through-put improves by 30%.

As this app. is processing OLAP partitions, I'm using DSO and have the
Interop DLLs to allow me to interact with the DSO API. The main work of the
app are calls to the clsPartition.Process() method.

When the app is running, it is only using 1 CPU. It seems that I'm only
allowed to do 1 call to Process at a time, although the threads have
dseperate instances to the COM object.

Any wisdom or knowledge of what is happen and / or how to improve
through-put is welcome.

Thanks in advance.
 
A COM object can run as a Singleton -- a single instance, so even though
you have multiple threads, you are all calling the same instance; hence
a road block.
 
Al,

If improvement of throughput is important, which it sounds like it is, you
may want to consider a compute grid. Digipede Technologies has a grid
computing solution built for Windows with both .NET and COM interfaces. It's
been my experience that moving thread objects to the grid is very easy and
you can easily increase throughput by adding more compute nodes.

Whether your problem would work well on a grid depends on two additional
factors: how long does each thread computation run and how many are they. If
the computations take awhile and/or there are a lot of them then a grid will
probably give you the greatest performance improvement.

Best of luck,

Kim
 
Back
Top