Application Virtualization, Citrix, Farm, Server, Xenapp

Local Host Cache(LHC) – Backbone of Citrix environment

April 23, 2014

Local Host Cache(LHC) stores subset of data store for XENAPP servers. 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.

The LHC performs two primary functions:

  • Permits a server to function in the absence of a connection to the data store.
  • Improves performance by caching information used by ICA Clients for enumeration and application resolution.

Basically all the LHC information is stored in Access database, Imalhc.mdb, stored, by default, in the <ProgramFiles>\Citrix\Independent Management Architecture folder.

The following information is contained in the local host cache:

  • All servers in the farm, and their basic information.
  • All applications published within the farm and their properties.
  • All Windows network domain trust relationships within the farm.
  • All information specific to itself. (Product code, SNMP settings, licensing information)

The member server queries the farm’s data store for missed changes. The default interval is 30 minutes. Though we can change the default interval by editing a registry:

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

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

The IMA service needs to be restarted in order to make it effective.

Note: Please make registry change carefully as using Registry Editor incorrectly can cause serious problems that can require you to reinstall the operating system.

If the data store is unreachable, the LHC contains enough information about the farm to allow normal operations for an indefinite period of time, if necessary. However, no new static information can be published, or added to the farm, until the farm data store is reachable and operational again.

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 IMA Service is running, but published applications do not appear correctly when users browse for application sets.

You can recreate LHC if you face following issues

  • If the IMA service does not start, the cause may be a corrupt LHC.
  • If you have made extensive changes to the farm data store, such as publishing various applications, adding or removing servers from the farm, or creating new policies.
  • If you must clean the farm data store, using the DSCHECK utility, you should then rebuild the LHC on each of the servers in your farm, once the data store has been cleaned.


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

  1. Stop the IMA service on the XenApp server, if it is started. This can be done using the command: net stop imaservice, or from services.
  1. Run dsmaint recreatelhc, which renames the existing LHC database, creates a new database, and modifies the following registry key HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\Runtime\PSRequired key to 1.
    Setting the value PSRequired to 1 forces the server to establish communication with the data store in order to populate the Local Host Cache database. When the IMA service is restarted, the LHC is recreated with the current data from the data store.
  1. Restart the IMA service. This can be done via the command line, net start imaservice, or from services.

You Might Also Like

No Comments

Leave a Reply