Application performance degrades on Multi processor machine

A

Amit Dedhia

Hi

I am developing a Dot net application (involving image processing) on
a uni processor. It works well on my machine. I then take all my code
on a multi processor, build and run the application there. There is
performance degradation.

The usual performance of the application on MP machine is better than
that of uni processor machine. But the performance of MP degrades when
it comes to the multi-threaded part of the application. I am using a
third party application for image processing and communicating with
this application using TCP IP. I send some messages to that
application which results in generation of up to 6 threads (in that
application) and very high computation. After the computation is over,
it gives a callback to my application and I render the output (for
which I again need to send some more messages to the third party
application). The operations are happening in interactive mode which
means that my application keeps on sending messages and getting
callbacks from the third party application.

On uniprocessor, when I start the operation, the CPU usage goes above
95%. But typically 40% CPU is alloted to my application and 60% to the
third party application. As a result my application gets enough time
to render the new image and response looks real time.

On MP (its a dual processor), the third party application is alloted
entire CPU resource. As a result my application does not refresh the
output.

Can anybody guess what could be the reason?

The MP config is Intel Xeon 3.2 GHz - 3 GB RAM. The OS installed on
the MP is Windows XP 2002 Pro SP1. It is supposed to be used as a
workstation.

The config on my uniprocessor machine is : Intel Pentium 4 2.4 GHz, 1
GB RAM, Windows XP 2002 Pro SP1.

Does anyone have any clue? I have some hints though.

1> Is the OS on the MP machine Ok? Does Win XP Pro support MP?
Does Microsoft have any other version for MP machines?

2> Do we need special compiler settings to build applications
which are supposed to run on MP machines.

Best regards
Amit Dedhia
 
H

Hermit Dave

are those threads initiated by you or the 3rd party app ?

i think the 3rd party threads are running at higher priority.You might want
to check on thread priorities.

Also there's Windows XP Pro + whatever SP but thats it you dont have
anything call XP 2002

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 
A

Amit Dedhia

Yes - the threads are running in the 3rd part App.. but why is thread
scheduling behaviour differnt on uniprocessor and dual processor? On
uniprocessor, the CPU resource allocation is 60-40 between the 3rd
party and my application. On MP, there are two CPUs. Ideally I would
expect that one CPU is allocated to my app and the other one to 3rd
party. Instead entire CPU time is eaten by the 3rd party app.

One more thing I observed is that the CPU usage of both processors on
MP is following a quite similar pattern. The peaks, lows and
transitions are observed at the same time in both the CPUs. This is
quite surprising to me.

Regarding 2002, it is the version no (as mention on the Control panel
--> System)

Amit
 
H

Hermit Dave

okay how about this
A Multi-threaded application creates multiple thread for pseudo simultaneous
operation by the threads thereby improving the performance.

On Uni-Processor time slicing and thread priorities determine how the
applications behave and execute.
On Multi Process systems however the different threads are executed by
different processors there by maximising the performance.

I presume you application doesnt not make use to too many threads rather
delegates work to 3rd party app that in turn creates the threads.
If that is true, your application's Main Thread will have a processor
affinity based on OS's allocation of timeslice.

You mentioned that you have allocated one of the two procs to 3rd party app.
How about allocating the other proc to your application.
If that doesnt help you might want to try increasing the thread priority but
only if its absolute must and then see if you application behaves any
better.

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top