Reducing Disk Space Usage

One of the main problems with Windows Vista (and earlier versions) is that Windows consumes quite a lot of diskspace, with few means to trim down the installation. To make matters worse, Windows tends to accumulate a lot of megabytes and even gigabytes of space during its lifetime, leaving users at a loss as to how to reclaim this lost space. In a post on the Engineering 7 weblog, Microsoft program manager of the core OS deployment feature team (…) Michael Beck explains what Microsoft is doing in order to reduce the disk footprint of Windows 7.

Not too long ago, disk space was pretty much a non-issue to many people. Hard drives have become insanely large lately, as well as insanely cheap. When you have 1TB of disk space, it is rather insignificant if Windows takes up 8GB or 7GB. However, as of late, small solid state drives have come onto the scene, especially in netbooks like the Aspire One, the Asus Eee, and others. They usually come in sizes of 4 or 8GB, which is certainly not enough to fit a Vista installation – and with no way to trim the OS pre-installation, there’s little you can do (not that you’d want Vista on those cheap SSDs with crappy controller chips, anyway).

Let’s talk about the %systemroot%winsxs directory first. On my main Vista desktop machine, this directory appears to be eating a whopping 8GB of disk space – and this installation is only a few months old! This directory, new to Windows Vista, is the subject of many discussions on disk space, but as Beck explains, it needn’t be. This directory doesn’t actually contain a lot of data at all, only about 400MB.

The Windows SxS directory represents the “installation and servicing state” of all system components. But in reality it doesn’t actually consume as much disk space as it appears when using the built-in tools (DIR and Explorer) to measure disk space used. The fact that we make it tricky for you to know how much space is actually consumed in a directory is definitely a fair point!

In practice, nearly every file in the WinSxS directory is a “hard link” to the physical files elsewhere on the system – meaning that the files are not actually in this directory. For instance in the WinSxS there might be a file called advapi32.dll that takes up >700K, however what’s being reported is a hard link to the actual file that lives in the WindowsSystem32, and it will be counted twice (or more) when simply looking at the individual directories from Windows Explorer.

This is done for servicing and imaging reasons. “The value of this is that the servicing platform (the tools that deliver patches and service packs) in Windows can query the WinSxS directory to determine a number of key details about the state of the system, like what’s installed, what versions, and what updates are on the system to help determine applicability of Windows patches to your specific system,” Beck explains, “This functionality gives us increased servicing reliability and performance, and supports future engineering efforts providing additional system layering and great configurability.” The directory also helps in making Vista ‘image aware’, important for administrators who wish to deploy and manage many installations (a system doesn’t have to be running to have its winsxs directory probed, or patches applied to it).

Beck explains that much of the disk space in Vista goes to reliability, security, and recovery features, such as system restore, hibernation, page file, registry back up, and logging. In Windows 7, users will have more (and easier) control over how much disk space these systems may use. They also promise to allow you to set these parameters ahead of time, and that Windows itself will also be more sensible about the default settings.

Another pressing issue is that Windows consumes more and more disk space as time goes by. “For many, the ‘growth’ over time of the installation proves to be the most perplexing,” Beck admits, “And we hear that and need to do better to (a) make smarter choices and (b) make it clearer what space is being consumed and can be reclaimed.” To give you an idea of which components eat what amount of disk space, Beck made a table that covers all of the disk space consumed by a fresh Windows Vista SP1 Ultimate installation.

In conclusion, as we develop Windows 7 it’s likely that the system footprint will be smaller than Windows Vista with the engineering efforts across the team which should allow for greater flexibility in system designs by PC manufacturers. We will do so with more attention to defaults, more control available to OEMs, end-users and IT pros, and will do so without compromising the reliability and robustness of Windows overall.

My Windows Vista directory alone nears the 14GB (6 if you didn’t count the winsxs directory), so I’m hoping Windows 7 will indeed be less hard drive intensive. By the way, if you want to know more about Windows’ use of virtual memory, NT guru Mark Russinovich has an in-depth post on the subject.

34 Comments

  1. 2008-11-22 7:49 pm
    • 2008-11-22 7:56 pm
      • 2008-11-22 8:06 pm
        • 2008-11-22 8:25 pm
    • 2008-11-24 4:24 pm
  2. 2008-11-22 8:42 pm
    • 2008-11-22 9:53 pm
      • 2008-11-24 9:53 pm
  3. 2008-11-23 2:34 am
    • 2008-11-23 8:19 pm
      • 2008-11-23 8:49 pm
      • 2008-11-24 10:39 am
  4. 2008-11-23 4:27 am
    • 2008-11-23 6:51 am
    • 2008-11-23 6:52 am
      • 2008-11-23 5:13 pm
  5. 2008-11-23 9:10 am
    • 2008-11-23 2:36 pm
    • 2008-11-24 4:25 pm
      • 2008-11-24 4:46 pm
        • 2008-11-24 8:09 pm
          • 2008-11-24 8:32 pm
          • 2008-11-24 8:41 pm
          • 2008-11-24 9:10 pm
          • 2008-11-24 9:26 pm
          • 2008-11-24 9:53 pm
          • 2008-11-24 10:52 pm
          • 2008-11-25 12:33 am
  6. 2008-11-23 4:55 pm
    • 2008-11-25 6:39 pm
      • 2008-11-25 6:49 pm
        • 2008-11-25 7:05 pm
  7. 2008-11-24 2:31 pm
    • 2008-11-24 3:12 pm