IIS performance sending XmlDocument

  • Thread starter Thread starter John Bailo
  • Start date Start date
J

John Bailo

I wrote a c# web service that sends an XmlDocument as a return type.

When I run it on a w2k iis machine, it takes 35s to 45s to send the data
to a client (I wrote a smart client c# app to consume it, but I also
tested with a browser).

Question: is there any way for me to speed up the performance of my web
server?

Oddly, when I run it on my dev machine, an XP workstation, it only takes
10s for the browser to get the data.
 
Have you tried running it several times in a row? The first request has to
create the application.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.
 
Kevin said:
Have you tried running it several times in a row? The first request has to
create the application.

Yes, it consistently takes that long to send the Xml data.
 
I checked the size of the send, and the total amount of data delivered
is 288 KB (294,912 bytes).

That shouldn't take 35 - 45 seconds, should it?
 
Hi John,

It must have something to do with the OS or the hardware. I must confess I
don't run .Net apps on Windows 2000, so I can't really tell you for sure.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.
 
I did some more testing in an attempt to understand why it takes the
..net web service 35-45s to deliver a 300K xml value to the client.


I used VS.NET and set breakpoints to see how long each of the first
steps takes:

Time to return data to data reader <1s
Time to create the XML document from data <1s

At this point the XML return value from the web method is ready to
send...so it's not in the code.

Then what I did is save the resulting XML as a file, and try to send it
as a static document, to see if its the webserver or the network:

The time for this is:

Time to send the data over the network 11s

Then I tested it running the browser on the web server, so it wasn't
going out on the network:

Time to load page into IIS and send 1-2s


So, sending the file over the network definitely adds time -- and tells
me our network is quite slow since this is a relatively small file. But
it doesn't explain the other 20-30s in sending the XML via the web
server. Could it be:

Time to serialize XML data ?20-30s

That is, does IIS/.NET take that long to encapsulate the data as a SOAP
object?

Or can someone suggest another cause?
 
Ok, I did one more test.

I exposed this web service from my development machine, an XP Pro with
P4, and from two other machines, the total time to receive all the XML
from the web method was 4-8s !!

I guess that means the web server is /dog/ /slow/ !

It's a 2000 machine, so I don't know what i can do in terms of the web
server to speed it up...
 
Ok, it gets odder.

I rebooted my web server and now it takes like 5 seconds to run the web
method and send the data!

There were some pending updates to be installed that were there for
weeks -- I kind of wonder if these would drag down performance because
the MS Update just sits there and polls to tell the user to install the
updates.

Still, more likely is...what...that IIS 5.0's cache wasn't clearing?

Mmm...
 
Back
Top