Microsoft took a serious look at how to save space from the operating system files with Windows 8.1 Update. What they came up with at the time was WIMBoot, which used the recovery partition’s compressed WIM image file as the basis for most of the system files needed by Windows. Since the recovery partition is at least 4 GB in size, this is a pretty substantial savings especially on the lower cost devices which WIMBoot was targeted at.

I’ve discussed the changes with Windows 10 a couple of times, but a recent blog post from Michael Niehaus outlines how the new system works, what it is called, and how to manually enable it.

The last bit there is pretty important, since moving to WIMBoot was not something that could be done easily. It had to be done at the time the system image was put onto the computer, and there were a couple of extra steps OEMs could take in order to incorporate their own software into the WIMBoot.

Standard Partition with Windows 8.1

WIMBoot Enabled Windows 8.1

This also lead to some of the first issues with WIMBoot. The actual size of the recovery partition, if it was just Windows, would be around 4 GB, but once an OEM adds in their own software, along with maybe a copy of Microsoft Office, and all of a sudden the recovery partition could bloat to 10 GB or more. This was a major issue because unlike with a standard install of Windows, the recovery partition can not be removed on a WIMBoot system leaving a large chunk of a possibly small drive used up with no way to reclaim that space.

The other issue was that over time the WIMBoot partition would become less and less used, since when there were security updates to the operating system, key system files would be replaced with a full uncompressed version, but the original version would still be part of the WIM which could not be modified. Over time, Windows would grow and grow to fill more and more of the drive, and the WIMBoot concept was clearly not working out as intended.

So with Windows 10, Microsoft has moved away from the recovery partition altogether. When you do a system reset, Windows will be rebuilt from the components in the \Windows\winsxs folder. This means that the system will also be almost fully patched after a reset, unlike with earlier versions of Windows where any restore off of the recovery partition would revert you back to whatever set of files was used to create the WIM. Only the most recent 30 days of patches will be installed, and this was a design decision in case the reset itself is due to something going wrong within the last 30 days.

The other part of the space savings is from a compression tool Microsoft is calling Compact OS. This kind of goes back to WIMBoot in a way, since the system files are compressed into what amounts to a WIM file. The big difference here is that unlike WIMBoot, CompactOS can be enabled and disabled on the fly.

From an administrative command prompt, simply use the commands:

Compact.exe /CompactOS:query

This will query Windows to see if CompactOS is enabled or not

Compact.exe /CompactOS:always

This will enable CompactOS

Compact.exe /CompactOS:never

This will disable CompactOS

I ran CompactOS on an ASUS TP200S which has 64 GB of eMMC storage. Windows 10 did not enable CompactOS automatically since it was not needed, but manually enabling it saved over 3 GB of space on the C: drive. Luckily ASUS has included enough storage in the TP200S where it’s not really necessary out of the box, but on any system with 32 GB or less this could be a big help.

There is going to be a performance impact of course since the files will need to be decompressed when accessed and the actual differences are something I hope to have a chance to test and document at some point in the not too distant future.

In the end, CompactOS looks to be a nice upgrade over WIMBoot which had a lot of promise, but was not as effective as hoped.

Source: TechNet

Comments Locked


View All Comments

  • inighthawki - Sunday, October 4, 2015 - link

    When your page file is disabled and you approach your physical memory commit limit, Windows will tell you you're low on memory. That is an indicator to the user to close some stuff before that happens, and is also a hint to go buy more memory if you need it. A page file will instead just slow down your system, quite drastically. Cue the typical "my computer is running slower than when I bought it" montage.

    Also with 8GB+ as your standard amount of memory on new PCs this day, your average user almost never exceeds this amount.
  • DanNeely - Sunday, October 4, 2015 - link

    None of my W7/8/8.1 computers have ever given a notice about running out of system ram and having to swap. If you have a fixed size pagefile turned on there is (I assume, last saw it on XP) a notification (confirmation?) box shown before expanding it if it's almost full; this did not appear on the pagefileless W7 box when it was killing apps left and right (if relevant I probably wouldn't have had the rights needed to turn the page file on myself).

    And swap usage will not necessarily slow your computer down severely; a single app and the OS kernel's short term working sets exceeding total system ram will thrash the system into unusability; If you have multiple apps running and they only exceed it collectively you can go over it by a moderate amount (10-25% in my personal experience) before the impact becomes significant. The old towers in my lab at work were suddenly usable again when the swapfile was turned on and they could go to 2.2-2.5 of 2gb of ram used; at the upper end of the range tabbing between apps was maybe a second or two slower than after we scavenged enough DDR2 to get them to 4gb. The same is true of a tablet/netbook running W8 with 2gb of ram; although since the only major app it's running most of the time is a browser it does hit the wall it bit faster/harder. My work laptop doesn't noticeably slow down until I get to about 9.5GB used with 8GB of ram, and it's not until the rare instances where I get to somewhere between 10 and 11gb that the swap becomes more of an issue than having to repeatedly close and reopen several applications to keep memory pressure down. My old personal desktop was able to get to 15/12gb used before it started affecting the general system performance; although the approach to it was probably partially screened by only getting that high when I had multiple 32bit browsers at >3gb each and slowing down due to what I assume was severe heap fragmentation because it happens even when there's plenty of physical ram available and a reload all tabs restart drops its use down to around 1gb.

    Lastly, with ram increasingly soldered on and the cheap computers that your local boxmart sells at 10:1 to the higher end systems we generally use having less than 8gb no swap file and dieing apps (in which case their computer isn't "slow", it's "broken" and the race to the bottom PoS they buy to replace it won't be any better) will be a much worse user experience than if the swap was turned on.

    BB's top 15 windows laptops sorted by best selling include 3 with 2Gb of ram, 4 with 4gb, 4 with 6gb, 3 with 8 gb, and 1 with 16gb. The 6gb tier is relatively new; I didn't see anything with that much a year ago when a family member was in the market for a new laptop I and 4gb was ubiquitous; making the share of computers out there with 8gb or more much smaller and it's not hard to go above 4gb if you're a person who keeps a lot of tabs open at one time in a browser. 2gb is even worse, depending on what I'm doing my low end laptop tops out at 5-10 tabs open if I want it to run reasonably well; and even there the 1st gen atom cpu cores are pushing it to end of life status faster than I'd hoped.
  • Bob Todd - Saturday, October 3, 2015 - link

    Yes, I'm sure some anonymous fool on the internet knows more about how Windows handles virtual memory than someone like Mark Russinovich.
  • Gigaplex - Sunday, October 4, 2015 - link

  • zodiacfml - Saturday, October 3, 2015 - link

    Wow, thanks. I didn't know about this as I thought the Compact OS should be done during image creation or during the Windows Upgrade process and I didn't see any documentation for this command.

    I have read somewhere that this OS compression is no different from file compression that this command might even include various levels of compression depending on the system.
  • Wolfpup - Tuesday, October 6, 2015 - link

    Wow, GREAT article! This is something Microsoft should themselves have written and posted somewhere! Really interesting about WIM...sounds like if anything it actually ends up wasting MORE space over time. Really interesting about this compact mode!

    Considering there are a lot of lower end systems/tablets with just 32GB, this could be a huge help, and I'd never heard of it. Should start out with more storage than 8, and then if its not already on, can get more still.
  • aj654987 - Thursday, October 8, 2015 - link

    whenever i buy a new PC/laptop with windows preinstalled, the first thing I do before even starting it up is put in an Acronis usb boot drive and back up an image to an external HD. Then I always have a factory reset available and also if I decide to sell the computer, just wipe the HD and load the original image back on it.

Log in

Don't have an account? Sign up now