1

We have a legacy WSE3 ASP.Net webservice here that defines a method GetFileContent(string fileName). What it does is check a predefined path for a file with the passed name, read its content, base64-encode it and send that encoded stuff back as a response.

Unfortunately, the whole process takes (varying) ages. I have written a console client app that benchmarks the performance on demand: Sometimes 2.5Megs are transferred within 12 seconds, sometimes it takes 40. Another 27Meg-file ran through in 16 seconds yesterday, today it took > 1 min.

Further things I have checked:

  • CPU and Swap performance are not worth mentioning (on monitoring, the machine looks bored)

  • network speed is sufficient.

  • The method call is performed immediately after the client has sent the request.

  • The reading and encoding takes an average of 500ms for a big file, so that the return statement is also performed immediately after the request.

  • Another client (Java-based) is even slower, so I guess it could be a client problem.

Does anybody have an idea where to look next to get behind this nasty one? Feels like IIS trouble, really...

Thanks a lot in advance...

Sebastian Edelmeier
  • 4,095
  • 3
  • 39
  • 60
  • Can you tell something about the setup..using web service for tranferring files will always be slow..may be you can host the files in ftp and then the clients can download it from there.. – Mahesh Jan 04 '11 at 10:40
  • Can you update your question with the sample code which System.IO method you are using? – RameshVel Jan 04 '11 at 10:44
  • Hi Mahesh, unfortunately the whole setup is very very complex and cannot be changed. The server is an IIS6 running on a Win2003 Server (64bits), the test client runs WinXP SP3 and is on the same network (not over internet). – Sebastian Edelmeier Jan 04 '11 at 10:49
  • @Ramesh : You mean for reading and converting the file? This is not the bottleneck, my debug logfiles tell me that this takes less than a second usually. – Sebastian Edelmeier Jan 04 '11 at 10:51
  • Can you provide more detail about the code? Is the data written in chunks? Does the delay occur after all data is written to the output stream or during chunk writing? Have you tried eliminating the webservice as an HTTP stream handler from the equation (e.g. have it write the output to a file, and then redirect the client to the file directly)? I think you need to narrow the exact source of the delay, some tests like this could help. – Jamie Treworgy Jan 04 '11 at 15:14

2 Answers2

0

I believe there is no trouble in IIS. I suspect sometimes it took more time for resolving the IP, if shared path path is given instead the actual path.

RameshVel
  • 64,778
  • 30
  • 169
  • 213
  • Then how could this be? the webservice method is executed instantly after being called from the client. at that point, ip resolution has already happened... – Sebastian Edelmeier Jan 04 '11 at 12:08
0

First, just to make sure: I hope you're aware that WSE is obsolete.

Second, WSE is based on the ASMX technology. This has problems with large requests, as it will duplicate the incoming data four or more times on the way to the service. However large your data are, assume it will take at least four times as much memory, before the service even gets its hands on it.

The workaround is to upgrade to WCF.

John Saunders
  • 160,644
  • 26
  • 247
  • 397