Can an IIS worker process's Virtual Memory use exceed the Private Memory limit?

6,615

Solution 1

Yes It would be common for an IIS worker process to use more virtual memory than physical memory. To see for yourself download a copy of ProcessExplorer and look at the process memory of one of the IIS worker processes.

As an example from the below screen capture, from ProcessExplorer on an IIS 6 Server, you can see that this IIS worker process is using ~195MB of Virtual Memory and ~37MB of Physical Memory (Working Set).

For an explanation of the relationship between the different memory types see this StackOVerflow question What is private bytes, virtual bytes, working set?

alt text

So based on the limits you have configured using a IIS Worker Process that is using 90MB of Physical and 256MB of Virtual wouldn't trigger a recycle of the Application Pool.

Solution 2

You must use Performance Monitor to understand the memory usage of a particular process. You should use Virtual Bytes and Working Set to understand the memory used by a particular process.

Now, coming to address your original question. You are trying to add a recycling option to an Application Pool, can i ask the question why do you want to implement recycling on the worker process? If you are worried about the amount of memory used by the process well you should troubleshoot the memory issue and not limit the process.

Share:
6,615

Related videos on Youtube

Kev
Author by

Kev

###Actively looking for freelance work ###About Me: I'm a professional software developer and have spent my time building provisioning and web based self-service systems for IIS, Apache and Citrix XenServer, amongst other things. My Curriculum Vitae can be viewed on Stack Overflow Careers (might be a bit out of date). Stuff I like to listen to at last.fm You can get in touch here: kevin.e.kenny #@# gmail.com (you know what to do with the # and spaces). No Survey Emails Please. Also not ashamed to admit I like trains, mostly diesels, late Era 8 (BR Sectorisation) and Era 9 onwards :) I'm also interested in signalling if anyone from Network Rail is looking this far down ;)

Updated on September 17, 2022

Comments

  • Kev
    Kev over 1 year

    For example, if I configure the following limits for an Application Pool in the "Recycling" settings:

    Virtual Memory: 512Mb
    Private Memory: 128Mb - or "used memory" in IIS 6 parlance

    Can the process use, say, 90Mb of physical memory but have requested the use of 256Mb of Virtual memory and thus not trigger a recycle?

  • Kev
    Kev over 13 years
    I was asking more out of curiosity. However, in the past two weeks we had an issue with a production application (memory leak) which forced me to finally go and read Mark Russinovich's Windows Internals book which has been sitting unopened on my bookshelf for far too long. That and getting re-familiared with ADPlus, WinDBG and SOS has cleared up any misunderstandings I had about these settings. But thanks for the reply and +1.
  • Kev
    Kev over 13 years
    Thanks for the reply. I've got my head around this now (see my comment to Vivek below).