469,934 Members | 1,857 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

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

Al
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.
Mar 13 '06 #1
2 979

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 wrote:
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.

Mar 13 '06 #2
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

--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.com
"Al" wrote:
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.

Mar 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

65 posts views Thread by Anthony_Barker | last post: by
3 posts views Thread by David Harrison | last post: by
3 posts views Thread by Suhail Salman | last post: by
2 posts views Thread by WXS | last post: by
15 posts views Thread by WXS | last post: by
4 posts views Thread by hooksie2 | last post: by
4 posts views Thread by =?Utf-8?B?VmVlcmFiaGFkcmFpYWggTCBN?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.