Windows – Can an IIS worker process’s Virtual Memory use exceed the Private Memory limit

iisiis-6iis-7iis-7.5windows

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?

Best Answer

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.