Product Documentation

Managing Farm Infrastructure

Oct 09, 2015

All farms include infrastructure functions to support the servers hosting published applications. Whether you configure these functions on shared or stand-alone servers depends on your farm’s size and requirements.

Farms comprise at least one zone or grouping of servers. Multiple zones are sometimes used to improve the performance on geographically segmented farms. Within the zone, there is a data collector, which contains information about other servers in the farm, and servers designated as backup data collectors. If the data store fails, each server on the farm also contains a backup of all data store information, known as the local host cache.

XenApp Troubleshooting Tools

Citrix Auto Support is a free online troubleshooting platform for your Citrix environment. Citrix Auto Support quickly analyzes your log files, profiles your environment, and scans for known issues, providing customized advice for a solution. Access Citrix Auto Support here to upload your log files.

Maintaining the Local Host Cache

A subset of data store information, the local host cache, exists on each server in the farm, providing each member server with quick access to data store information. The local host cache also provides redundancy of the data store information, if for example, a server in the farm loses connectivity to the data store.

When a change is made to the farm’s data store, a notification to update the local host cache is sent to all the servers in the farm. However, it is possible that some servers will miss an update because of network problems. Member servers periodically query the data store to determine if changes were made since the server’s local host cache was last updated. If changes were made, the server requests the changed information.

Refreshing the Local Host Cache

You can force a manual refresh of a server’s local host cache by executing dsmaint refreshlhc from a command prompt. This action forces the local host cache to read all changes immediately from the farm’s data store. Refreshing the local host cache is useful, for example, if the Citrix Independent Management Architecture (IMA) Service is running, but published applications do not appear correctly when users browse for application sets.

A discrepancy in the local host cache occurs only if the IMA Service on a server misses a change event and is not synchronized correctly with the data store.

Recreating the Local Host Cache

You can manually create the local host cache from the farm’s data store. If the IMA Service fails to start or you have a corrupt local host cache, you may need to recreate it.

To recreate the local host cache, stop the IMA Service and then run the command dsmaint recreatelhc. Running this command performs three actions:
  • Sets the value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\IMA\ RUNTIME\PSRequired to 1.
  • Deletes the existing local host cache (Imalhc.mdb)
  • Creates an empty local host cache (Imalhc.mdb)

You must restart the IMA Service after running dsmaint recreatelhc. When the IMA Service starts, the local host cache is populated with fresh data from the data store.

The data store server must be available for dsmaint recreatelhc to work. If the data store is not available, the IMA Service fails to start.

Tuning Local Host Cache Synchronization

You can adjust the interval by which member servers query the farm's data store for missed changes. The default interval is 30 minutes. In most cases, this default setting is sufficient.
Caution: Editing the Registry incorrectly can cause serious problems that may require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it.

You can configure the interval by creating the following registry key on each server you want to adjust, with the value expressed in hexadecimal notation:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\IMA\ DCNChangePollingInterval (DWORD)

Value: 0x1B7740 (default 1,800,000 milliseconds)

You must restart the IMA Service for this setting to take effect.

Most changes made through the Delivery Services Console are written to the data store. When you open one of these tools, it connects to a specified server. The Citrix Independent Management Architecture (IMA) Service running on this server performs all reads and write operations to the data store for the console.

If the data store is experiencing high CPU usage when few read or write operations to the data store are occurring, it is possible that the data store is not powerful enough to manage a query interval of 30 minutes. To determine whether or not the data store query interval is causing the high CPU usage on the data store, you can set the query interval to a very large number and test CPU usage. If the CPU usage returns to normal after you set a large query interval, the data store query interval is probably the cause of the high CPU usage. You can adjust the query interval based on performance testing.

To test the query interval, set the interval to 60 minutes and then restart all the servers in the farm. If the data store is still experiencing constant high CPU usage, increase the query interval further. If the CPU usage returns to normal, you can try a smaller value. Continue these adjustments until data store CPU usage is normal.
Important: Do not set the data store query interval higher than necessary. This interval serves as an important safeguard against lost updates. Setting the interval higher than necessary can cause delays in updating the local host cache of the farm’s member servers.

To configure zones and back-up data collectors

To optimize IMA traffic, after Setup, you can continue creating zones, moving servers between zones, and renaming zones. For design considerations for zones, including whether to create zones for small groups of remote servers, see the topics Designing a XenApp Deployment.

When you create a server farm and whenever a new server joins a zone, a server is elected as the data collector for that zone. If the data collector for the zone becomes unavailable, a new data collector is elected for the zone based on a simple ranking of servers in the zone.

Important: A primary domain controller or backup domain controller must not become the data collector for a zone. This situation may arise if XenApp is installed on Windows domain controllers. Do not install XenApp on a domain controller. Citrix does not support installing XenApp on a domain controller.
  1. From the Delivery Services Console, select the farm.
  2. Expand the server node and select Zones to view the existing zones for the farm.

To create new zones

  1. To create or modify zones, on the Actions menu, under Zones, click New to open the wizard. Follow the instructions to name the zone, select servers.
  2. On the Set server's election preferences page, click Edit and select the ranking for the server by choosing from the following election options:
    • Most Preferred. The server is always the first choice to become the data collector. It is recommended that only one server per zone be given this setting.
    • Preferred. When electing a new data collector, XenApp elects the next collector from the Preferred servers if the Most Preferred server is not available.
    • Default Preference. The default setting for all servers. The next collector is selected from the Default servers if neither a Most Preferred server nor a Preferred server is available.
    • Not Preferred. Apply this setting to servers that you do not want to become the data collector for the zone. This setting means that this server becomes the data collector only when no servers are available with any of the other three settings (Most Preferred, Preferred, Default Preference).
  3. Restart the servers to apply the changes.

Zones are listed in the middle pane according to their election preference.

Also from the Actions pane, select the Set server's zone membership option to move the selected server to another zone, or select the Change server's zone membership option to move the selected server to another zone.