SRV 308 Terminal Server Performance Tuning Methodologies and

  • Slides: 45
Download presentation
SRV 308 Terminal Server Performance: Tuning, Methodologies and Windows Server 2003 x 64 Impact

SRV 308 Terminal Server Performance: Tuning, Methodologies and Windows Server 2003 x 64 Impact Amit Pawar Technology Specialist Microsoft Australia

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture Critical considerations for x 64 systems Evaluating scalability for Terminal Server Performance Tuning What new in 2003 Service Pack 1 Terminal Services Road Map

Session Goals Benefits of Microsoft Windows Server 2003 x 64 Editions in Terminal Server

Session Goals Benefits of Microsoft Windows Server 2003 x 64 Editions in Terminal Server deployments Better understanding of how the performance numbers were derived Tips and tricks for performance tuning Vision for terminal services

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture Critical considerations for x 64 systems Evaluating scalability for Terminal Server Performance Tuning What new in 2003 Service Pack 1 Terminal Services Road Map

32 -Bit Windows Memory Layout and Usage 4 GB (2^32) address space 2 GB

32 -Bit Windows Memory Layout and Usage 4 GB (2^32) address space 2 GB kernel mode (KM) virtual address space Shared across processes 2 GB user mode virtual address (VA) space System PTEs (~900 MB) Kernel VA (2 GB) System Cache (~500 MB) Each process has it’s own Non Paged Pool, images, etc. Kernel VA includes System Page Table Entry (PTE) area – KM thread stacks ~900 MB Paged Pool – page tables, kernel objects ~270 MB System Cache – file cache, registry ~500 MB Others (Non Paged Pool, images) Paged Pool (~270 MB) User VA (2 GB) Process N

32 -Bit Windows Constraints Session count limitations Knowledge Worker (KW) Scenario – maximum 270

32 -Bit Windows Constraints Session count limitations Knowledge Worker (KW) Scenario – maximum 270 sessions Paged Pool/System PTEs exhaustion Highest consumption – thread kernel stacks Large amounts of physical memory use significant Kernel VA for system data structures Performance implications Cache performance degrade – Due to high paged pool usage Special hardware configurations further reduces amount of KM VA available Roughly 2 bytes of VA is lost for each byte of hot-swap memory

Performance Summary X 64 Eliminates Virtual Memory limitations in 32 -bit Up to 43%

Performance Summary X 64 Eliminates Virtual Memory limitations in 32 -bit Up to 43% improvement in users/server on comparable hardware Largest benefit will be with 4 P servers in limited virtual kernel memory scenarios Disk I/O need to be considered on large Terminal Servers 4 Processor expected ‘sweet spot’ for TS Terminal Server Performance Comparison *Performance Comparisons are Entirely Dependent on Scenario* Windows Server 2003 x 64 4 Dual Core Proc Windows Server 2003 x 64 4 Proc Windows Server 2003 x 86 4 Proc Windows Server 2000 x 86 bit 4 Proc Your Mileage WILL Vary ▼ 56% ►◄ ▲ 43% WS 2003 32 Bit Baseline ▲ 125% Knowledge Worker

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture Critical considerations for x 64 systems Evaluating scalability for Terminal Server Performance Tuning What new in 2003 Service Pack 1 Terminal Services Road Map

x 64 Windows Advantages Very large Kernel VA space 8 TB Kernel virtual address

x 64 Windows Advantages Very large Kernel VA space 8 TB Kernel virtual address space (128 GB paged pool, 128 GB system PTEs) High theoretical number of sessions supported Test results show that a 4 P x 64 dualcore system can go as high as 600 KW sessions Little penalty for large RAM Data structures used to manage RAM now have little impact

Comparing 32 -bit and 64 -bit

Comparing 32 -bit and 64 -bit

Considerations for x 64 TS Deployments CPU and Cache CPU usage is a common

Considerations for x 64 TS Deployments CPU and Cache CPU usage is a common limiting factor Most Terminal Server desktop applications are 32 -bit – Wo. W 64 on 64 -bit Windows Server x 64 is more of a translation layer – very efficient If system is CPU limited when using 32 -bit Windows, it will be limited to slightly lower values on x 64 Windows CPU cache hit ratio drops slightly Larger 64 bit data structures → less fit in cache For AMD Opteron 875 2. 2 GHz, 2 MB L 2 -cache 99% hit ratio with 32 -bit OS 98% hit ratio with 64 -bit OS

Considerations for x 64 TS Deployments Memory and I/O Memory consumption increase Data structures

Considerations for x 64 TS Deployments Memory and I/O Memory consumption increase Data structures are larger on x 64 Pointers are 2 x larger for example System File Cache requires more memory for performance similar to 32 -bit Windows Higher number of sessions raises pressure on disk I/O subsystem Many concurrent file operations High paging rate High performance storage is a necessity

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture Critical considerations for x 64 systems Evaluating scalability for Terminal Server Performance Tuning What new in 2003 Service Pack 1 Terminal Services Road Map

Evaluating Terminal Server Scalability Test bed Hardware infrastructure for simulating TS deployment User simulation

Evaluating Terminal Server Scalability Test bed Hardware infrastructure for simulating TS deployment User simulation tools Tools that simulate user interaction with TS Server based on specific scenarios Ideally they do not interfere with server activity Tools are included in Windows 2000 Resource Kit with updates on http: //www. reskit. com Set of criteria for determining acceptable load Perceived system responsiveness is the key indicator Other typical metrics: CPU usage, paging rate, I/O activity, network usage

Test Setup Configuration Domain Controller executes key infrastructure services (Active Directory, DNS, Dynamic Host

Test Setup Configuration Domain Controller executes key infrastructure services (Active Directory, DNS, Dynamic Host Configuration Protocol {DHCP}) and hosts the test controller (roboserver) Application Server hosts services required by test scenario (Exchange, Internet Information Server {IIS}) Test Server Clients run controller agent (roboclient) and execute scripts that drive session interaction Everything runs on an isolated local network to avoid network traffic interferences Domain Controller Clients Application Server (Exchange/IIS)

Scenario Emulation Tools Drive TS client to simulate user activity Based on Visual Basic

Scenario Emulation Tools Drive TS client to simulate user activity Based on Visual Basic Script with some TS specific extensions Send. Key Wait. For. Text Sample: … '// #measure "save as" dialog pop-up time Canary. Log_Record "Excel- Save As dialog", "Key. Press", "a", "Saveastype", 3000 '// #measure "file overwrite" dialog pop-up time TClient. Send. Text(FILE("MSExcel. Spr")) Canary. Log_Record "Excel- overwrite popup", "VKey. Press", VK_RETURN, "Doyouwanttoreplace", 3000 TClient. Send. Text("y") WScript. Sleep(6000) …

Scenario Emulation Tools …Where Canary. Log_Record looks like: sub Canary. Log_Record(Label, Key. Code, Key.

Scenario Emulation Tools …Where Canary. Log_Record looks like: sub Canary. Log_Record(Label, Key. Code, Key. Char, Wait. Text, Sleep. Time) Canary. Log_New. Label(Label) if Key. Code = "Key. Alt" Then Wait. Time = TClient. Press. Key. And. Wait(asc(Key. Char), Alt. Flag, Wait. Text) elseif Key. Code = "Key. Ctrl" Then Wait. Time = TClient. Press. Key. And. Wait(asc(Key. Char), Ctrl. Flag, Wait. Text) … end if WScript. Sleep. Time Canary. Log_Finish. Label. With. Time(Wait. Time) end sub

Response Time Analysis Sample output from a test client … Excel- Chart dialog -

Response Time Analysis Sample output from a test client … Excel- Chart dialog - Step 4, smc 003, 12: 01: 24, 22 Excel- Save As dialog, smc 003, 12: 01: 49, 149 Excel- overwrite pop-up, smc 003, 12: 04, 20 Excel- Close Menu, smc 003, 12: 02: 10, 12 Excel- File Open menu, smc 003, 12: 02: 39, 11 Excel- File Open dialog, smc 003, 12: 02: 44, 142 Excel- Print dialog, smc 003, 12: 03: 06, 28 Excel- File close menu, smc 003, 12: 03: 16, 11 Excel- Save changes dialog, smc 003, 12: 03: 20, 47 Outlook- Open New Menu, smc 003, 12: 03: 34, 10 Outlook- Open Mail Message Menu, smc 003, 12: 03: 35, 8, 8 Outlook- Open Mail editor, smc 003, 12: 03: 36, 141 IE- File open menu, smc 003, 12: 07: 27, 26 IE- File open dialog, smc 003, 12: 07: 29, 34 …

Response Time Analysis C r i ti c a l reg i o n

Response Time Analysis C r i ti c a l reg i o n le p m a S t r a h C

Terminal Server Load Simulation Caveats Real-life deployments should plan for more conservative load levels

Terminal Server Load Simulation Caveats Real-life deployments should plan for more conservative load levels Small scenario changes may trigger significant changes in CPU usage The nature of the application influences greatly CPU/memory usage patterns A lot of deployments focus on in-house applications Interpreter based applications tend to have dramatically higher CPU/memory usage Different criteria used to determine acceptable load

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture Critical considerations for x 64 systems Evaluating scalability for Terminal Server Performance Tuning What new in 2003 Service Pack 1 Terminal Services Road Map

Key Tuning Metrics CPU >75% usage Q length>1 sustained Process Identify spinning or leaking

Key Tuning Metrics CPU >75% usage Q length>1 sustained Process Identify spinning or leaking process Private Bytes or Handle Count growing Memory Page Faults/s >10000 Available memory <10 Mb Disk Q Length >1 sustained Paged Pool, Non-Paged limits

Key Tuning Metrics (Cont. ) Physical Disk Q Length > 1 Thrashing due to

Key Tuning Metrics (Cont. ) Physical Disk Q Length > 1 Thrashing due to paging, fragmentation Redirector (on Terminal Server) current commands>20 Server Work Queues (on File Server) Available Work. Items <10 Resources dynamically allocated Workitems < Max. Work. Items Connections created asynchronously

On-the-Wire Performance Tuning 1. Simulate a typical user session. 2. Measure bandwidth usage using

On-the-Wire Performance Tuning 1. Simulate a typical user session. 2. Measure bandwidth usage using Net. Mon with “LAN Settings” enabled. 3. Selectively disable desktop experience options and measure results. 4. Set for all users via registry (next slide).

On-the-Wire Performance Tuning: Behind-the-Scenes Menu and Window Animation …SoftwareMicrosoftWindowsCurrent. Version ExplorerAdvancedTaskbar. Animations 0 …Control

On-the-Wire Performance Tuning: Behind-the-Scenes Menu and Window Animation …SoftwareMicrosoftWindowsCurrent. Version ExplorerAdvancedTaskbar. Animations 0 …Control PanelDesktopUser. Preferences. Mask Clear the following bits: • Menu Animation (Bit 1) • Combo Box Animation (Bit 2) • List Box Smooth Scrolling (Bit 3) • Menu Fade (Bit 9) • Tool Tip Animation (Bit 11) • Tool Tip Fade (Bit 12) Desktop Background …Control PanelDesktopWallpaper “” Themes …SoftwareMicrosoftWindowsCurrent. Version Theme. ManagerTheme. Active "0" Show contents of window while dragging …Control PanelDesktopDrag. Full. Windows "0"

Scaling Considerations Office – background spell and grammar checking Typing Speed of Users Application

Scaling Considerations Office – background spell and grammar checking Typing Speed of Users Application with Kernel mode drivers like Virus scanners, intrusion detection, spyware scanners. Local applications on desktop if possible

Don’t forget these: Windows System Resource Manager Helps smooth performance for users. Manages CPU

Don’t forget these: Windows System Resource Manager Helps smooth performance for users. Manages CPU to ensure that no one process can monopolize CPU usage. Available on both Standard & Enterprise Server. Application Compatibility Toolkit Designed for both XP and Server Can be used to mitigate many common TS issues: Programs that write to the same common file or registry location for every user. Can be used to get applications that worked on NT 4 TSE working on 2003 without relaxing security Corporate Error Reporting It can be hard to know what errors users are experiencing on TS. CER allows redirection of user and system errors to a location for analysis. New toolkit leverages SQL Security Configuration Wizard Disable services that may not be required for Terminal Services Minimise attack surface of the Terminal Services server

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture

Session Outline Terminal Server and 32 -bit architecture Benefits of x 64 -bit architecture Critical considerations for x 64 systems Evaluating scalability for Terminal Server Performance Tuning What new in 2003 Service Pack 1 Terminal Services Road Map

Windows Server 2003 SP 1 Terminal Services Additions Improved Printer Support Mitigation for Licensing

Windows Server 2003 SP 1 Terminal Services Additions Improved Printer Support Mitigation for Licensing Issues RDP-SSL Support Ability to start a program on connection

TS Fallback Printer Driver Terminal Services Fallback Printer Driver Heuristic that does name matching

TS Fallback Printer Driver Terminal Services Fallback Printer Driver Heuristic that does name matching on printer driver strings provided from TS client Will do a best guess and then substitute for a lowest common denominator PCL or PS driver PCL - "HP Desk. Jet 500“ Color PCL - "HP Desk. Jet 500 C“ PS - "HP Laser. Jet 4/4 M PS" Color PS - "HP Color Laser. Jet 5/5 M PS" Controlled via Group Policy

TS Fallback Printer Driver

TS Fallback Printer Driver

SP 1 Mitigations for Licensing Issues Upgrade Advisor Changes Warns if there is no

SP 1 Mitigations for Licensing Issues Upgrade Advisor Changes Warns if there is no TS License Server Setup wizard forces licensing decision to be made between device & user Stops installer just clicking next Raises awareness Setup wizard prompts for license server name Can be used in scenarios where License Server discovery is problematic Balloon Prompts When licensing communication issues occur Licensing Wizard Improvements Reminds users about setting the TS License Mode

SSL-Based Server Authentication & Encryption Industry standard encryption and authentication Server and client side

SSL-Based Server Authentication & Encryption Industry standard encryption and authentication Server and client side change Must use 2003 SP 1 client Client use of SSL may be enforced NB – This is NOT HTTPS tunneling

Setting Up RDP SSL Authentication & Encryption

Setting Up RDP SSL Authentication & Encryption

Automatic program start on Connection Group Policy Setting Forces the Terminal Server to start

Automatic program start on Connection Group Policy Setting Forces the Terminal Server to start specific applications Cannot be overridden by user Typical usage will be to start a LOB applications or Internet Explorer

TS Product Roadmap Update

TS Product Roadmap Update

Terminal Server Strategic Direction Provide a rich platform for ISVs to extend Provide a

Terminal Server Strategic Direction Provide a rich platform for ISVs to extend Provide a baseline solution for specific scenarios Remote Access LOB Application Deployment Branch Office Connectivity Tight integration with client OS to provide a more seamless user experience Leverage and Integrate with existing Microsoft application delivery and management tools and technologies

Longhorn Server TS Design Goals Improve basic out-of-box solution Better entry-level solution for TS

Longhorn Server TS Design Goals Improve basic out-of-box solution Better entry-level solution for TS customers to enabled baseline scenarios and solutions Targeted at less complex deployments Seamless User Experience VPN-less access Remote Access LOB Application Deployment Branch Office Connectivity Provide improved platform Platform functionality for ISVs to extend User Experience Manageability Need for 3 rd party software is not diminished in LH TS

Terminal Server MOM Pack Management Pack for Windows Server 2003 Terminal Server Monitors key

Terminal Server MOM Pack Management Pack for Windows Server 2003 Terminal Server Monitors key services and events Terminal Server, Session Directory and TS License Server Alerts administrators about adverse changes in the system Two releases MOM 2000: Currently Available: 1/10/2005 Requires MOM 2000 SP 1 MOM 2005: Released 4/4/2005!

Community Resources Technical Communities: www. microsoft. com/communities/products/default. mspx Non-Microsoft Community Sites: www. microsoft. com/communities/related/default.

Community Resources Technical Communities: www. microsoft. com/communities/products/default. mspx Non-Microsoft Community Sites: www. microsoft. com/communities/related/default. mspx Microsoft Public Newsgroups: www. microsoft. com/communities/newsgroups/default. mspx Technical Chats and Webcasts: www. microsoft. com/communities/chats/default. mspx www. microsoft. com/webcasts Microsoft Blogs: www. microsoft. com/communities/blogs

Additional Resources Whitepapers: http: //www. microsoft. com/windowsserver 2003/techinfo/overview /tsscaling. mspx Windows Server 2003 Resource

Additional Resources Whitepapers: http: //www. microsoft. com/windowsserver 2003/techinfo/overview /tsscaling. mspx Windows Server 2003 Resource Kit Tools – Ts. Scaling. exe: http: //www. microsoft. com/downloads/details. aspx? Family. ID=9 d 467 a 69 -57 ff-4 ae 7 -96 ee-b 18 c 4790 cffd&displaylang=en

We invite you to participate in our online evaluation on Comm. Net, accessible Friday

We invite you to participate in our online evaluation on Comm. Net, accessible Friday only If you choose to complete the evaluation online, there is no need to complete the paper evaluation

© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only.

© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.