Slow Response or Keyboard Lag when in a XenApp Session

Slow Response or Keyboard Lag when in a XenApp Session

book

Article ID: CTX125882

calendar_today

Updated On:

Description

You experience slow response or keyboard lag when in a XenApp session. Often the issue is blamed on network latency, XenApp load, or a general XenApp issue. However the issue might be related to a hardware configuration issue or an operating system issue.

In some cases, users might experience 5 to 30 seconds of keyboard lag, where user types or send commands from the keyboard or mouse are not displayed until 5 to 30 seconds later on the screen. The issue is often intermittent and cannot be reproduced consistently.

This behavior is often blamed on network latency; however users on a local area network with no network latency can experience the keyboard lag.

The problem might occur on minimal or fully loaded XenApp servers. Whether there is one person logged on or there are one hundred people logged onto a XenApp server, the keyboard lag might occur.

To determine if keyboard lag is caused by a hardware configuration issue or related to the operating system, verify the following items.
  1. Start a Remote Desktop Protocol session to the XenApp server in question; you will experience the same keyboard lag experience. This eliminates the ICA protocol as the issue as well as XenApp being the issue.

  2. Open Performance Monitor and monitor the network, you will observe gaps in the performance monitor data collection graphs.

    User-added image
  1. Monitor the following counters in performance monitor:
    • Physical Disk (instance)\%Idle Time – This measures the percent time that your hard disk is idle. Typically if this monitor falls below 20 percent, then it means that your read/write requests are queuing up and your hard disk cannot service requests in a timely matter.

    • Average Disk/Sec Write – This measures the time in seconds it takes to write data to the disk. Typically this should not be greater than 20 milliseconds for non cached writes with little or no spikes. For Average Disk/Sec Write cached writes only, the measure should not be greater than 4 milliseconds with little or no spikes.

    Resolution

    Use the following steps to reduce or eliminate the keyboard lag, a combination or all of the solutions below can remedy the issue:
    1. For Microsoft Windows 2003 servers, determine if Enable advanced performance is enabled. By enabling write cache, this might improve disk performance to reduce delays or lags. Refer to Microsoft KB Article http://support.microsoft.com/default.aspx?scid=kb;EN-US;324446.
    2. Relocate the local profile directory (Documents and Settings or Users directory) to another disk. The operating system might be contending with the local profile data for read and write access to the disk. Refer to Microsoft KB Article http://support.microsoft.com/kb/214653.

    3. Some servers might be configured with only one hard drive dedicated to running the Operating System in the case of blade systems. For these scenarios, you might consider reconfiguring the Operating System to run on a RAID-0 or RAID-1 system allowing for potentially faster disk I/Os. Additionally, having a RAID system with a caching system also improves disk performance.

    4. Consider a hardware upgrade, replacing the hard drives with faster performance hard drives to reduce read and write contention between the operating system and local user profiles.
    5. For blade systems, consider moving the operating system to a Storage Area Network (SAN). Moving the operating system to a high performance disk subsystem can consequently improve server performance.


    Issue/Introduction

    This article conatins information to reduce or eliminate the keyboard lag in a XenApp session.