views:

198

answers:

2

We are running an ASP.NET app on a web server with 4GB+ of memory in IIS 6. After reading many articles, it states that we need to set the "maximum memory used" for the Application Pool to 800mb to eliminate the "out of memory exceptions" that are happening for us. However, what should the "maximum virtual memory" in the Application Pool be set to? I can't find information as to what that should be set to.

+1  A: 

The first thing you need to cover is whether you need so much memory in a web application. Our experience tells that a web application should use a reasonable amount of memory. That eliminates out of memory exception forever.

We usually recommend 1024 MB virtual memory as the max virtual memory usage for a pool on x86 machine.

Lex Li
Is there a formula you use to determine the virtual memory size?
This is not math, so we have no equation or formula. A profiler can tell you how memory is used by your application. Process Explorer can tell you more about every process.
Lex Li
A: 

4gb of memory is somewhat low for a server.

Martin Ongtangco
I disagree - if a box is running nothing but IIS, what would you really be doing with more than 4 GB?
josh3736
I think the box has something like 16 GB but the web site is running using 32-bit. We are limited to the 2 GB limit.
For ASP.NET, the memory limit is about 1.3G, not 2G which is for native applications.
Lex Li
@Martin Ongtangco, IIS is different from other server applications such as SQL Server, so 4GB is horrible for it.
Lex Li