Adjusting XenApp/ XenDesktop Machine Agent Configuration in Large Citrix Environment

Adjusting XenApp/ XenDesktop Machine Agent Configuration in Large Citrix Environment

book

Article ID: CTX219486

calendar_today

Updated On:

Description

If you are using Citrix SCOM MPs and plan to monitor VDI performance (machine and/or session) in your XenApp/XenDesktop environment, this article will assist you to configure SCOM XAXD Machine Agent service, which is used for VDI performance data collection. 

Background

In large Citrix environments, Citrix MPXAXD Machine Agent might not be able to collect all VDI performance data, using default configuration.

This issue usually happens when too short VDI data collection period and/or too short data collection cycle are configured, causing VDI session to times out, or, due to large number of VDIs, not all VDIs are processed within default sampling interval (5 minutes).

A missing VDI performance data can be identified in SCOM by:

  • Running VDI related reports and observing gaps in presented data
    User-added image

  • Executing Check Requirements and Configuration for Citrix MPXAXD Machine Agent task and having high number of Check failed VDIs in the Citrix MP Machine Agent - Runtime section
    User-added image

Fine-tuning MPXAXD Machine Agent Configuration

When a MPXAXD Machine Agent is installed, a new sub-key, HKEY_LOCAL_MACHINE\SOFTWARE\Comtrade\XenDesktop MP Machine Agent, containing various application settings is added to the Windows Registry.

User-added image

Beside the default settings, there is a set of user-invisible registry values (refer to the image above), which can be used to improve MPXAXD Machine Agent data collection performance with one of the following optimizations:

  • Modify VDI connection timeout period

  • Increase data collection interval

  • Adjust number of threads collecting performance data

  • Narrow the set of collected performance data

Modify VDI connection timeout period

Citrix MPXAXD Machine Agent uses WinRM protocol to create a session to connect to VDI and collect performance data. WinRM session timeout period is set to 10 seconds by default and it might not be long enough to collect required performance data. In order to increase timeout interval create WinRMSessionTimeout registry value (REG_DWORD) under HKEY_LOCAL_MACHINE\SOFTWARE\Comtrade\XenDesktop MP Machine Agent and set new data (e.g. 30) for maximum time interval to collect single VDI data sample, in seconds.

Note: In order to apply new settings, restart Citrix MPXAXD Machine Agent service.

In case that a value for SamplingInterval is changed, the following SCOM workflows, responsible for storing VDI data into SCOM DW (Data Warehouse), must override their IntervalSeconds parameter to match new data collection interval, i.e. 600:

  • Publish Session Performance (x) (Performance DW) (where 1 < x < 12)
  • Publish Server OS Machine Performance (x) (Performance DW) (where 1 < x < 3)

Note: All instances of above rules must be either enabled or disabled.

Adjust number of threads collecting performance data

The main reason for changing a number of threads is to utilize all CPU cores and reduce the time needed for VDI data collection. Since a thread creation is expensive operation, there must be a high number of VDIs (1000+) to be contacted and collected data from (a lot of I/O operations), in order to overcome the initial cost of creating the threads.

To increase the parallelism there are two registry values under HKEY_LOCAL_MACHINE\SOFTWARE\Comtrade\XenDesktop MP Machine Agent that can be adjusted to achieve the best performances:

  • DiscoveryThreadsMin  - represents the number of requests to the thread pool that can be active concurrently. All requests above that number remain queued until thread pool threads become available.
  • DiscoveryThreadsMax – is the maximum number of asynchronous I/O threads in the thread pool.

DiscoveryThreadsMin and DiscoveryThreadsMax are REG_DWORDs with default values set to 32.

Narrow the set of collected performance data

A VDI performance data collection consists of three phases, each of which can be excluded to reduce the amount of collected data (lowers resource consumption) and satisfy customers VDI monitoring needs. These phases are:

  • Machine monitoring – collect performance data from Server OS machines
  • Server sessions – collect Server OS session performance data
  • Desktop sessions – collect Desktop OS session performance data
In order to narrow the scope of VDI data collection, the MonitorType registry data value (REG_DWORD) should be set under HKEY_LOCAL_MACHINE\SOFTWARE\Comtrade\XenDesktop MP Machine Agent to any of the following basic options
  • 0 – collects all performance data
  • 1 – collects only machine monitoring data
  • 2 – collects only Server OS session data
  • 4 – collects only Desktop OS session data

or as a combination of them (bitmask), for example:
 
3 (11) --> & 2 (01 & 10– Server OS machines and Server OS sessions are monitored)
 
5 (101) --> 1 & 4 (01 & 100 – Server OS machines and Desktop OS sessions are monitored)
 
Note: VDI performance monitoring offers insight into the VDI health of the XenApp/XenDesktop environment, impact of VDI configuration changes, performance and capacity trends and it can help you determine future environment capacity requirements.

Environment

Caution! Using Registry Editor incorrectly can cause serious problems that might 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.

Issue/Introduction

Adjusting XenApp/ XenDesktop Machine Agent Configuration in Large Citrix Environment.

Additional Information

Citrix SCOM Management Pack for XenApp and XenDesktop User Guide