3

I recently rented some shared space on WinHost.com (Basic package). I deployed a single ASP MVC3 application that uses NHibernate. It is a very lean app and I have profiled it for memory leaks and on my local IIS 6.1 I never have a problem with it.

However, when deployed to WinHost, the app pool keeps recycling. Their Support say that the Basic package gives you a max app pool size of 100M. I have the same app code running on their Max package and Support tell me that it uses 130MB of its 200MB limit.

Before I run off and upgrade my Basic package to Max, does anyone know if that is a typical size for a lightweight ASP MVC app. It doesn't use session or cache and has very thin pages. It just seems odd to me that you cannot run a single ASP application on their basic package. Are they only designed for static sites or something?

Rob Kent
  • 133
  • 6

2 Answers2

2

It's extremely difficult to predict. I've seen lightweight MVC apps with single worker processes consuming 12-1300 MB of memory (yes, 1.3 GB).

As you probably know, the .NET CLR is built around a 2-stage compilation model, meaning that your pre-compiled assemblies still need to be translated from MSIL (Microsoft's implementation of the Common Intermediate Language) into machine code. When a request is first made to an IIS application, all pages are parsed and compiled, and the results are cached in the process' memory.

So your actual output may not be that "heavy", but the process still need to allocate memory for the compiled assemblies and all dependent assemblies loaded from the global assembly cache.

Furthermore, it depends on much more than just the application itself. There's a great deal of difference in the memory an application consumes when it has a request queue of 10 compared to a 1000 hits (even though each request has a low memory footprint).

To me, a 100MB limit sounds like quite a restraint

Mathias R. Jessen
  • 25,161
  • 4
  • 63
  • 95
  • Thanks. I've never really considered it before because my apps have run on corporate servers with lots of resources but shared hosting with 100MB limits is obviously not going to work for me. – Rob Kent Feb 22 '12 at 08:27
0

Are both yours and the vendor's platform the same bitness? I have found that when running an application on x64, the memory usage increases when compared to x86, and if there are a lot of objects, it can double.

Greg Askew
  • 35,880
  • 5
  • 54
  • 82
  • I would imagine that they are x64; I am x86. So that could also be a factor. Apparently ASP.NET (CLR) is itself about 60MB on its own. – Rob Kent Feb 22 '12 at 17:17