Citrix Blogs

Everything you wanted to know about Citrix Optimizer – Part 1

While we we’ve been working hard on the next version of Citrix Optimizer (we just got a bit delayed by a tiny project called Citrix Tech Zone), I was answering some community questions and realized there were topics we’ve never covered publicly.

Well, it’s time to fix that.

We are preparing a deep technical session about Citrix Optimizer at the Citrix Converge 2020 event (more about this awesome news later), and I wanted to answer some questions that come up often.

When should you optimize an image?

This is the winner for the most frequently asked question about Citrix Optimizer. Should you run Optimizer before you install any software on an image? Should you run it before or after VDA installation? Should you run it only when creating a master image, or with each change? How frequently should you run it?

Let’s start by explaining how Citrix Optimizer decides if changes are needed. For each optimization, we start by reading the current state (from the underlying operating system) and the desired state (from the XML template file) and convert these two values to a comparable format. This is usually simple (for example, examining the service start type), but it can get complicated if, for example, registry values that can be defined in different numerical systems or stored as a byte array).

After we have two values that can be compared (making sure we’re comparing apples to apples), Optimizer will compare these two values to decide if optimization is needed or not. If optimization is required (current and desired values are different), change is performed. The Optimizer engine inherited some of my Eastern European mentality and assumes that everything will fail; so instead of assuming the change was successful, it restarts the analysis phase and report the result of it.

Why is this important?

If your system has been optimized before, running Optimizer (even in Execute mode) will not attempt to change anything unless it is necessary. This makes Optimizer safe to run repeatedly, because only required changes are applied. We have seen some cases where updates / other tools reset configuration, so we recommend running Citrix Optimizer when you are making changes to your master image.

Also, we are adding some optimizations that should be executed every time you are sealing an image (for example, .NET pre-compiling or cleaning of event logs). While we offer only a small subset of recommended steps when sealing an image, it’s still beneficial to run these optimizations regularly. For a more complete solution, look at the free community tool Base Image Script Framework (BIS-F). And don’t worry, we aren’t jealous. Citrix Optimizer and BIS-F are best friends and work best when deployed together.

This also helps to answer the question of when to run Citrix Optimizer. We recommend running it before sealing your image for PVS, MCS, or other image management, ideally as part of BIS-F flow. After applying any optimizations, you should restart your master image and let it cool down, because Windows OS performs some operations when the machine is idle. The time required for cool down can differ, so the best method is to look at the machine utilization and seal image when the virtual machine is idle. Personally, I often leave machines running overnight before capturing them as a master image, especially when starting with a fresh image build.

Another related question: What improvements should I expect? This is influenced by many variables, so make sure you measure the impact in YOUR environment. You can find many (independent) benchmarking results. I would like to highlight the great research work from folks at GO-EUC project, especially their breakdown of optimization groups. But be warned — once you start exploring all the great research available there, you will be hooked for hours!

Keep in mind that benchmarks often don’t reflect reality. For example, they are typically based on stateless profiles (no profile solution), so changes to a default user profile can dramatically improve results, while it isn’t so useful in real life.

How do I troubleshoot issues?

Occasionally, we get feedback about Citrix Optimizer breaking some functionality. In most cases, it’s caused by something else (patching, another tool or SCCM package, etc.), but we have an established routine for how to troubleshoot these issues.

Before we get to it, I want to differentiate between “issues with Optimizer” and “issues caused by configuration delivered by Optimizer.” Citrix Optimizer is effectively just a configuration tool. Instead of manually applying optimizations from a 100-page manual, you’re just clicking a button. Troubleshooting isn’t much different. It’s just easier when you are using a tool — you find a way to reproduce an issue, then narrow it down, and find a fix.

Most of optimizations in current templates are based on official RDS/VDI recommendations from Microsoft, and there are no optimizations in our official templates that should affect supportability of the operating system. As a general rule, we don’t add any optimization to Optimizer that is not publicly recommended by Microsoft to make sure our configuration is as stable as possible.

First, before making any changes using Citrix Optimizer, I strongly suggest that you:

I have to think hard to remember the last time that I saw an Optimizer-related issue that was not linked to one of the optional components. Usually, a small subset of these optimizations is applicable or desired in your environment. If you are not sure which ones to apply, leave this section unchecked.

Citrix Optimizer supports rollback mode (currently available through PowerShell only); however it is not supported for all optimizations. For example, it is not possible to restore UWP applications that have been deleted, and the PowerShell code needs to specifically include rollback instructions to work as expected.

When you encounter an issue in your environment and suspect that one of the optimizations configured by Citrix Optimizer has caused it:

  1. Try to use rollback mode. Has it fixed the problem? If not, Optimizer has probably not caused it.
  2. If rollback mode has fixed your problem, try to apply optimizations by group to identify which group of optimizations (services, scheduled tasks etc.) is causing this issue.
  3. After you identify the group, try to narrow down which specific entry is responsible by applying only a subset of optimizations from the affected group.
  4. If you have been able to identify the specific entry causing the issue, contact us using this form. Sharing is caring, even if your case is unique (such as using USB redirect to support DVD writers in Japan). We can at least include a note in the template for others explaining the problem.

When will the template for <insert name> be available?

This is one of the most common questions that I get. I’ve looked in our support system, and the last few tickets were all very similar.

“When will the template for WVD be available?”

“When will you support Windows 10 20H2?”

First, let me talk about support for new Windows builds. We do not release templates until the final build of a Windows OS is available. While it is common for geeks like me to run pre-release builds of Windows (greetings to fellow Windows Insiders), official Citrix templates are only released for a final operating system build. After the final build of an OS is released, we try to release an updated template quickly. This usually takes about a month, and we use most of that time for stability and compatibility testing.

You can find information about current release at Windows 10 release information (currently version 2004) or at ChangeWindows.org (unofficial, but easier to digest). If you are interested in testing a preview version, you can watch for announcements on our #Citrix-Optimizer channel in World of EUC Slack. We usually share new templates for testing in advance.

Also, keep in mind that latest templates are included in Citrix Optimizer only when a new version of the tool is released. This means that in certain situations, a template can be available in the official marketplace for download but not included with your build of Citrix Optimizer. This is currently the case with Windows 10 build (version 2004). An official version is available for download, but it is not pre-packaged in version 2.7.

Fig 1: Windows 10 build 2004 in official marketplace

We have done this on purpose to give us more flexibility with release cycles. Releasing a new template is a fairly simple process (again, most of the time is used for testing), but releasing new binary version of Optimizer is much more complex and involves steps like a security review and multiple approvals. Before contacting us and asking when version XYZ will be available, have a look at marketplace. Maybe it it’s already out there.

Similarly, I often get is people asking for special cases like Windows 10 Enterprise for Virtual Desktops (also known as multi-user Windows 10), Remote Desktop Services, and others. While Citrix Optimizer is flexible enough to support other deployments, it has been developed as a tool to optimize Citrix environments and we don’t do any testing on other platforms. Most optimizations are related to the operating system itself and are not Citrix specific, but it is important to understand the intended use of this tool. You can always look at our community templates marketplace (created by community hero Ryan Butler), where you’ll find find a collection of third party templates from talented folks like David Wilkinson, Dennis Span, John Billekens, Nick Panaccio, and Rob Zylowski.

Fig 2: Looking for something else? Check out the community template marketplace.

And since we’re talking about multi-user Windows, this is based on client OS (Windows 10) rather than server OS and it is almost identical (with the exception of few services and scheduled tasks, mostly related to Microsoft Office being part of the image). This is valid information as of October 2020, but the situation can change, and single-user and multi-user Windows 10 builds can start to differentiate. If that happens in the future, we will reconsider our decision to have a dedicated template for Windows 10 for Virtual Desktops. For right now, simply use the template for regular Windows 10 and if you are using Auto Select mode (and you should), the best template is selected automatically for you.

See you at Citrix Converge 2020!

Speaking of tips, tricks, and custom templates, did you know that we’re going to have a technical session and extended Q&A on Citrix Optimizer at Citrix Converge 2020 event? If you want to support Citrix Optimizer, click this link to register and attend this session. I’m excited to have a very first technical session dedicated to Citrix Optimizer, and I know it’ll be interesting.

If you aren’t familiar with Citrix Converge, it’s the event of the year for admins, engineers and developers working with Citrix technologies. It’s a free virtual conference (did I mention it’s free?) presented by technical experts to help you get the most out of your Citrix technologies. You can read more about it in this blog post and if you have any (Optimizer) topics you would like to see covered, make sure to comment here!

This is first part of a two-part series. In my second blog post, I’ll talk about other optimization tools, how to integrate Optimizer with automation, and building custom templates. Stay tuned and share your comments and questions below!


Citrix Tech Bytes – Created by Citrix Experts, made for Citrix Technologists! Learn from passionate Citrix Experts and gain technical insights into the latest Citrix Technologies.

Click here for more Tech Bytes and subscribe.

Want specific Tech Bytes? Let us know! tech-content-feedback@citrix.com.

Exit mobile version