Performance Guidance for Application Virtualization 5.0
Gäller för: Application Virtualization 5.0, Application Virtualization 5.0 SP1, Application Virtualization 5.0 SP2, Application Virtualization 5.0 SP3
Learn how to configure App-V 5.0 for optimal performance, optimize virtual app packages, and provide a better user experience with RDS and VDI.
Implementing multiple methods can help you improve the end-user experience. However, your environment may not support all methods.
You should read and understand the following information before reading this document.
Anm |
---|
Some terms used in this document may have different meanings depending on external source and context. For more information about terms used in this document followed by an asterisk * review the <token xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">APPV_vernasshort_vnext</token> Performance Guidance Terminology section of this document. |
Finally, this document will provide you with the information to configure the computer running App-V 5.0 client and the environment for optimal performance. Optimize your virtual application packages for performance using the sequencer, and to understand how to use User Experience Virtualization (UE-V) or other user environment management technologies to provide the optimal user experience with App-V 5.0 in both Remote Desktop Services (RDS) and non-persistent virtual desktop infrastructure (VDI).
To help determine what information is relevant to your environment you should review each section’s brief overview and applicability checklist.
App-V 5.0 in stateful* non-persistent deployments
This section provides information about an approach that helps ensure a user will have access to all virtual applications within seconds after logging in. This is achieved by uniquely addressing the often long-running App-V 5.0 publishing refresh. As you will discover the basis of the approach, the fastest publishing refresh, is one that doesn’t have to actually do anything. A number of conditions must be met and steps followed to provide the optimal user experience.
Use the information in the following section for more information:
Usage Scenario - As you review the two scenarios, keep in mind that these are the approach extremes. Based on your usage requirements, you may choose to apply these steps to a subset of users and/or virtual applications packages.
Optimized for Performance – To provide the optimal experience, you can expect the base image to include some of the App-V virtual application package. This and other requirements are discussed.
Optimized for Storage – If you are concerned with the storage impact, following this scenario will help address those concerns.
Preparing your Environment
Steps to Prepare the Base Image – Whether in a non-persistent VDI or RDSH environment, only a few steps must be completed in the base image to enable this approach.
Use UE-V 2.0 as the User Profile Management (UPM) solution for the App-V approach – the cornerstone of this approach is the ability of a UEM solution to persist the contents of just a few registry and file locations. These locations constitute the user integrations*. Be sure to review the specific requirements for the UPM solution.
User Experience Walk-through
Walk-through – This is a step-by-step walk-through of the App-V and UE-V operations and the expectations users should have.
Outcome – This describes the expected results.
Impact to Package Life Cycle
Enhancing the VDI Experience through Performance Optimization Tuning
Applicability Checklist
Deployment Environment
Non-Persistent VDI or RDSH. |
|
User Experience Virtualization (UE-V), other UPM solutions or User Profile Disks (UPD). |
Expected Configuration
User Experience Virtualization (UE-V) with the App-V user state template enabled or User Profile Management (UPM) software. Non-UE-V UPM software must be capable of triggering on Login or Process/Application Start and Logoff. |
|
App-V Shared Content Store (SCS) is configured or can be configured. |
IT Administration
Admin may need to update the VM base image regularly to ensure optimal performance or Admin may need to manage multiple images for different user groups. |
Usage Scenario
As you review the two scenarios, keep in mind that these approach the extremes. Based on your usage requirements, you may choose to apply these steps to a subset of users, virtual application packages, or both.
Optimized for Performance | Optimized for Storage |
---|---|
To provide the most optimal user experience, this approach leverages the capabilities of a UPM solution and requires additional image preparation and can incur some additional image management overhead. The following describes many performance improvements in stateful non-persistent deployments. For more information, see the Sequencing Steps to Optimize Packages for Publishing Performance and reference to App-V 5.0 Sequencing Guide in the See Also section of this document. |
The general expectations of the previous scenario still apply here. However, keep in mind that VM images are typically stored in very costly arrays; a slight alteration has been made to the approach. Do not pre-configure user-targeted virtual application packages in the base image. The impact of this alteration is detailed in the User Experience Walkthrough section of this document. |
Preparing your Environment
The following table displays the required steps to prepare the base image and the UE-V or another UPM solution for the approach.
Prepare the Base Image
Optimized for Performance | Optimized for Storage |
---|---|
|
|
Configurations - For critical App-V Client configurations and for a little more context and how-to, review the following information:
Configuration Setting | What does this do? | How should I use it? |
---|---|---|
Shared Content Store (SCS) Mode
|
When running the shared content store only publishing data is maintained on hard disk; other virtual application assets are maintained in memory (RAM). This helps to conserve local storage and minimize disk I/O per second (IOPS). |
This is recommended when low-latency connections are available between the App-V Client endpoint and the SCS content server, SAN. |
PreserveUserIntegrationsOnLogin
|
If you have not pre-configured (Add-AppvClientPackage) a specific package and this setting is not configured, the App-V Client will de-integrate* the persisted user integrations, then re-integrate*. For every package that meets the above conditions, effectively twice the work will be done during publishing/refresh. |
If you don’t plan to pre-configure every available user package in the base image, use this setting. |
MaxConcurrentPublishingRefresh
|
This setting determines the number of users that can perform a publishing refresh/sync at the same time. The default setting is no limit. |
Limiting the number of concurrent publishing refreshes prevents excessive CPU usage that could impact computer performance. This limit is recommended in an RDS environment, where multiple users can log in to the same computer at the same time and perform a publishing refresh sync. If the concurrent publishing refresh threshold is reached, the time required to publish new applications and make them available to end users after they log in could take an indeterminate amount of time. |
Configure UE-V solution for App-V Approach
We recommend using Microsoft User Experience Virtualization (UE-V) to capture and centralize application settings and Windows operating system settings for a specific user. These settings are then applied to the different computers that are accessed by the user, including desktop computers, laptop computers, and virtual desktop infrastructure (VDI) sessions. UE-V is optimized for RDS and VDI scenarios.
For more information see Getting Started With User Experience Virtualization 2.0
In essence all that is required is to install the UE-V client and download the following Microsoft authored App-V settings template from the Microsoft User Experience Virtualization (UE-V) template gallery. Register the template. For more information around UE-V templates see The UE-V specific resource for acquiring and registering the template.
Anm |
---|
Without performing an additional configuration step, the Microsoft User Environment Virtualization (UE-V) will not be able to synchronize the Start menu shortcuts (.lnk files) on the target computer. The .lnk file type is excluded by default.
UE-V will only support removing the .lnk file type from the exclusion list in the RDS and VDI scenarios, where every user’s device will have the same set of applications installed to the same location and every .lnk file is valid for all the users’ devices. For example, UE-V would not currently support the following 2 scenarios, because the net result will be that the shortcut will be valid on one but not all devices.
|
Viktigt
I det här avsnittet beskrivs hur du ändrar Windows-registret med hjälp av Registereditorn. Om du ändrar Windows-registret på fel sätt kan allvarliga problem uppstå och du kan behöva installera om Windows. Säkerhetskopia alltid registerfilerna (System.dat och User.dat) innan du gör några ändringar i registret. Microsoft kan inte garantera att det går att lösa problem som kan uppstå när du ändrar registret. Ändringar av registret sker på egen risk.
Using the Microsoft Registry Editor (regedit.exe), navigate to HKEY_LOCAL_MACHINE \ Software \ Microsoft \ UEV \ Agent \ Configuration \ ExcludedFileTypes and remove .lnk from the excluded file types.
Configure other User Profile Management (UPM) solution for App-V Approach
The expectation in a stateful environment is that a UPM solution is implemented and can support persistence of user data across sessions and between logins.
The requirements for the UPM solution are as follows.
To enable an optimized login experience, for example the App-V 5.0 approach for the user, the solution must be capable of:
Persisting the below user integrations as part of the user profile/persona.
Triggering a user profile sync on login (or application start), which can guarantee that all user integrations are applied before publishing/refresh begin, or,
Attaching and detaching a user profile disk (UPD) or similar technology that contains the user integrations.
Capturing changes to the locations, which constitute the user integrations, prior to session logoff.
With App-V 5.0 when you add a publishing server (Add-AppvPublishingServer) you can configure synchronization, for example refresh during log on and/or after a specified refresh interval. In both cases a scheduled task is created.
In previous versions of App-V 5.0, both scheduled tasks were configured using a VBScript that would initiate the user and global refresh. With Hotfix Package 4 for Application Virtualization 5.0 SP2 the user refresh on log on is initiated by SyncAppvPublishingServer.exe. This change was introduced to provide UPM solutions a trigger process. This process will delay the publish /refresh to allow the UPM solution to apply the user integrations. It will exit once the publishing/refresh is complete.
User Integrations
Registry – HKEY_CURRENT_USER
Path - Software\Classes
Exclude: Local Settings, ActivatableClasses, AppX*
Path - Software\Microsoft\AppV
Path- Software\Microsoft\Windows\CurrentVersion\App Paths
File Locations
Root – “Environment Variable” APPDATA
Path – Microsoft\AppV\Client\Catalog
Root – “Environment Variable” APPDATA
Path – Microsoft\AppV\Client\Integration
Root – “Environment Variable” APPDATA
Path - Microsoft\Windows\Start Menu\Programs
(To persist all desktop shortcuts, virtual and non-virtual)
Root - “KnownFolder” {B4BFCC3A-DB2C-424C-B029-7FE99A87C641}FileMask - *.lnk
Microsoft User Experience Virtualization (UE-V)
Additionally, we recommend using Microsoft User Experience Virtualization (UE-V) to capture and centralize application settings and Windows operating system settings for a specific user. These settings are then applied to the different computers that are accessed by the user, including desktop computers, laptop computers, and virtual desktop infrastructure (VDI) sessions.
For more information see Getting Started With User Experience Virtualization 1.0 and Sharing Settings Location Templates with the UE-V Template Gallery.
User Experience Walk-through
This following is a step-by-step walk-through of the App-V and UPM operations and the expectations users should expect.
Optimized for Performance | Optimized for Storage |
---|---|
After implementing this approach in the VDI/RDSH environment, on first login,
On subsequent logins:
1 The publishing operation (Publish-AppVClientPackage) adds entries to the user catalog, maps entitlement to the user, identifies the local store, and finishes by completing any integration steps. |
After implementing this approach in the VDI/RDSH environment, on first login,
On subsequent logins:
|
Outcome | Outcome |
---|---|
|
Because the add/refresh must re-configure all the virtual applications to the VM, the publishing refresh time on every login will be extended. |
Impact to Package Life Cycle
Upgrading a package is a crucial aspect of the package lifecycle. To help guarantee users have access to the appropriate upgraded (published) or downgraded (un-published) virtual application packages, it is recommended you update the base image to reflect these changes. To understand why review the following section:
App-V 5.0 SP2 introduced the concept of pending states. In the past,
If an administrator changed entitlements or created a new version of a package (upgraded) and during a publishing/refresh that package was in-use, the un-publish or publish operation, respectively, would fail.
Now, if a package is in-use the operation will be pended. The un-publish and publish-pend operations will be processed on service restart or if another publish or un-publish command is issued. In the latter case, if the virtual application is in-use otherwise, the virtual application will remain in a pending state. For globally published packages, a restart (or service restart) often needed.
In a non-persistent environment, it is unlikely these pended operations will be processed. The pended operations, for example tasks are captured under HKEY_CURRENT_USER \ Software \ Microsoft \ AppV \ Client \ PendingTasks. Although this location is persisted by the UPM solution, if it is not applied to the environment prior to log on, it will not be processed.
Enhancing the VDI Experience through Performance Optimization Tuning
The following section contains lists with information about Microsoft documentation and downloads that may be useful when optimizing your environment for performance.
.NET NGEN Blog and Script (Highly Recommended)
About NGEN technology
Windows Server and Server Roles
Server Performance Tuning Guidelines for
Server Roles
IIS Relevance: App-V Management, Publishing, Reporting Web Services
File Server (SMB) Relevance: If used for App-V Content Storage and Delivery in SCS Mode
Windows Client (Guest OS) Performance Tuning Guidance
Sequencing Steps to Optimize Packages for Publishing Performance
App-V 5.0 and App-V 5.0 SP2 provide significant value in their respective releases. Several features facilitate new scenarios or enabled new customer deployment scenarios. These following features can impact the performance of the publishing and launch operations.
Step | Consideration | Benefits | Tradeoffs |
---|---|---|---|
No Feature Block 1 (FB1, also known as Primary FB) |
No FB1 means the application will launch immediately and stream fault (application requires file, DLL and must pull down over the network) during launch.If there are network limitations, FB1 will:
|
Stream faulting decreases the launch time. |
Virtual application packages with FB1 configured will need to be re-sequenced. |
Removing FB1
Removing FB1 does not require the original application installer. After completing the following steps, it is suggested that you revert the computer running the sequencer to a clean snapshot.
Sequencer UI - Create a New Virtual Application Package.
Complete the sequencing steps up to Customize -> Streaming.
At the Streaming step, do not select Optimize the package for deployment over slow or unreliable network.
If desired, move on to Target OS.
Modify an Existing Virtual Application Package
Complete the sequencing steps up to Streaming.
Do not select Optimize the package for deployment over a slow or unreliable network.
Move to Create Package.
PowerShell - Update an Existing Virtual Application Package.
Open an elevated PowerShell session.
Import-module appvsequencer.
Update-AppvSequencerPackage - AppvPackageFilePath
"C:\Packages\MyPackage.appv" -Installer
"C:\PackageInstall\PackageUpgrade.exe empty.exe" -OutputPath
"C:\UpgradedPackages"
Anm This cmdlet requires an executable (.exe) or batch file (.bat). You must provide an empty (does nothing) executable or batch file.
Step | Considerations | Benefits | Tradeoffs |
---|---|---|---|
No SXS Install at Publish (Pre-Install SxS assemblies) |
Virtual Application packages do not need to be re-sequenced. SxS Assemblies can remain in the virtual application package. |
The SxS Assembly dependencies will not install at publishing time. |
SxS Assembly dependencies must be pre-installed. |
Creating a new virtual application package on the sequencer
If, during sequencer monitoring, an SxS Assembly (such as a VC++ Runtime) is installed as part of an application’s installation, SxS Assembly will be automatically detected and included in the package. The administrator will be notified and will have the option to exclude the SxS Assembly.
Client Side:
When publishing a virtual application package, the App-V 5.0 SP2 Client will detect if a required SxS dependency is already installed. If the dependency is unavailable on the computer and it is included in the package, a traditional Windows Insataller (.msi) installation of the SxS assembly will be initiated. As previously documented, simply install the dependency on the computer running the client to ensure that the Windows Installer (.msi) installation will not occur.
Step | Considerations | Benefits | Tradeoffs |
---|---|---|---|
Selectively Employ Dynamic Configuration files |
The App-V 5.0 client must parse and process these Dynamic Configuration files. Be conscious of size and complexity (script execution, VREG inclusions/exclusions) of the file. Numerous virtual application packages may already have User- or computer–specific dynamic configurations files. |
Publishing times will improve if these files are used selectively or not at all. |
Virtual application packages would need to be reconfigured individually or via the App-V server management console to remove associated Dynamic Configuration files. |
Disabling a Dynamic Configuration using Powershell
For already published packages, you can use
Set-AppVClientPackage –Name Myapp –Path c:\Packages\Apps\MyApp.appv
without-DynamicDeploymentConfiguration parameter
Similarly, when adding new packages using
Add-AppVClientPackage –Path c:\Packages\Apps\MyApp.appv
, do not use the-DynamicDeploymentConfiguration parameter.
For documentation on How to Apply a Dynamic Configuration, see:
How to Apply the User Configuration File by Using PowerShell
How to Apply the Deployment Configuration File by Using PowerShell
Step | Considerations | Benefits | Tradeoffs |
---|---|---|---|
Account for Synchronous Script Execution during Package Lifecycle. |
If script collateral is embedded in the package, Add (Powershell) may be significantly slower. Running of scripts during virtual application launch (StartVirtualEnvironment, StartProcess) and/or Add+Publish will impact the perceived performance during one or more of these lifecycle operations. |
Use of Asynchronous (Non-Blocking) Scripts will ensure that the lifecycle operations complete efficiently. |
This step requires working knowledge of all virtual application packages with embedded script collateral, which have associated dynamic configurations files and which reference and run scripts synchronously. |
Remove Extraneous Virtual Fonts from Package. |
The majority of applications investigated by the App-V product team contained a small number of fonts, typically fewer than 20. |
Virtual Fonts impact publishing refresh performance. |
Desired fonts will need to be enabled/installed natively. For instructions, see Install or uninstall fonts. |
Determining what virtual fonts exist in the package
Make a copy of the package.
Rename Package_copy.appv to Package_copy.zip
Open AppxManifest.xml and locate the following:
<appv:Extension Category="AppV.Fonts">
<appv:Fonts>
<appv:Font Path="[{Fonts}]\private\CalibriL.ttf" DelayLoad="true"></appv:Font>
Anm If there are fonts marked as DelayLoad, those will not impact first launch. </appv:Fonts>
Excluding virtual fonts from the package
Use the dynamic configuration file that best suits the user scope – deployment configuration for all users on computer, user configuration for specific user or users.
- Disable fonts with the deployment or user configuration.
Fonts
-->
<Fonts Enabled="false" />
<!--
App-V 5.0 Performance Guidance Terminology
The following terms are used when describing concepts and actions related to App-V 5.0 performance optimization.
Complexity – Refers to the one or more package characteristics that may impact performance during pre-configure (Add-AppvClientPackage) or integration (Publish-AppvClientPackage). Some example characteristics are: manifest size, number of virtual fonts, number of files.
De-Integrate – Removes the user integrations
Re-Integrate – Applies the user integrations.
Non-Persistent, Pooled – Creates a computer running a virtual environment each time they log in.
Persistent, Personal – A computer running a virtual environment that remains the same for every login.
Stateful - For this document, implies that user integrations are persisted between sessions and a user environment management technology is used in conjunction with non-persistent RDSH or VDI.
Stateless – Represents a scenario when no user state is persisted between sessions.
Trigger – (or Native Action Triggers). UPM uses these types of triggers to initiate monitoring or synchronization operations.
User Experience - In the context of App-V 5.0, the user experience, quantitatively, is the sum of the following parts:
From the point that users initiate a log-in to when they are able to manipulate the desktop.
From the point where the desktop can be interacted with to the point a publishing refresh begins (in PowerShell terms, sync) when using the App-V 5.0 full server infrastructure. In standalone instances, it is when the Add-AppVClientPackage and Publish-AppVClientPackage Powershell commands are initiated.
From start to completion of the publishing refresh. In standalone instances, this is the first to last virtual application published.
From the point where the virtual application is available to launch from a shortcut. Alternatively, it is from the point at which the file type association is registered and will launch a specified virtual application.
User Profile Management – The controlled and structured approach to managing user components associated with the environment. For example, user profiles, preference and policy management, application control and application deployment. You can use scripting or third-party solutions configure the environment as needed.
Got a suggestion for App-V?
Add or vote on suggestions here. For App-V issues, use the App-V TechNet Forum.
Se även
Begrepp
Microsoft Application Virtualization 5 Administrator's Guide
-----
You can learn more about MDOP in the TechNet Library, search for troubleshooting on the TechNet Wiki, or follow us on Facebook or Twitter.
-----