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?


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.

  • Thanks for the reply. I've got my head around this now (see my comment to Vivek below). – Kev Nov 12 '10 at 0:58

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.

  • 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 Nov 12 '10 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.