Time-Sharing Model
AgilePoint Server employs a time-sharing model where the maximum number of threads is configurable based on hardware specifications and characteristics of the process (i.e. whether there are more human oriented or system oriented activities). For more information, refer to Configuring the AgilePoint Server Thread Pool Size.
For example, if maximum threads = 100, and there are 50,000 running processes, 10,000 are active (not idle), only a maximum of 100 threads will be created and shared by 10,000 process instances.
When process instances become in idle state, the workflow engine starts swapping process instances from memory. Or, when total memory (.NET) reaches a certain point, the workflow engine swaps some of process instances out of memory based on the last processing timestamp. When the engine has nothing to do, it will release threads and leave 5 threads at a minimum.