You can enhance system speed, performance, and scalability by improving virtual memory utilization for a server using the Citrix memory optimization service. The service improves how DLLs are shared among applications running on the server, saving virtual and real memory. The service changes the location that individual DLLs are loaded in memory to increase the amount of possible sharing. The process is called rebasing.
Memory optimization is especially useful when user demand exceeds available RAM and causes farm performance to degrade. Performance degradation can occur during peak times when users run memory-intensive applications in multiple sessions.
For a variety of reasons, not all applications can be successfully optimized. You can add those applications that cannot be optimized to an exclusion list to bypass optimization. You do not want to enable memory utilization management on farms or servers that exclusively host signed or certified applications because these cannot be optimized. XenApp can detect only some published applications that are signed or certified.
The memory optimization feature includes the ability to set the schedule for DLL rebasing and to exclude specific applications from DLL rebasing. Rebasing is composed of two parts: A scanning component that locates modules that are candidates to be rebased, and a rewriting component that performs the optimization. If you enable memory optimization, the scanning component runs regularly on the server. However, the rewriting component runs only when scheduled.
To enable memory optimization
Configure the Citrix policy setting for Memory/CPU > Memory optimization to enable the feature.
Continue by creating a memory optimization schedule for when a server rebases DLLs and, if needed, an exclusion list of applications that cannot be optimized. To create the list, test the feature on a test server.
To create an exclusion list of applications
Not all applications can be optimized successfully. The process automatically excludes some applications. However, if published applications fail after enabling and running memory optimization, exclude
those applications from memory optimization by adding them to the exclusion list.
Some types of application that cannot be optimized include:
- Applications that reside on network shares (automatically excluded).
- Applications that have digitally signed components.
- Applications whose DLLs are protected by Windows Rights Management. For example, applications such as Office 2003 do not benefit from this feature.
- Applications whose executable programmatically checks the DLL after it is loaded.
- Applications that require a fixed DLL address.
In general, if an application was working, but it stops working after you enable this feature, add the application to the exclusion list and see if the problem is resolved.
With memory optimization enabled, to exclude additional applications, configure the Citrix policy settings for Memory/CPU > Memory optimization application exclusion list by adding the full path and executable name for the application, for example:
where %Program Files% is the full path to the application.
To create a memory optimization schedule
After you enable virtual memory optimization, the server rebases DLLs automatically at server start-up. When the service rebases, it changes the location that individual DLLs are loaded in
memory to increase the amount of possible sharing.
You can create an additional virtual memory optimization schedule that identifies other times when a server rebases DLLs for greater operating efficiency.
As a best practice, schedule virtual memory optimization at a time when your servers have their lightest loads.
With memory optimization enabled, configure these Citrix policy settings for Memory/CPU
- Memory optimization interval. Set the frequency internal to daily (default), weekly, monthly, or only when you restart your server. If you choose to run the program weekly or monthly, specify the day of the week or month.
- Memory optimization schedule: day of month (1 by default). Enter the day of the month using values 1-31. Note that if the specified day does not occur in a given month, such as day "31" in June, memory optimization does not run in that month. This setting is used only if you set the interval to Monthly.
- Memory optimization schedule: day of week (Sunday by default). Select the day of the week that memory optimization runs. This setting is used only if you set the interval to Weekly.
- Memory optimization schedule: time (3:00 AM by default). This setting is used only if you set the interval to Daily, Weekly, or Monthly.