Microsoft FSLogix VHDX Compaction on Citrix Virtual Apps and Desktops


With the Microsoft FSlogix Release 2210 (2.9.8361.52326) a long awaited Feature called VHDX Disk Compaction has arrived.

At a enterprise customer with approximately 22,000 Citrix users and a combination of Citrix User Profile Manager and FSLogix Office Container during the M365 implementation starting with Word, Excel, PowerPoint, OneNote and Teams in Citrix. Microsoft Outlook is scheduled for rollout later this year.

The FSlogix Office containers are split across 4 different locations based on regions across a single CVAD image with 900 Citrix servers.

LocationNumber of Office Containers

On every Weekend we are running the shrink script from Jim Moyle, but mostly the script doesn’t finished all Containers over the weekend and in addition not all containers can be shrinked, so the efficency was not the best at the end.

With the new FSLogix Compaction Feature we disable the scheduled Task and automate the reporting to see how FSLogix will help us to save storage. Lets Go !!

Every day we get a report several times by mail in the Automate Teams channel from the storage, grab it with Powershell and create one Confluence report per month for it.

In January I install the new FSLogix Version and starting from 23.01.23 the FSLogix VHDX Disk Compaction Feature at User Logoff is enabled. Partially enabled on 50 EMEA Servers on 18.01.23. A picture will tell you more than thousand of words, see below

If you look at the data below, the Powershell script captures the number of containers and calculates the average. For this cache location, the customer saves 20 TB (42 TB to 22 TB) and the average reduces it from 3.2 at peak to 1.79 GiB/VDHX.

A month later we don’t see any high spikes more a flat line

Below you will find an overview of the the saved space across all 4 storage locations.

Cache LocationNumber of Containers 01.01.2023Storage Usage 01.01.2023 (GiB)Average 01.01.2023 (GiB/VDHX)Number of Containers 06.02.2023 Storage Usage 06.02.2023 (GiB)Average 06.02.2023 (GiB/VDHX)


In the evenings during logoff times, the logoff times are between 9 and 30 seconds for the user to shrink the disk at that time. I also ran a load test with 20 users on a single CVAD server and logged everyone off at the same time, which did not interfere with any other session. Storage IOps increased from 2000-2500 to 2500-3000 IOps at this time, storage uses ReFS as filesystem. This feature greatly helps your environment save space. | | Founder Base Image Script Framework (BIS-F) | IT-Architect EUC | Automation Enthusiast

8 thoughts on “Microsoft FSLogix VHDX Compaction on Citrix Virtual Apps and Desktops”
  • Hi Matthias,
    sounds great!!
    Did you experience any of the bugs reported here:
    I struggled with a bug in build 52326 causes Office activation data and User credentials not be stored in build 52326.
    Roll back to build 50326 solved this, but no disk compaction with this build. 🙁

    February 7, 2023 at 20:34
    • Hi Roy, I know that bugs. it happens with Profile Container. In this environment we have a combination of UPM with Office Containers, currently not affected.

      February 8, 2023 at 01:30
  • Roland van der Kruk says:

    Hi Matthias, do you keep those 4 locations synced? With cloud cache locations?

    February 7, 2023 at 22:17
    • Hi Roland, the storage is a NetApp HA Cluster, no CloudCache in place.

      February 8, 2023 at 01:32
  • Matthew Hurley says:

    Hi Matthias,

    Our FSLogix cache is running on a deduplicated disk and we are not using any compression techniques. We have around 400 users. We are yet to install the latest version of FSLogix. I’m interested to know how it effects dedup. Will it break the dedup causing us to use more diskspace than we are currently using?

    February 8, 2023 at 08:26
    • Hello Matthew,

      same here, NetApp uses deduplication too. But I don’t see any impact on this, shrink the disk will give the reclaimed space from the vdhx back to the native storage and have no impact for the deduplication efficiency

      February 8, 2023 at 10:01
  • A feature that should have been included basically since day one. Took MS way too long and that release is full of bugs. Let’s hope they can fix those in a near future.
    Good to know that the feature is at least working and helping.

    February 10, 2023 at 23:29
    • Hi Thomas, yes it’s a shame, tons of heavy bugs and missing QA. Beta testing from the customer

      February 11, 2023 at 07:56
Leave A Comment

CAPTCHA ImageChange Image