Optimizing Windows 10, Build 2004, for a Virtual Desktop Role
Total Page:16
File Type:pdf, Size:1020Kb
Optimizing Windows 10, Build 2004, for a Virtual Desktop role Written by Robert M. Smith, Program Manager, Azure Global Customer Engineering Date Created: May 12, 2020 Date Updated: July 08, 2020 Date Published: tbd Contributors: Tim Muessig, Senior Premier Field Engineer; Narklis Engler, Principal Program Manager Version 1.2 Document Change History Version Changes 1.0 Adding verbiage for Windows Virtual Desktop, and Windows 10 build 2004 specifically 1.1 Additional updates for 2004 1.2 Final pass, updated group policy, services, tasks, and added info about Storage Sense for disk cleanup. Introduction This article is intended to provide suggestions for configurations for Windows 10, build 2004, for optimal performance in Virtualized Desktop environments, including Virtual Desktop Infrastructure (VDI) and Windows Virtual Desktop (WVD). All settings in this guide are suggested optimization settings only and are in no way requirements. The information in this guide is pertinent to Windows 10, version 2004, operating system (OS) build 19041. The guiding principles to optimize performance of Windows 10 in a virtual desktop environment are to minimize graphic redraws and “effects”, background activities that have no major benefit to the virtual desktop environment, and generally reduce running processes to the bare minimum. A secondary goal is to reduce disk space usage in the base image to the bare minimum. With virtual desktop implementations, the smallest possible base, or “gold” image size, can slightly reduce memory utilization on the host system, as well as a small reduction in overall network operations required to deliver the desktop environment to the consumer. No optimizations should reduce the user experience. Each optimization setting has been carefully reviewed to ensure that there is no appreciable degradation to the user experience. NOTE: The settings in this article can be applied to other Windows 10 installations, such as version 1909, physical devices, or other virtual machines. There are no recommendations in this article that should affect supportability of Windows 10 in a virtual desktop environment. Table of Contents Document Change History ....................................................................................................................................................................................................... 1 Introduction ................................................................................................................................................................................................................................. 1 Virtual Desktop Optimization Principles ..................................................................................................................................................................................... 5 Persistent Virtual Desktop environments ............................................................................................................................................................................... 7 Non-Persistent Virtual Desktop Environments ....................................................................................................................................................................... 8 To Sysprep or not Sysprep ........................................................................................................................................................................................................... 9 Prepare a Windows VHD or VHDX to upload to Azure ....................................................................................................................................................... 9 Supportability ............................................................................................................................................................................................................................ 10 Virtual Desktop Optimization Categories .................................................................................................................................................................................. 10 Universal Windows Platform (UWP) application cleanup ..................................................................................................................................................... 11 Delete the payload of UWP apps ...................................................................................................................................................................................... 12 Windows Optional Features cleanup .................................................................................................................................................................................... 14 Managing Optional Features with PowerShell .................................................................................................................................................................. 14 Enable or Disable Windows Features Using DISM ............................................................................................................................................................ 16 Default User Settings ............................................................................................................................................................................................................. 16 Local policy settings ............................................................................................................................................................................................................... 21 System services ..................................................................................................................................................................................................................... 45 Scheduled tasks ..................................................................................................................................................................................................................... 52 Apply Windows (and other) updates..................................................................................................................................................................................... 54 Servicing OS and apps ........................................................................................................................................................................................................ 54 Windows system startup event traces (AutoLoggers) .......................................................................................................................................................... 55 Windows Defender optimization in the virtual desktop environment ................................................................................................................................. 58 Client network performance tuning by registry settings ...................................................................................................................................................... 58 DisableBandwidthThrottling .............................................................................................................................................................................................. 58 FileInfoCacheEntriesMax ................................................................................................................................................................................................... 58 DirectoryCacheEntriesMax ................................................................................................................................................................................................ 59 FileNotFoundCacheEntriesMax ......................................................................................................................................................................................... 59 DormantFileLimit ............................................................................................................................................................................................................... 59 Additional settings from the Windows Restricted Traffic Limited Functionality Baseline guidance .................................................................................... 60 Disk cleanup (including using the Disk Cleanup Wizard) ....................................................................................................................................................... 61 Prepare and customize a master VHD image ..................................................................................................................................................................... 61 Additional Notes ........................................................................................................................................................................................................................ 63 Re-enable Windows Update .................................................................................................................................................................................................. 63 Reference: ................................................................................................................................................................................................................................