Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon 17 posts 40 karma points
    Jul 26, 2010 @ 12:29
    Jon
    0

    Poor performance on staging server

    Hi. Wonder if anyone would be able to shed some light on an issue I'm having.

    Created a site using Umbraco 4.0.4.1. On our dev environment performance has been good with no noticeable issues. However, on copying the site to out staging environment the performance is suffering dramatically. Pages in both the front-end website and back-end CMS take a very long time to load, and looking at the CPU usage, any call to our site sends w3wp.exe up to 100%.

    Both our dev environment and staging environment are identical in terms of spec. To deploy, we copied all files from one server to the other and changed the relevant SQL connection strings.

    Does anyone have any ideas of obvious things we can check or any known issues which could cause this behaviour? Any help would be gratefully received.

    Cheers

    Jon

    PS. We are using ImageGen but I've updated to the latest version so I'm pretty sure that's not causing the problem.

  • Jon 17 posts 40 karma points
    Jul 26, 2010 @ 13:06
    Jon
    0

    Just a quick update. I ran the site with the trace turned on and even though the page takes a long time to render, the "End Render" event fires in 0.8 sec. Therefore, I'd guess it's something to do with IIS, rather than ASP.net. No idea what though.

  • Chris Gaskell 59 posts 142 karma points
    Jul 26, 2010 @ 17:41
    Chris Gaskell
    0

    Jon,

    What is slow? Seeing the whole page or just images etc?

    Chris.

  • Jon 17 posts 40 karma points
    Jul 27, 2010 @ 10:34
    Jon
    0

    Hi Chris. Thanks for the reply. Basically everything is slow. When I view our site, each page takes 15-30s to load. The images do take a while to come through but it takes quite a bit of time for the page to even render the html elements. Also the CMS is very slow. Expanding a content node, for example, takes 15s. Loading an xslt file takes 20s. On our identically specced dev server it's really quick.

    The strange thing is that the ASP.net trace looks pretty good. The entire request takes less than a second, which makes me think that IIS is interfering beforehand. I did think SQL Server may be having issues but if that were the case I'd expect to see the trace take longer than it is (happy to be corrected on this).

    It's probably worth mentioning that our site isn't even very large. We have just under 20 document types and maybe 100 or so content nodes.

    Cheers

    Jon

  • Chris Gaskell 59 posts 142 karma points
    Jul 27, 2010 @ 16:21
    Chris Gaskell
    0

    Jon,

    I'm really stumped - all I can say is what you have already concluded and that is there is something very different with the server OS / software between your environments.

    IIS sounds like a reasonable place to start. I have no idea what to suggest though - has something like content compression been enabled and is causing a conflict? Is there anything in the umbraco log or event viewer? Would it be worth knocking together a quick http module hooked onto app_onerror to catch every exception and dump them in the db / text file?

    How does a clean instance of umbraco perform?

    Thanks,

    Chris.

  • Jon 17 posts 40 karma points
    Jul 27, 2010 @ 17:28
    Jon
    0

    Appreciate the help Chris. I've just had a quick look at the umbracoLog table. I'm not 100% sure what I'm looking at (still new to Umbraco) but I did notice something a bit strange. On the dev server, whenever I load a page in my website I seem to get 2 rows added to the event log:

    2010-07-27 16:16:59.880    System  Application started at 27/07/2010 16:16:03
    2010-07-27 16:16:59.880 System Loading content from disk cache...

    In the staging server it looks more like this:

    2010-07-27 16:18:01.930    System  Application started at 27/07/2010 16:17:05
    2010-07-27 16:17:49.293 System Application started at 27/07/2010 16:16:53
    2010-07-27 16:17:34.410 System Loading content from disk cache...
    2010-07-27 16:17:34.397 System Application started at 27/07/2010 16:16:38

    i.e. each time I try to load a page I get multiple "Application started" events (I'm the only person accessing the server btw). My knowledge of Umbraco's workings isn't sufficient to say whether this is significant though or just a red herring.

    I'll have a look at the event viewer in a bit and let you know if I find anything else interesting.

    Cheers

    Jon

  • Chris Gaskell 59 posts 142 karma points
    Jul 27, 2010 @ 17:39
    Chris Gaskell
    0

    Jon,

    If you are the only person accessing the site then there's a good chance the application pool is being removed from memory due to inactivity.

    Does the site speed up at all after the first page load?

    IIS (by default) will dismount any application from memory after 20 mins (from my memory). So if you leave 30 mins between requests IIS will need to copy the application back into memory - making the first request slow. The loading from cache is when Umbraco loads the data/umbraco.config file and puts it back into memory.

    Chris.

  • Jon 17 posts 40 karma points
    Jul 27, 2010 @ 18:39
    Jon
    0

    Hi Chris. I get what you're saying but unfortunately I'm not sure if that's the issue. The site is slightly slower when you first load it but pages still take ages to load after that if you continue to use it.

    For example, when I load the site up for the first time it takes approx 40s due to the app pool re-initialising. I then click on "Page X", which takes ~20s to load. If I load another page, then go back to page X it still takes roughly 20s to load. Each time I view a page I get 2 or 3 "Application Started" lines in the event log as per my other post. If i try the same on my dev server though, I only get 1 "Application Started" entry per page. I'm not sure if that part is noteworthy though or is just expected behaviour.

    I've been unable to remote onto the server this afternoon but I'll be able to tomorrow, so I'll have a look in the event viewer and post back my findings.

    Thanks for your continued help by the way. Much appreciated!

    Jon

  • Jon 17 posts 40 karma points
    Jul 27, 2010 @ 18:47
    Jon
    0

    Actually, hold that thought - I've just sorted it. Turns out that without my knowing another developer had set up the app pool to recycle the worker process after every request! Reset it and it works fine. Oops!

    Thanks for your help anyway mate. At least I've learned a bit about the Umbraco logging system/page lifecycle etc.

    Cheers

    Jon

Please Sign in or register to post replies

Write your reply to:

Draft