Copied to clipboard

Flag this post as spam?

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


  • Robert Dyson 50 posts 147 karma points c-trib
    Mar 20, 2014 @ 12:42
    Robert Dyson
    0

    Umbraco 7 - Worker Process Memory Usage

    I've created a few sites now using Umbraco version 7. I then started to notice that my server, where I am hosting these sites, was running slowly. Examining the processes showed that I have lots of RAM being chewed up by these websites.

    I was wondering if anyone knew what a typical memory size was for these sites. I only have about 5-6 pages with text and images etc. I am finding it's about 100MB, is that normal?

    Are there any best practices for minimising the memory that it uses. I should also say that the compile on first load seemed to take forever so I have removed the expiry time of the application pool in IIS. I also tried running several sites in the same pool to minimise memory usage.

    I would love to know if I'm hosting these sites correctly or if there is anything I can do, because at this rate I won't be able to host many sites before the server is maxing out it's memory usage?

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 20, 2014 @ 12:49
    Ismail Mayat
    1

    Robert,

    What server / IIS you using? I recently had issues with win2k12 64bit iis8 server all my sites were grinding to a halt and i was getting 98% cpu usage. The server had mix of sites anything from v4.0 - 452 - v6. Anyhow I found article about iis memory hogging and found that on 64bit iis application pools has enable 32bit set to false. So i went through my sites set that to true and as i was doing it my memory usage started to come down from 98% to 70% this speeded things up for me.

    Regards

    Ismail

  • Robert Dyson 50 posts 147 karma points c-trib
    Mar 20, 2014 @ 12:54
    Robert Dyson
    0

    Thanks for the quick reply!

    I am using Windows Server 2008 64bit and IIS 7. However I know the field you are talking about. I'll give that a try and see what happens.. 

    So there are no other settings/debugging options etc. I need to change?

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 20, 2014 @ 12:56
    Ismail Mayat
    0

    Not that i am aware of, like i say it speeded things up for me, in fact on one of my sites the media section refused to load the query was taking 11 mins, i turned on 32bit and it started loading again major WTH no idea why but it worked. I am still not happy with memory usage its 78% but its all running nicely this server has got 4gb ram which should be ample?

    Regards

    Ismail

  • Robert Dyson 50 posts 147 karma points c-trib
    Mar 20, 2014 @ 12:59
    Robert Dyson
    0

    Do you have each site in it's own application pool? 

    How much RAM do your IIS worker processes take up? - This might be too much hassle for you to check so I don't mind if you say I don't know...

    Thanks.

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 20, 2014 @ 13:04
    Ismail Mayat
    0

    Robert,

    No hassle i need to get to bottom of this as well. So at the moment my live server is reporting 93% memory usage. All my sites run in own app pools and they memory usage is ranging from 200mb - 42 mb the highest one is the most active site. So not perfect but everything runs fine where as before it was running really really slow. No IIS expert but is worth setting memory limit in advanced settings for app pool?

    Regards

    Ismail

  • Robert Dyson 50 posts 147 karma points c-trib
    Mar 20, 2014 @ 13:09
    Robert Dyson
    0

    I tried setting the memory limit, but it just forces the App Pool to recycle. This means the site has to re-compile again so the load time sky rockets... 

    I'm just glad to know that your worker process is a similar size. I'm actually running on a cloud server which only has 1GB RAM and the database sits on another server. I'm going to re-size it to 2GB which will obviously make everything faster, but I didn't want to run into the same problem when I uploaded a few more sites.

    It just seems that all .Net MVC applications take up about this much RAM. 

    I would like to know how I can reduce the initial load time when it compiles, then I could possible make the process recycle more often.

     

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Mar 20, 2014 @ 13:34
    Stefan Kip
    0

    I wish we had memory usage of 100 ~ 200 Mb per site...

    Memory usage

  • Robert Dyson 50 posts 147 karma points c-trib
    Mar 20, 2014 @ 13:48
    Robert Dyson
    0

    YOWWWCHHH!!!

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 20, 2014 @ 14:29
    Ismail Mayat
    0

    kipusoep,

    Woah that is crazy. I take it you are having performance issues? If you are i would get uglimpse and maybe ants profiler on the case and see where its all going pete tong!!!

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Mar 20, 2014 @ 14:45
    Stefan Kip
    0

    Nope, this is just 'another day at the office'. Some huge sites btw...

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Mar 20, 2014 @ 18:41
    Sebastiaan Janssen
    0

    @Stefan, what does the column header say "Me..." and then what? There's a big difference between private memory and shared memory, make sure to look at the private memory usage.

  • Robert Dyson 50 posts 147 karma points c-trib
    Mar 20, 2014 @ 18:58
    Robert Dyson
    0

    So, out of interest, I span up a 2012 server and all the sites ran SO much faster, and the initial load time was negligible. Although the memory usage seemed to be a similar size. I'm going to switch all my sites to server 2012.. I've also enabled 32bit applications as suggested. Bring on more Umbraco sites!!

  • Gavin Bewley-Jones 25 posts 71 karma points
    Sep 17, 2014 @ 12:03
    Gavin Bewley-Jones
    0

    Weve just noticed the same on one of our shared boxes.

    Ive just set the cache expiry all macros that can be cached, killed old process and restarted the site and currently that site is running a lot quicker and using a 3rd to a quarter of the memory it was previously.

    Going to leave that a day or so and have another look but I cant see it changing to much so will then roll this out to all sites.

  • Robert Dyson 50 posts 147 karma points c-trib
    Sep 17, 2014 @ 12:20
    Robert Dyson
    0

    Thanks Gavin. 

    However, I don't think I can cache macros in Umbraco 7. They are all Partial Views etc. 

    Currently most of my sites run at about 50 Mb

    Rob

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Sep 18, 2014 @ 09:24
    Stefan Kip
    4

    Wow, switching to 32 bit mode really improved memory usage. One example; 150MB instead of 350MB for one website!
    Even Microsoft recommends running in 32 bit mode:

    We recommend that you configure IIS to use a 32-bit worker processes on 64-bit Windows. Not only its compatibility better than the native 64-bit, performance and memory consumption are also better.

    Source: http://www.iis.net/learn/web-hosting/web-server-for-shared-hosting/32-bit-mode-worker-processes

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Oct 02, 2014 @ 18:19
    Sebastiaan Janssen
    0

    I think that this joy didn't last for very long (memory usage went down only because there was an app pool recycle, clearing the memory), we identified and fixed a memory leak in PetaPoco, this update should fix the issue much better: http://umbra.co/1E4RFPH

Please Sign in or register to post replies

Write your reply to:

Draft