Вы находитесь на странице: 1из 41

Understanding ICA Bandwidth

Usage in your Environment


Simon Frost
Product Architect
Citrix Systems

Agenda
What is ICA?
How Much Bandwidth do you need
Monitoring
Tuning

2007 Citrix Systems, Inc. All rights reserved

What is ICA?
Independent Computing Architecture
A Protocol that supports the remoting of
Application Screens from a Server to a Client

Basic Protocol very simple


Contains Virtual Channels for specific services
Both essential: e.g. Graphics (thinwire)
& optional: e.g. Twain Scanner redirection

Modules negotiated at Connection handshake time


2007 Citrix Systems, Inc. All rights reserved

The ICA Stack


Virtual Drivers

Winstation
Driver

Protocol Driver

Transport Driver

2007 Citrix Systems, Inc. All rights reserved

The WinStation Driver


Winstation Driver

Data
Silos

P
R
I
0

P
R
I
1

P
R
I
2

P
R
I
3

ICA Protocol
Bandwidth Management

Not All Virtual Channels


Use General Compression

Compression

2007 Citrix Systems, Inc. All rights reserved

Bandwidth Requirements

How much Bandwidth will ICA use?


Gigabit

appl . . gdi(txt-9,bmp) . VCbulk

It Depends
wpm . compr . bw

GSM

2007 Citrix Systems, Inc. All rights reserved

Bandwidth Factors
Application Mix

Graphics Done by applications


Bitmaps / Lines / Text
Redundant Redraws
Other VC traffic required
Client Drive / Clipboard / Printing /

User behaviour
Compression
Encryption

2007 Citrix Systems, Inc. All rights reserved

Use of the network


If the network is fat enough

And theres no competing traffic


And no restrictions
ICA will use more
bandwidth

vs.
2007 Citrix Systems, Inc. All rights reserved

Bandwidth Calculation
Well, throughput actually
Calculated opportunistically
Whenever sufficient data volume is available
ICA does not introduce extra traffic for bandwidth measurement

Calculations are used to schedule data


transmission

2007 Citrix Systems, Inc. All rights reserved

10

Monitoring

Monitoring Tools
Network Level tracing
NetMon / Ethereal / WireShark etc
Spot the Priority headers in ICA packets

ICA counters
SMC data

2007 Citrix Systems, Inc. All rights reserved

12

Perfmon Counters

2007 Citrix Systems, Inc. All rights reserved

13

Session Management & Control (SMC)


Exposes instrumentation from within the
WinStation driver
For the whole Session
For each Virtual Channel

Can also be used to apply limits to bandwidth


usage

Used to implement the limits in policy


Console Sample part of Presentation Server SDK
Youll probably have to build it tho
2007 Citrix Systems, Inc. All rights reserved

14

SMC API Console Sample

2007 Citrix Systems, Inc. All rights reserved

15

SMC API Console Sample

2007 Citrix Systems, Inc. All rights reserved

16

Tuning

Graphics
Thinwire uses many packing & caching tricks to
limit bandwidth used

Redundant updates discarded


Any image that appears photographic is JPEG
encoded

Level of lossy compression controllable by policy


Graphics channel auto tunes by bandwidth
< 640 kbps heavyweight
640 2.4 Mbps medium
> 2.4 Mbps off
2007 Citrix Systems, Inc. All rights reserved

18

CPS 4.5 Graphics


Improved handling of apps that do large numbers
of small graphics operations

Progressive Display mode for complex graphics


applications
CAD
DTP etc

Show a degraded image whilst moving


Snap to full fidelity when still
Off by default as requires greater server resource
Configure by Policy

2007 Citrix Systems, Inc. All rights reserved

19

Lossy Compression
BMP 344K
JPG 100% - 60K
Low Comp. 90% - 26K
Medium Comp. 60% - 13K
High Comp. 30% - 9K

Very High Comp. 13% - 6K


Ultra High Comp. 7% - 5K

2007 Citrix Systems, Inc. All rights reserved

20

SpeedScreen Policy

Lossy Compression also applicable to TWAIN


2007 Citrix Systems, Inc. All rights reserved

21

Multimedia
Full motion video is inefficient to render via GDI

Original Compressed form expanded & displayed


ICA Encoded for Transmission
Largely overwritten
Video Codecs take advantage of frame lossyness

SpeedScreen Multimedia Acceleration

Transmits encoded video form through Virtual Channel


Displayed using client video engine
Windows only
Tuning for buffering available
See Advanced Concepts Guide

2007 Citrix Systems, Inc. All rights reserved

22

Project Apollo
Support for 3D Graphics forms

WPF, Vista Aero, DirectX etc


Adaptable technology that takes advantage of GPUs as available
Impressive results already
Work from here on improving performance & bandwidth
requirements

Bitmap Remoting Tech Preview out now


Download from MyCitrix

Also work on Flash, Audio Codecs & other


multimedia aspects

2007 Citrix Systems, Inc. All rights reserved

23

Printing
Choice of Print Drivers can make a huge difference
in bandwidth requirements

Universal Printer Driver (UPD 3) is designed to


reduce bandwidth used
EMF form is highly compressible
Custom channel compression
In User Mode allowing bigger compression buffers

Delaware switches to XPS


Even more compressible & flexible

2007 Citrix Systems, Inc. All rights reserved

24

Client Drives

Async Writes
Performance Tweak rather than Bandwidth effect

Server told that writes completed immediately

Any failures raised later


Use with care
Only where operation can be retried

2007 Citrix Systems, Inc. All rights reserved

25

Session Limits
Set limits on the amount of bandwidth a session
can use
Or a specific Virtual Channel
eg Printing!

All functionality will be maintained


Some delay, especially in bulk transfer VC, can result

Limits via
Policy See Session Limits tab of Bandwidth Policies
SMC API

2007 Citrix Systems, Inc. All rights reserved

26

Bandwidth-Related Policies
Asstd bandwidthrelated policies

2007 Citrix Systems, Inc. All rights reserved

Policy filters
Dont forget the IP filter

27

SMC - IMetaFrameVirtualChannel2
Properties

Get Total outbound data


ULONG BytesSent

Get Total inbound data


ULONG BytesReceived

Get / Set Bandwidth cap in kilo-bits/second


ULONG BandwidthCapVirtual channel priority

Get / Set VC Priority Level


Priority(MetaFrameVCPriorityLevel)
2007 Citrix Systems, Inc. All rights reserved

28

Compression
Compression is on by default
Check for Compression setting in config
Note 1, On, Yes all mean enabled!

Consider Maximum Compression setting


Uses more memory for compression history
Enable via MaximumCompression setting

External Compression engines currently require all


built in compression & encryption to be disabled

2007 Citrix Systems, Inc. All rights reserved

29

Eliminate unwanted virtual channels


Speeds up login time
Tune via ICA config or by Policies
Config entries are of the form
CDMAllowed
CPMAllowed

Client Drive mapping VC


Client Printer Mapping VC

Channels are on by default, set to Off to disable

2007 Citrix Systems, Inc. All rights reserved

30

Where to apply client side tuning?


ICA tuning can be applied in:
PN client AppSrv.ini
ICA Version 10 (Win32)
Now in registry
HKLM\Software\ICA Client\Engine\Configuration

WI template.ica file
Prior to 4.0: Create new website per variant
4.0: use bandwidth selection template files

2007 Citrix Systems, Inc. All rights reserved

31

WI Bandwidth Selection

Template Files in WI site conf


directory:
Bandwidth_high.ica
Bandwidth_medium_high.ica

Bandwidth_medium.ica
Bandwidth_low.ica

2007 Citrix Systems, Inc. All rights reserved

32

Small Packets

Server -> Client


Intermittent Keepalives etc
Well compressed graphics

Client -> Server

Keyboard & Mouse


Enable Queue Mouse Movements & Keystrokes
-orTweak MouseTimer & KeyboardTimer params
Defaults to 0
Queue Input or Bandwidth Low
MouseTimer 100ms
KeyboardTimer 50ms

2007 Citrix Systems, Inc. All rights reserved

33

Network Tuning

TCP window size


CPS install changes TCP windows size to 63KB
Maximum throughput for bulk transfer channels

For unreliable networks, this may be too high


Aim for Bandwidth Delay Product
KB per sec * mSec delay

Check TCP Window Size in Registry


HKLM\SYSTEM\CCS\Services\Tcpip\Parameters\TcpWindowSize

2007 Citrix Systems, Inc. All rights reserved

35

Make best use of the Network


OutBufs

Server

Client

2007 Citrix Systems, Inc. All rights reserved

36

What values for Outbufs?


Outbuf Count * Outbuf Len TCP Window Size
Client -> Server (OutBufCountClient2) and
Server -> Client (OutBufCountHost2) can be
different
e.g. ADSL, Satellite, wWAN etc

The size of the Outbuf (OutBufLength2) can be


critical for performance & reliability on some
networks
wWAN (e.g. GPRS)

This is a Maximum size for outbufs so net effect


will depend on activity
Tune to near MTU (min 270, max 1460)
2007 Citrix Systems, Inc. All rights reserved

37

High Latency Connections


Reduce Perceived Latency with Local Echo
Turn on SpeedScreen Latency Reduction
ZLKeyboardMode

ZLMouseMode

Values here: 0 disabled, 1 Enabled, 2 auto.


May need to tune for connection using SpeedScreen Latency
Reduction Manager

High Latency Threshold (default 500ms)


Some apps may need configuration
2007 Citrix Systems, Inc. All rights reserved

39

ICA Latency Counter


Another opportunistic counter
Can be inaccurate
More accurate in CPS 4.5 & 10 client but still a
guideline

Can be made much more accurate by configuring


ActiveLatencyPeriodInSeconds in registry
(CTX103610)

At the moment, Active Latency calculations are


blocked if session reliability is in use
2007 Citrix Systems, Inc. All rights reserved

40

Conclusion

ICA attempts to give the best experience given


The detected network connection
The settings applied

It doesnt attempt to minimise bandwidth


but it can happily operate on restricted bandwidth
by virtue of detected network condictions
or by settings applied
How much bandwidth

DEPENDS!
2007 Citrix Systems, Inc. All rights reserved

41

Вам также может понравиться