Slow Server Response with .NET

Discussion in 'General troubleshooting' started by SteveHaney, Jul 26, 2012.

  1. Hi,

    My sites are generally quite quick as long as they are static sites. Thanks for this!

    But it seems like when there's any .NET involved that there's a very slow initial server response. For instance: http://thehistoryofwine.com/filmcampfilms/

    Developer console shows that it often takes 7 or 8 seconds before the initial GET request is answered by the server. I've tested this on multiple connections at different locations. And it's consistent - not like it's a recompile issue on the first visit.

    If you go to the base URL for this site (http://thehistoryofwine.com) the latency is about 150ms before initial response. This is just serving an html page.

    Any ideas on what I can do to make this better? Any help is appreciated!
     
  2. I'm not seeing the same latency you're reporting on either of those URLs, but then I suspect I'm closer to the data center than you are.

    It's difficult to accurately gauge server response from a location outside the data center itself, since there's a network between you and the server. The more geographically removed you are from our data center, the more latency you're generally going to see.

    150ms isn't much latency - I assume you're somewhere in the southwest U.S.? As for 7 or 8 seconds on the .NET application, again, I'm not seeing that here. the /filmcampfilms page loaded in a second or two.

    I ran YSlow on that page though, and it looks like you're rescaling images, loading fonts from Google API, etc., which can add to load time...
     
  3. Hi Hank, thanks for the response!

    I've linked two images of what's happening when I load each page:

    > thehistoryofwine.com/filmcampfilms.jpg

    > thehistoryofwine.com.jpg

    These two locations should both be on the same server and routed the same across the internet, right? Which makes me think there's something different causing the delay.

    Why would one consistently take over 6 seconds before the server responds while the other only takes 115ms?

    Any help is much appreciated.
     
  4. Elshadriel

    Elshadriel Winhost Staff

    Part of it is network distance. It was 35 ms for the main site and 3.67 seconds for the sub-directory. It also looks like there is some kind of redirection going on in the sub-directory...
     

    Attached Files:

  5. Hi Elshadriel,

    Thanks for the reply - I think the redirection happens when you don't put a slash on the end of the URL, when you're going to a sub-directory, without specifying the file. There's nothing in the code that's doing any redirects.

    So the network distance could be different between a sub-directory and one folder up?

    Thanks,
    Steve
     
  6. Back again, I took it one step further: I copied the generated HTML from view source on the .NET generated page. Deleted everything else from the directory (keeping images, scripts and javascript to make it a fair test) and placed my flat HTML file into /filmcampfilms/... the result was a 65ms response time from the server:

    65ms to same directory when .NET isn't involved

    So there's definitely something fishy going on with .NET processing and it's not a network issue. I noticed the gentleman in the other thread is experiencing similar symptoms.
     
  7. Steve, as I pointed out in the other thread you mentioned, there's overhead inherent in a .NET process that doesn't exist in a static file request, so a comparison between the two doesn't really give you any insight into potential issues.

    These are shared servers here, so the resources and responsiveness when using a framework like .NET isn't ever going to equal your production environment, where everything seems to happen instantly.

    There is a cost/performance ratio and tradeoff where commercial hosting is concerned. You pay more for speed because it costs the host more to dedicate the necessary resources to your site to insure that speed.

    The reason I brought up network latency is because I saw a load time here that is considerably less than the 6 seconds you're seeing.
     

Share This Page