M
miha.valencic
Hi!
I've obveserved a strange fenomenon calling one webservice from a
multithreaded client. What I found out is, that the processing of the
client requests on the server side is not paralellized.
I have a sample WS with one method, int Add(int, int). the method just
adds first and second argument and returns the result.
The client is written in c# and starts n threads (i tested with 5, 10,
30) and invokes the service. The client also reports back the
Environment.TickCount after it finishes.
What happens is, that if the method call takes a long time (I've
embedded Thread.Sleep(5000) in it), the requests are processed really
funny. Like only two at a time are processed. It seems like only two
threads are processing client requests in IIS. I am using IIS on XP
pro, with .NET Framework 1.1.
If anyone has clues or ideas why that is so, I'd appreciate feedback.
Note that if there is no sleep(5000) in the WS Method call, or this is
minimal, the requests "seem" to be executed in parallel or are just so
fast.
The code (asmx, client) is available on
http://miha.magdalenice.net/temp/TestClientMain.zip -- compile with csc
*.cs.
Thanks,
Miha
I've obveserved a strange fenomenon calling one webservice from a
multithreaded client. What I found out is, that the processing of the
client requests on the server side is not paralellized.
I have a sample WS with one method, int Add(int, int). the method just
adds first and second argument and returns the result.
The client is written in c# and starts n threads (i tested with 5, 10,
30) and invokes the service. The client also reports back the
Environment.TickCount after it finishes.
What happens is, that if the method call takes a long time (I've
embedded Thread.Sleep(5000) in it), the requests are processed really
funny. Like only two at a time are processed. It seems like only two
threads are processing client requests in IIS. I am using IIS on XP
pro, with .NET Framework 1.1.
If anyone has clues or ideas why that is so, I'd appreciate feedback.
Note that if there is no sleep(5000) in the WS Method call, or this is
minimal, the requests "seem" to be executed in parallel or are just so
fast.
The code (asmx, client) is available on
http://miha.magdalenice.net/temp/TestClientMain.zip -- compile with csc
*.cs.
Thanks,
Miha