48
1 © 2007 Citrix Systems, Inc. — All rights reserved XenDesktop 5 Master Class – Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available at - http://dl.dropbox.com/u/7694439/XD5-MC.rar Facebook - http://www.facebook.com/pages/XenDesktop/122274557845352 Twitter - http://twitter.com/#!/XenDesktopEMEA

1 2007 Citrix Systems, Inc. All rights reserved XenDesktop 5 Master Class Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

Embed Size (px)

DESCRIPTION

A Quick Review

Citation preview

Page 1: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

1© 2007 Citrix Systems, Inc. — All rights reserved

XenDesktop 5 Master Class – Part 3

AgendaDatabaseScalabilityPowerShell

Complete Slide Deck Available at - http://dl.dropbox.com/u/7694439/XD5-MC.rarFacebook - http://www.facebook.com/pages/XenDesktop/122274557845352

Twitter - http://twitter.com/#!/XenDesktopEMEA

Page 2: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

XenDesktop [email protected] Systems Engineer, EMEA

Page 3: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

A Quick Review

Page 4: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

SQL Server

Machine CreationServices

BrokerServices

InfrastructureServices

High-level Rhone Architecture

XenDesktop Controller

Broker Service

Machine CreationService

AD Identity Service

Machine Identity Service

Host Service

ConfigurationService

Desktop Studio Desktop Director

PowerShell WCF

Virtual Desktop

WinRM(WMI)

NOTE: Greatly Simplified Communication

Page 5: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Supported Databases:• SQL Server 2008, R2, SP1, Express• SQL Server 2005 SP3 (Not Tested /

No Support / EOS April 2011)

• Database Schema• Full Relational Schema• Single Database (for core product)• Multiple SQL ‘Schemas’ in Database

• Broker Config, Broker Session State, Desktop Provisioning, Infrastructure Description, etc

• ‘Schemas’ map to Windows services running on Broker

XD5 Database Overview

SQL Server

Machine CreationServices

BrokerServices

InfrastructureServices

XenDesktop Controller

Broker Service

Machine CreationService

AD Identity Service

Machine Identity Service

Host Service

ConfigurationService

Desktop Studio Desktop Director

PowerShell WCF

Virtual Desktop

WinRM(WMI)

Page 6: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Broker Service instances are stateless as much as possible.• i.e. State is not stored in the Service rather held centrally in the database.

• Broker service database content is split into two schemas• The ‘config’ schema

• Contains configuration data • Does not update frequently

• The ‘state’ schema. • Contains information about the current state of broker elements• Update frequently (and should be volatile)

• Both schemas contain tables and stored procedures.

The Broker and it’s Database

Page 7: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

Worker Endpoints

Worker Registrations

Worker Index

Worker NamesDiagWorker

Workers

Workers

Brokered Sessions Sessions WI Sessions

Desktop Groups

Desktops

Catalogs

Licenses

Configuration Schema:

chb_Config

State Schema:chb_State

SQL Database: Broker Service Schema

Soft Registrations

Page 8: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Machine Creation Service• DesktopUpdateManagerSchema

• AD Identity Service• ADIdentitySchema

• Machine Identity Service• MachinePersonalitySchema

• Configuration service• ConfigurationSchema

• Host service• HostingUnitServiceSchema

Other Schemas…

Page 9: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Sizing depends on several factors• Number of registered VDAs• Number of connected sessions• Connection rate• Number of managed desktops• Number of provisioned desktops with Machine Creation Services

Database sizing depends on…

Page 10: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

•The following data is from the test teams

Database sizing example

Provisioned Desktops Using MCS 5,000 10,000 20,000

Per Worker (KB) 14,500 29,000 58,000

Per Session (KB) 25,500 51,000 102,000

Per Connection (KB) 840 1,680 3,360

Per AD Account (KB) 9,000 18,000 36,000

Per MCS machine (KB) 9,700 19,400 38,800

Approx. Total (MB) 59 117 233

Page 11: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• The transaction log is therecording of all changesperformed against the database

• Recovery model options• Simple – Reclaims log space but

can only recover to the last backup(default option for XD5 database)

• Full – Can recover to any point intime but requires the most disk space

• SQL Mirroring requiresFull Recovery to be enabled

Managing the transaction log

Page 12: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• A VDA with no activity generates approximately 62KB of transaction log data per hour• Number of VDAs X 24 Hours X Approx. 62KB of data• 100 VDAs X 24 Hours X 62KB = 145MB

• Place the log on a separate physical disk• Set the log to a fixed size and backup often

Transaction log examples

Page 13: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Broker is critically dependant on Database• Existing connections not impacted• Creating new connections and reconnecting to desktops impacted

• Database Failure = Broker Failure• Supported Database H/A Options: (expected order)

• SQL Mirror• Virtual Machine H/A• SQL Cluster

Database High-Availability

Page 14: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

H/A Mirror

SQL Mirroring Options

Broker

SQL

Windows

Broker

SQL

Windows

Broker

SQL

Windows

SQL Server On Brokers

Operational Considerations:• No outage window on single DB server failure• SQL Database needs to be backed up• One server can run SQL Express (witness)• Additional brokers would not run SQL• Reduced Server Count

H/A MirrorSQL

Windows

SQL Server Tier

Operational Considerations:• No outage window on single DB server failure• SQL Database needs to be backed up• One server can run Express (SQL witness)• Identical Brokers

SQL

Windows

SQL

Windows

Broker

Windows

Broker

Windows

Page 15: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Virtual Machine H/A (XenServer / VMware HA)• Simpler to configure than Clustering• On host failure, hypervisor platform automatically starts VM on replacement

host• Small outage window as new VM boots• Can use SQL Express

• Operations• Only requires a single SQL Express server VM• Database needs to be backed up• Outage window

Virtual Machine H/A

Page 16: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

Desktop Launch

Page 17: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• A lot is used in the background

• Desktop Viewer• Web Interface• Broker Services• Machine Creation Service• VDA Agent Service• PortICA Protocol Stack• Workstation Agent Service• Machine Identity Agent• FullArmor Policy Engine

How is a desktop launched?

Administration Machine

Desktop Studio

Hypervisor & Storage

VDA

VDA

Workstation Agent

Controller

Controller

IIS

WI Sites Desktop Director Site

Machine Creation ServicesInfrastructure

Services

Broker service

License Server

Database

SDK

CBP (WCF)

Active Directory

Http or PS (via HCL)

WCFXML (http)

LDAP

WCF

WCF

Page 18: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• User logs in to Web Interface.• Web Interface validates login and requests

the desktop via the broker XML service.• Web Interface launches desktop via

XML service.• Broker selects the VM, requests a reset of the DIFF disk (via

MCS) and starts the machine (via an HCL call to the hypervisor)

How is a desktop launched (1) ?

Page 19: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• VM boots, AD machine identity isapplied via the machine identity agent(ID Disk attached to the VM)

• Boot continues, workstation agentservice starts, and the VDA registerswith the broker.

• Machine policies are applied.

How is a desktop launched (2) ?

Page 20: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• The VDA is now registered and can acceptthe ICA connection from the broker serviceto the workstation agent service.

• PortICA starts listening.• Broker passes the desktop address

to Web Interface, Web Interface in turn passes an ICA file to the user’s web browser.

• Browser launches the desktop viewer on the endpoint device

How is a desktop launched (3) ?

Page 21: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• The desktop viewer uses the ICA file toidentify the VM and initiates an ICAconnection via PortICA to the VDA.

• The desktop viewer and PortICA negotiatecapabilities, PortICA calls the workstationagent to validate the connection and obtain user credentials.

How is a desktop launched (4) ?

Page 22: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• The workstation agent passes credentialsto PortICA which creates a new Windowssession.

• PortICA applies user-specific policies. • Desktop interaction with the user via

Desktop Viewer and the ICA connection is now possible.

How is a desktop launched (5) ?

Page 23: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

VDA 5.0

Page 24: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• VDA can now use “Registry based” registration.• Quick Install will pick up the FQDN from the ID Disk• Advanced Install expects the Controller FQDN to be specified

• Port 80 is default registration port• VDA command line options

• FORCEWDDMREMOVE (for physical or VMware)• NOWINRM (for WinXP only)

VDA Installation

Page 25: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Accessed through Desktop Director• Uses MS Remote Assistance

• VDA install turns on Remote Assist by default• Must be enabled via Group Policy

• Client side Flash rendering cannot be shadowed• Uses DCOM – potential firewall issues, browser settings

Shadowing Virtual Desktops

Page 26: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

Overall High Availability

Page 27: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

DatabaseDatabase

Classic HA (Rhone)

Client

Web Interface

Web Interface

NLB

DDC(XML Svc)

DDC(XML Svc)

• Network-level HA

Database

• HA SQL Server• Mirrored• VM HA• Clustered

• Failure = DR Event (see DR slide)

• DDCs are Peers

Page 28: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

Autonomous Mode

VDA

Broker

Switch

Database

Sw

itchCustomer

Process

Client

.ICA File

Registration

Registration Failure:• VDA opens port 1494• Port remains open for max 30 days• When VDA re-registers, broker updated

Emergency Access:• Customer issues .ICA files (specific to user)• VDA address encoded in file

Page 29: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

Scalability– Preliminary Numbers

Page 30: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• PVS scales very nicely• Streamed 5000 desktops from 1 server

• XD4 DDC• Satisfactory• To support 5000 desktops we recommended 3 DDC

instances and separated roles

• Console access – Could be slow

XD 4 Results

Page 31: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

One instance. No role separation.

10,000

XD 5 Controller

Page 32: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Desktop Director• 60-100 console users with great response time• Need more users? Just add more instances!• Max scale per instance = 500 users

• Desktop Studio• 20,000 desktops tested in one desktop group

Consoles

Page 33: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

XD 5 MCS produces about 1.5x more IOPS than PVS

1100 Desktops on XS MCS PVSTotal IOPS 18,000 11,000

Read:Write IOPS ratio 50:50 10:90

Average IOPS per desktop 16 10

MCS can be more demanding

… on XenServer pool master (split into 2 pools vs 1)

… on IOPS (1.5x more)

… on DDC CPU and network (only ~8% more)

Page 34: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Successfully proven that XenDesktop 5 supports at least 2500 MCS desktops.• The size of the deployment was only limited by the amount of hardware available.• The two DDC used in this test were virtualized.• Previous tests have proven that a single XD5 Controller can scale to beyond

10,000 dekstops• XenDesktop 5 will scale well beyond 20,000 desktops.

• Default idle pool spin up of 2500 desktops took 4 hours 16 minutes and consumed ~35% of NetApp CPU.

Initial Results and Conclusions

Page 35: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Creating 2500 desktops took 1h 21 minutes.• Equates to 31 Desktops per minute.• Deleting desktops took 10 minutes longer.• The most resource intensive part of these tasks was on CPU load on the

vSphere server.

• Updating a catalog provisioning scheme is a fast task• took ~3 minutes to update a 20GB image.

Initial Results and Conclusions

Page 36: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

…and that’s about it…

Page 37: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

A Few Helpful Resources

Page 38: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• SQL Express or fully blown SQL?• Quick Deploy assumes everything on a single server. Including SQL Express.• Desktop Deployment allows you to specify the Database.

• Migrate SQL Express database to SQL Server• Use PowerShell to “deconfigure” DB connection• Backup / Restore XD5 database• Use PowerShell to “reconfigure” DB connection• VDA (re-) registration will be happen automatically

Initial Installation and Deployment Choices

Page 39: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Can I Redeploy XenDesktop Without Reinstalling?• Reconfigure the services to not use a database• Drop the database• Restart Desktop Studio• Desktop Studio will start as if you have just installed XenDesktop.

• Should I offload Desktop Director from the active brokers?• Reduces risk of impacting logon times due to high console usage.• A single Desktop Director can handle 250 – 500 “admin” console sessions.

Initial Installation and Deployment Choices

Page 40: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Add a second Controller to XD5 Site• Allows you to test the “interchangeability” of the XD5 architecture.• A single controller can handle in excess of 10,000 desktops.

• SQL Database - Configure Mirroring? • Allows you to measure the impact of XD5 on the database servers.• Mirroring requires Full Recovery model. Do not forget the Transaction Logs.

Choices for HA Production Class PoC’s

Page 41: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• XenDesktop Design Handbook• https://community.citrix.com/kits/#/kit/1067009

• Provisioning Services Anti Virus Best Practices• http://support.citrix.com/article/CTX124185

• Virtual Desktop Resource Allocation• http://community.citrix.com/display/ocb/2010/11/12/Virtual+Desktop+Resource+Allocation

• XD5 POC Quick Start Guide• Screen shot based, step by step guide to a PoC• Covers Quick Deploy, Desktop Deploy• Examples of Desktop Studio, Desktop Director• http://support.citrix.com/article/CTX127594

Resources

Page 42: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Configure a XenDesktop 5 Site to Use an Existing SQL Database• http://support.citrix.com/article/CTX128008

• Move an Existing XenDesktop 5 Database to a New SQL Server• http://support.citrix.com/article/CTX128365

• Configure XenDesktop for SQL Database Mirroring• http://support.citrix.com/article/CTX127359

• Reconfigure a XenDesktop Site to Use a Mirrored Database• http://support.citrix.com/article/CTX127538

• XDDBDiag for XenDesktop• http://support.citrix.com/article/CTX128075

Resources

Page 43: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Redeploy XenDesktop Without Re-Installing• http://support.citrix.com/article/CTX127421

• XenDesktop 5 FAQ• http://support.citrix.com/article/CTX128328

• Use a Specific SQL port with XenDesktop 5• http://support.citrix.com/article/CTX128253

• XenDesktop 5 Database Transaction Log Growing Excessively• http://support.citrix.com/article/CTX126916

• Change the XML Port in XenDesktop 5 • http://support.citrix.com/article/CTX127945

Resources

Page 44: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Planning Guide: XenDesktop 5 Migration• http://knowledgecenter.citrix.com/article/CTX128330

• XenDesktop 4 to XenDesktop 5 Virtual Desktop Agent Conversion Process with Provisioning Server • http://support.citrix.com/article/CTX128174

• XenDesktop Planning Guide: Desktop Image Delivery• http://support.citrix.com/article/CTX128643

• XenDesktop 5 – Master Classes• http://dl.dropbox.com/u/7694439/XD5%20Master%20Class.rar

Resources

Page 46: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• My Citrix• Ask you Citrix contact• Tracking of downloads• URL alias available:

• www.citrix.com/xendesktop/poc• www.citrix.com/xendesktop/quickpoc• www.citrix.com/xendesktop/pockit

XD5 Quick PoC Kit

Page 47: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available

• Get-Command * -CommandType CmdLet | Where {$_.ModuleName -like "Citrix*"}• Shows all PowerShell commands from Citrix

• Get-Command * -CommandType CmdLet | Where {$_.ModuleName -like "Citrix*"} | Measure-Object• Show count of all Citrix cmdlets

PowerShell CmdLets

Page 48: 1  2007 Citrix Systems, Inc.  All rights reserved XenDesktop 5 Master Class  Part 3 Agenda Database Scalability PowerShell Complete Slide Deck Available