Contents

User Profiles

Website Visitors:

An effective design of user profiles can make a significant difference in the performance and manageability of a XenApp environment. Many of the issues commonly seen in large or complex XenApp environments (including slow logon, loss of user settings, profile corruption, and excessive administrative effort) are often the result of sub-optimal user profile designs. A solid design and implementation of user profiles can maintain the integrity of user settings, eliminate issues requiring administrator intervention, and ensure high-performance user logon.

User Profile Background

Windows User Profiles Defined

At this point, it is useful to provide background information on the profile types available within Windows Terminal Services environments, and how they apply to Citrix XenApp. This document focuses only on Terminal Services profiles and how they relate to XenApp.

Microsoft provides several types of profiles that can be used in Windows Terminal Services/XenApp environment:

  • Local User Profiles. A local user profile is created the first time that a user logs on to a computer. The profile is stored on the computer’s local hard disk. Changes made to the local user profile are specific to the user and to the computer on which the changes are made.
  • Roaming User Profiles. A roaming user profile is a copy of the local profile that is copied to, and stored on, a server share. This profile is downloaded to any computer that a user logs onto on a network. Changes made to a roaming user profile are synchronized with the server copy of the profile when the user logs off. The advantage of roaming user profiles is that users do not need to create a profile on each computer they use on a network.
  • Mandatory User Profiles. A mandatory user profile is a type of profile that administrators can use to specify settings for users. Only system administrators can make changes to mandatory user profiles. Changes made by users to desktop settings are lost when the user logs off.
  • Temporary User Profiles. A temporary profile is issued each time that an error condition prevents the user’s profile from loading. Temporary profiles are deleted at the end of each session, and changes made by the user to desktop settings and files are lost when the user logs off. Temporary profiles are only available on computers running Windows 2000 and later.

A user profile consists of the following elements:

  • A registry hive. The registry hive is the file NTuser.dat. The hive is loaded by the system at user logon, and it is mapped to the HKEY_CURRENT_USER registry key. The user’s registry hive maintains the user’s registry-based preferences and configuration.
  • A set of profile folders stored in the file system. User-profile files are stored in the Profiles directory, on a folder per-user basis. The user-profile folder is a container for applications and other system components to populate with sub-folders, and per-user data such as documents and configuration files. Windows Explorer uses the user-profile folders extensively for such items as the user’s Desktop, Startmenu and Documents folder.

User profiles provide the following advantages:

  • When the user logs on to a computer, the system uses the same settings that were in use when the user last logged off.
  • When sharing a computer with other users, each user receives their customized desktop after logging on.
  • Settings in the user profile are unique to each user. The settings cannot be accessed by other users. Changes made to one user’s profile do not affect other users or other users’ profiles.

Additional User Profile Options

In addition to these basic profile types provided by Microsoft, there are other profile options that can be applied in a XenApp environment. These include the following:

  • Multiple Profiles
  • Citrix User Profile Management
  • Other

Multiple Profiles combine two or more of the three basic profile types (local, roaming, or mandatory) for the same user. Multiple profiles are useful in environments with application silos. For example, in a XenApp farm with two application silos serving SAP and a custom application, users can be configured to use a mandatory profile for the SAP servers and a roaming profile for the custom application servers. Multiple profiles are also useful for farms that span WAN connections, so that profiles can be accessed from local file servers instead of having to traverse the WAN. Multiple profiles can be implemented in a number of different ways, and the details of these options are discussed later in this white paper.

Citrix User Profile Management is a profile type that supersedes all other profiles for the user and is a unique type of profile. It addresses “last write wins” wins issues by only capturing the changes and recording those changes within the profile, rather than writing the entire profile at logoff. Thus, the obstruction that results from making profile changes when accessing multiple XenApp servers is minimized or eliminated.

Other third-party profile solutions exist but are beyond the scope of this document.

Analyzing Design Requirements

Now that the available profile types have been defined, it must be determined which one is right for use in a particular XenApp environment. To make the determination of the appropriate profile type, the requirements of a particular environment need to be carefully analyzed. Following are questions that need to be answered to define these requirements:

  • Do users need to save their settings?
  • Do applications store settings in the registry?
  • How will printers be made available, and how will printer settings be handled?
  • What is the farm design? Are applications streamed or segregated into application silos?

Now consider each of these questions to help determine an effective user profile design.

  1. Do users need to save their settings?

User requirements and expectations play a large part in which user profile type to use. An administrator must first determine which settings need to be saved and where those settings are stored. If users need to save settings that can be stored in redirected folders, such as Documents, AppData, or other folders, then folder redirection should be considered. Folder redirection can be used with all profile types discussed in this document, and are generally recommended.

  1. Do applications store settings in the registry?

If the application being deployed does not reference the HKEY_CURRENT_USER (HKCU) hive in the registry, then a mandatory profile solution can be considered. However, many applications do access this hive, so testing is required.

  1. How will printers be made available, and how will printer settings be handled?

The printing requirements have an impact on the user profile design. Printers are typically enabled through logon scripts or XenApp policies; here we will only discuss the latter.

In order to enable printing, it cannot otherwise be disabled in another Terminal Services or XenApp policy. If printing will be enabled through XenApp policies, administrators can choose where to save client-side settings. Where printer properties (File > Print > Preferences > Local Settings) can be retained has a direct bearing on the type of user profile that has been configured.

In the XenApp Advanced Configuration Console (formerly Presentation Server Console), the Citrix policy named Printer properties retention should be set accordingly. Following are available options:

  • Held in profile only if not saved on client (default)
  • Saved on the client device only
  • Retained in user profile only

Of course, if mandatory profiles are administratively configured, the last option would not be feasible because the printer properties could not be retained; however, if the properties can be retained on the client device, then mandatory profiles are a viable option.

  1. How is the XenApp farm designed? Are applications in silos?

In farms based on multiple application silos, having roaming profiles increase the likelihood of profile setting loss due to “last write wins” issues. For example, users simultaneously accessing SAP and a custom application hosted on different servers will overwrite roaming profile settings made in the custom application session if the user logs off from the custom application session before the SAP session. This effect can therefore be termed the “last write wins” condition. Citrix User Profile Management must be considered as an alternative to roaming profiles if users experience this issue.

Design Practices

When designing your XenApp environment, once the analysis of requirements has been performed, the appropriate profile type(s) needs to be selected.

Comparing Profile Options

The following table is useful for comparing the relative benefits of each profile type when analyzing the design requirements:

Profile Type

Benefits

Disadvantages

Local Profile

Fast LogonNo requirement for centralized repository for profile storageNot susceptible to corruption

Settings are inconsistent across servers and sessionsConsumes local disk space

Roaming Profile

User profile accessible from any XenApp serverSettings are saved across sessions

Slow loginSusceptible to “last write wins” and resultant settings loss where application silos exist

Mandatory Profile

Fast LogonNo settings are susceptible to loss

Settings are not saved across sessions

Multiple Profiles

Benefits of both mandatory and roaming profiles without the disadvantages of each

Potential for additional file server space requirementsComplex to implementAdministrative expertise and maintenance required

Citrix User Profile Management

Fast LogonAllows for the most control over settingsAddresses “last write wins” issueSpace requirements are minimal

Administrative effort and skills to implement and maintain

Using Active Directory Group Policies

Active Directory includes a number of group policies–including a subset of Terminal Services policies–that can be applied to a XenApp environment to optimize performance and stability. Terminal Services profiles are commonly configured within these Group Policy Object (GPO) options. Active Directory based on Windows Server 2003 SP2 and higher, as well as Windows Server 2008, allows Terminal Services mandatory profiles to be configured as a GPO.

Folder Redirection policies can be used with mandatory or roaming profiles to maintain a centralized location for specific folders and is generally recommended to exclude that data from the user profile. The folders that can be redirected are dependent upon the version of Active Directory in use. Where folder redirection is used, the AppData and Documents folders are redirected at minimum.

Without folder redirection, user data is stored within the profile. When folder redirection is enabled, user files stored in the selected folders are segregated from the user profile. As a result, user logins proceed as quickly as possible, and the impact on the profile is minimized.

For profile folders, such as Documents and Desktop, it is generally best to redirect them to the user’s home directory location, under subdirectories with the same profile folder names (such as: Desktop). Folder redirection paths can be in a UNC format (such as: \\servername\share\%username%\Desktop) or using a drive letter (such as: H:\Desktop). Use of a drive letter provides flexibility if home directories are stored across multiple file servers.

Depending on the profile solution selected, policies exist to exclude data from the user profile:

  • Roaming Profile: Exclude directories in roaming profile
  • Citrix User Profile Management: Registry exclusion list and File system exclusion list

In addition, deleting locally cached profiles on logoff can be configured for Microsoft profiles, as well as Citrix User Profile Management. By configuring appropriately, profiles are not cached on each XenApp server at logoff. In addition, a consistent user experience is assured and disk space is used efficiently.

Specifying Multiple Profiles

As discussed previously, a single user in a XenApp environment may be configured to use different profile types depending on the server being accessed. In a farm employing application silos, this can be useful. However, the administrative effort to configure and maintain multiple profiles needs to be weighed against the expected benefit. For example, a farm may have three different application silos and use different profile types within each silo.

The benefit of this approach is reduction in logon time and profile corruption, while maintaining the administrative benefits of application silos. Multiple profiles can be configured for users in one of several ways. The options are:

  • Environment variables
  • Only allow local user profile
  • Terminal Services profile per application silo

These three methods are described below.

The environment variables method involves setting the users’ profile paths to a value with an environment variable, for example: %profilepath%\%username%. On each server, the %profilepath% environment variable will be created. For a farm with two application silos running Microsoft Office and Lotus Notes, the variables could be specified using the SETX utility as follows:

  • Microsoft Office servers: %profilepath% = \\fileserver\office-profiles
  • Lotus Notes: %profilepath% = \\fileserver\lotus-profiles

When users log on to the Microsoft Office servers, profiles are loaded from \\fileserver\office-profiles\%username% as denoted by the user profile path and the value of the environment variable on those servers. This method also allows a user to have multiple mandatory profiles, or a blend of roaming and mandatory profiles by copying a mandatory profile (NTUSER.man file) into each specified profile path for every user.

Note: When implementing persistent environment variables using the SETX utility, a reboot might be required.

The Only allow local user profiles policy prevents a user’s roaming profile from downloading, and instead creates a local profile for the user. This option is useful in situations where a multiple application silo approach is used, such as, when published applications are run within published desktops. For example, if an application silo hosting a published desktop requires a roaming profile and a secondary application silo is accessed via a pass-thru ICA connection, it may be necessary to configure this setting. The Only allow local user profile policy therefore allows a blend of roaming and local profiles to be used. In Windows Server 2003 and Windows Server 2008, this policy is available in Active Directory (under the Computer ConfigurationAdministrative TemplatesSystemUser Profiles settings).

Alternatively, within Citrix User Profile Management, distinct profiles can be designated based on the Organizational Unit (OU) structure.

Finally, where application silos are designated based on computer-based OU, the Terminal Services profile per application silo can be configured accordingly. Using this technique, users can have different roaming profiles depending on the GPOs that are applied to specific servers.

The policy Set Path for TS Roaming User Profile (available under Computer Configuration > Administrative Templates > Windows Components > Terminal Services) can be specified.

An easier means of configuring multiple profiles is by means of Citrix User Profile Management. Because the profile configuration is based on Active Directory OUs, a distinct profile can be designated per application silo so long as each silo is in its own child OU.

Want to learn more on Citrix Automations and solutions???

Subscribe to get our latest content by email.

If you like our content, please support us by sponsoring on GitHub below: