First, let’s take a look at the definition of the page file according to Microsoft:
“Page files enable the system to remove infrequently accessed modified pages from physical memory to let the system use physical memory more efficiently for more frequently accessed pages.”
Now, let’s take a look at how ControlUp helps customers around the world to save memory, CPU and IOPS by freeing up resources when a user is disconnected from his session.
We give customers this default trigger, right out of the box:
This trigger will perform the following action when a user disconnects:
ControlUp lowers the priority of the processes of the user and trim process working sets.This last part is important. Trimming the process working sets frees up memory consumed by the users’ processes by leveraging the usage of the page file. ControlUp simply tells the Windows OS that the user’s processes are considered infrequently used and they will be written to the page file.
Let’s take a look at how this works.
This is the usage of the test machine’s memory before I am connecting to the system:
Note that 485MB of the 2.6GB page file is used here.
Next, we go to the machine and open a web browser and some apps:
The memory working set for my test user is 2GB. I disconnected my user session and waited a few seconds for the trigger action to launch. Now let’s take a look at the usage of the page file:
The peak in pages / sec is memory committed to the page file by the user’s processes.
After this peak the page file increased in size by approximately 600 MB.
NOTE: Not ALL of the memory committed to the page file is transferred back to RAM when the user resumes the session.
Not all memory used by Chrome or Internet Explorer will be immediately accessed; only pages in active use will be transferred back to RAM.
Design your page file to be able to hold multiple users’ memory pages. This example was for just one user and, even then, 600MB were added to the page file.
On average, we see around 15% to 20% of disconnected sessions in customers’ environments.
For example, a session host can hold up to 40 sessions; around eight will be in a disconnected state. These 8 sessions will add around 4-8GB to the page file on that host, so make sure the page file can hold these memory pages from the users and that the disk of the session host is fast (preferably an SSD/Flash tier).
Citrix WEM users will often enable the settings for idle sample time The default provided by Citrix is 120 minutes, but admins are often tempted to lower that threshold. Doing this (like in this screenshot) can cause serious problems with your system’s storage, because just like with ControlUp, this optimization adds memory pages from RAM to the page file for ALL processes (from system and users in any session state).
True story: in my time as a Citrix TAM, I had a customer who had a total SAN failure after they set the above setting to 15 minutes!
Bottom line: make sure you use Triggered Actions by ControlUp to save RAM from disconnected sessions, and don’t forget to increase that page file and put it on the highest tier of storage.