10

I have an ASP.NET MVC application deployed on IIS 8.5 in a Web server and I would like to know the differences between these two features for the setting "Idle Time-out action".

If process is suspended, are the memory and resources used by the process removed and freed? I think it is good to remove and free memory used to avoid memory leaks so I usually use Terminate feature.

Willy
  • 9,848
  • 22
  • 141
  • 284

2 Answers2

14

I think you should choose Suspend or Terminate according to your application environment.

Normally, to configure Idle Worker Process Page-Out for a Single Application Pool, we choose Terminate, to configure Idle Worker Process Page-Out as a Default for Application Pools, we choose Suspend.

IIS provides the administrator with an option of timing out a worker process that is idle for a specified period of time. This is a good option for sites that are not accessed very often because it frees up system resources when the site is idle. The disadvantage is that the next time the site is accessed, the user will need to wait for the worker process to start again.

In Idle Time-out action, it provides an option of suspending an idle worker process rather than terminating it. A suspended worker process remains alive but is paged-out to disk, reducing the system resources it consumes. When a user accesses the site again, the worker process wakes up from suspension and is quickly available. When an idle worker process is terminated, the worker process is shut down and the startup period will be longer when the site is subsequently accessed.

Bakudan
  • 19,134
  • 9
  • 53
  • 73
samwu
  • 3,857
  • 3
  • 11
  • 25
  • What do you mean by Page-Out? What is paged-out? Could you explain it? And in case of suspending, when it is paged-out to disk, is memory used by the process released? Also in case of Terminating a process you could use AlwaysRunning for application pool feature "Start mode" so worker process is immediatelly started up as soon as application pool is running and consequently making it quicly available and avoiding the user to need to wait for it the next time he/she accesses the site. – Willy Nov 16 '20 at 10:56
  • 2
    You can refer to this link: [Idle Worker Process Page-Out in IIS](https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-85/idle-worker-process-page-out-in-iis85#step-by-step-instructions). – samwu Nov 16 '20 at 11:00
  • ok, now I understand. But could I make the assumption that memory used by the worker process is removed and freed? In the link you provided it is said that in task manager we can notice that they use very little memory. – Willy Nov 16 '20 at 11:16
  • Few does not mean no, what is your purpose? – samwu Nov 17 '20 at 10:42
  • Our purpose is to free up the memory used by the worker process from time to time to avoid potential memory problems (memory leaks, etc.) that may arise later. – Willy Nov 17 '20 at 10:57
  • 1
    If so, i suggest you set the value of Idle Time-out Action property to Suspend, because it frees up system resources when the site is idle. – samwu Nov 18 '20 at 08:14
  • When you say it frees up system resources, do you also mean it frees up memory? When you talk about resources, do you refer as well to memory? – Willy Nov 18 '20 at 08:49
3

I realize that this question is getting "old" in internet time but I did want to point out one thing. While I agree with samwu and upvoted his answer, the OP mentioned in the question and again in a comment above that he wants to avoid potential memory leaks. Suspend will NOT help with that because the process is not terminated so Windows cannot reclaim the "leaked" memory. "Suspend" is to App Pools as "Hibernate" is to your dekstop/laptop. If there is a problem in/with memory and you Hibernate your computer, it will still be there when you come out of hibernation

Andrew Steitz
  • 1,856
  • 15
  • 29