Re: ASP.NET application hits 2GB virtual bytes



Hi, Robert.

re:
!> The server it is being tested on has 4GB of RAM, with the 3GB switch on boot.

The 3GB switch limits the *virtual address space*, not the working memory set.

re:
!> <processModel enabled="true" memoryLimit="20" ... />
!> According to the documentation this should have
!> limited the virtual bytes to approx 800 MB for the process

Since, if you use the 3GB switch, you have 3GB for user mode virtual address space
and 1GB of kernel mode virtual address space, and kernel mode virtual address space
is not available to applications, you should be seeing physical RAM top out at 600MB
( 20% of the available 3GB user mode address space ) ...and your application recycling at that point.

20% is way too little for IIS and ASP.NET to function efficiently.
Try setting that to at least 40-50%. The default is 60%.

You need to distinguish between memory usage and virtual address space.

The term "address space" refers to how a numerical value (known as an "address")
is interpreted when it is used to access some type of resource.

There is a physical address space; each address in the physical
address space refers to a byte in a memory chip somewhere.

The virtual address space is the set of possible pointer values
(addresses) that can be used at a single moment by the processor.

If you have an address like 0x12345678, the virtual address space
determines what you get if you try to access that memory.

The contents of the virtual address space changes over time, as you allocate and free memory.
It also varies based on context: each process has its own virtual address space.

Saying that 2GB or 3GB of virtual address space is available to user mode means that at
any given moment in time, out of the 4 billion virtual addresses available in a 32-bit value,
2 billion (or 3 billion) of them are potentially usable by user-mode code.

What I would suggest is taking a look at your code and seeing which
processes are causing the extremely large usage of virtual memory.

Maybe Process Explorer could give you an inkling as to which processes are hogging your memory.
Download it from : http://www.microsoft.com/technet/sysinternals/utilities/processexplorer.mspx

The processes' images will have some info for you.

That said, your basic problem is that you're running in IIS 5.0 compatibility mode.

When a server is running in IIS 5.0 isolation mode, application pools,
***recycling***, and health monitoring features are unavailable.

That makes debugging memory processes a tad more difficult,
and that recycling is not available is the reason why you are seeing RAM use run to 2GB.

Is there any reason you're running IIS 5 isolation mode ?

Can you switch to IIS 6.0's worker process isolation mode ?

If you can do that ( IIS 5.0 compatibility is not too-often needed ),
you'll be able to use recycling...and your IIS processes will keep themselves healthy.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Robert Slaney" <Robert Slaney@xxxxxxxxxxxxx> wrote in message
news:28ECCC06-366E-46B5-A36C-EAE6CC33F816@xxxxxxxxxxxxxxxx
We have a problem with a ASP.NET web application that is experiencing
OutOfMemory Exceptions. On analysis we have noticed that the Virtual Bytes
of the aspnet_web process ( running IIS5 Mode on Win2K3 ) hits the 2GB mark.

The server it is being tested on has 4GB of RAM, with the 3GB switch on boot.

We have also added the following to the machine.config

<processModel enabled="true" memoryLimit="20" ... />

According to the documentation this should have limited the virtual bytes to
approx 800 MB for the process.

Can anyone shed any light on this, or suggest other measurements / settings
we should be looking at ?

Cheers...

Rob


.



Relevant Pages

  • Re: Windows 2000 Server StandardEdition /PAE Question
    ... It appears that the application vendor is now mixing, or confusing Physical Memory with Virtual Memory and /PAE with 4GT RAM Tuning. ... Using the /PAE switch does not provide more physical memory to the programs, it allows operating systems capable of using the switch to use more than 4GB of RAM. ... Windows 2000 Server does not support this switch and it cannot use more than 4GB of RAM, using this switch does not permit applications to use more RAM. ...
    (microsoft.public.win2000.general)
  • Re: Windows 2000 Server StandardEdition /PAE Question
    ... Physical Memory with Virtual Memory and /PAE with 4GT RAM Tuning. ... Using the /PAE switch does not provide more physical memory to the programs, it allows operating systems capable of using the switch to use more than 4GB of RAM. ... Windows 2000 Server does not support this switch and it cannot use more than 4GB of RAM, using this switch does not permit applications to use more RAM. ...
    (microsoft.public.win2000.general)
  • Re: Windows 2000 Server StandardEdition /PAE Question
    ... Physical Memory with Virtual Memory and /PAE with 4GT RAM Tuning. ... Using the /PAE switch does not provide more physical memory to the ...
    (microsoft.public.win2000.general)
  • Re: ASP.NET application hits 2GB virtual bytes
    ... The server it is being tested on has 4GB of RAM, with the 3GB switch on boot. ... The 3GB switch limits the *virtual address space*, not the working memory set. ... your basic problem is that you're running in IIS 5.0 compatibility mode. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: 4GBs of RAM Miscount
    ... If you look in the BIOS at boot time, ... Why can't I see all of the 4GB of RAM in my machine? ... have you ever applied the switch to a SBS 2003 box? ... it increases the 'pointers' for memory handling to allow 32b systems ...
    (microsoft.public.windows.server.sbs)