I have been working on a multithreaded application to replace a
multiprocess application that calls a web service and sends and
receives an XML payload.  The libraries utilized are the same for both
applications, it is only a difference between using 25 console windows
that each handle 1/25th of the processing versus using 25 worker
threads that each handle 1/25th of the processing.  What I have found
is that the multithreaded application is running 2-3 times slower than
the multiprocess application.  I have run this code from several
different machines using both Windows 7 and Windows XP.  I have
simulated the web service call by a thread.sleep(1000) and in this
case the threading was much faster than the multiprocessing.  Then I
used Wireshark to take a look at the network traffic when
communicating with the webservice.  I found the following:

Multiprocess capture: 29 packets ran for 42 seconds and transferred
8066 bytes of data.  Average packet size 278bytes, average Mbit/sec = .
002, average packets/sec = .686

Multithreaded capture: 1550 packets ran for 12 seconds and 820949
bytes of data were transferred. Average packet size 530 bytes, average
Mbit/sec = .558, average packets/sec = 132.

Both of these runs did the same thing.  I brought the number of
transactions down to a single transaction.

Any ideas of what I can try?  Any ideas as to why there were so many
more packets transmitted in the multithreaded application?

Thanks for your time.

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to