Posts RSS Comments RSS 287 Posts and 66 Comments till now

WinSxS, Disk Space and Windows 7

A very hot topic among Vista user is the seemingly robust size of the WinSxS directory and it’s ability to grow with apparently no limit.  While most users are not too overly concerned with disk space and have GBs to burn, the majority (myself included) still like to keep the footprint of the operating system as small as possible.  I have posted on the topic a couple times before:

I came across an interesting post today by Michael Beck on the Engineering Windows 7 blog about Disk Space.  As I began to read the post I realized that this was by far the best explanation of the WinSxS directory to date.  I encourage anyone and everyone who is interested in understanding the WinSxS directory in Vista to give this post a thorough read through.  You may just change your mind about moving or deleting the WinSxS directory.  A couple interesting tidbits to wet your appetite:

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…

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.

The WinSxS directory also enables offline servicing, and makes Windows Vista “safe for imaging”.

While it’s true that WinSxS does consume some disk space by simply existing, and there are a number of metadata files, folders, manifests, and catalogs in it, it’s significantly smaller than reported. The actual amount of storage consumed varies, but on a typical system it is about 400MB.

Click here to read the post…

Print This Post

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading ... Loading ...
23,274 views

14 Responses to “WinSxS, Disk Space and Windows 7”

  1. on 04 Jan 2009 at 12:53 amMathew Snyder

    Ok, so what do we do about the fact that this directory “appears” to consume multiple GB of space causing our system to see the disk drive as being full when in reality it isn’t?

  2. on 05 Jan 2009 at 9:59 amMatt

    That my friend, is the million dollar question that no one seems to be able to answer with much authority. I’m keeping my ears open for any new information on this subject and will pass it along as soon as it becomes available.

  3. on 06 Jan 2009 at 1:38 pmChris Bering

    Hi Matt,

    Winsxs in Vista takes up much more than 400MB.
    This is due to the 8,10,16 or more different backup versions of each of thousands of files kept in winsxs.
    Just the backups of Vista’s sample media files (those one deletes from the public folder) takes up more than 200MB in winsxs.

    For instance, read this thread:
    http://social.technet.microsoft.com/Forums/en-US/itprovistaannouncements/thread/9411dbaa-69ac-43a1-8915-749670cec8c3/#page:9

    It’s me that have written WinsxsLite.bat, and it’s GBs, not MBs, one can remove from winsxs.

    Best regards,
    Chris Bering

  4. on 20 Apr 2009 at 10:48 amAnonymous

    We only need a utility to calculate the actual size of WinSxS which skips/doesn’t recalculate/take into account hard links. Anyone?

  5. on 24 Apr 2009 at 5:43 amSimon

    As I understand it each file in the winsxs folder should be unique within that fold BUT will have a link count > 1 – the other link using this should be somewhere in program files, or the main windows hierarchy.

    if you ask for a file size sum of either of these areas separately you will end up counting the sizes twice.

    Possible problems for space I can see is there you have files in winsxs with a link count of 1 – this means other the original has been removed without cleaning up winsxs, or the original is on a different volume and its created a copy rather than a hard link. Or there was never an original and something is directly referencing winsxs which means there is no way you can know if a file is safe to clean up.

    I’ve been looking at the APIs and it should not be too difficult to write a tool that recurses through the file system and keeps a track or which files are hardlinked to which (you can get a link count plus the file ID from the file info struct) – if I get round to writing it I’ll post it somewhere.

    I’m still more than tempted to backup older versions elsewhere, and turn the older versions into hard links to the latest version unless there are major version number changes in the library – though this risks breaking software when dll APIs change.

  6. on 28 May 2009 at 2:19 pmOmer

    I’ll read the whole blog again in detail. But I am sorry I can not buy this argument that these are not actually stored and only reported incorrectly. My WinSxS folder has grown over 10GBs and I believe it has nearly similar footprint on disk because I am running low on space and analyzed all other contents of this partition.

    Given the argument in this article IF somehow it miscalculates disk space used by WinSxS then this should be true
    summing up the size of all folders n files in my C:\ + free disk space should be greater than the total disk size. This matches exactly as my partition size hence making it hard for me to digest what’s written by the Microsoft blogger.

  7. on 29 May 2009 at 4:16 pmzaw

    Mine is at 23Gigs!! over 1 year of install and have a tons for programs installed and removed from time to time.

    I think that directory is just result of LAZY Coders working at Microsoft!!

  8. on 29 May 2009 at 4:19 pmMatt

    Good grief.

  9. on 02 Jun 2009 at 10:13 pmJD

    ya i just installed windows vista x64 ultimate YESTERDAY onto a 20gb partition on my laptop, other partition is 93gb or so, anyways, i ran windows update yesterday, of course there was about 93 of em, so whatever i installed them, and now my winsxs folder is at 14gb and ive got around 200mb freespace, vista blows lol, imma try windows 7 again, i have on here in the past and didnt have this problem, mainly since i didnt install 93 updates on 7 but oh well, i think 7 ran better then this vista ultimate ive got now

  10. on 05 Jul 2009 at 12:59 amtinyauhang

    my winsxs folder is 13gb! and i hv got 1gb freespace left, sad~

  11. [...] with that was that Windows 7 requires 16GB free hard disk space to upgrade. It seems it’s a common problem. Unfortunately, there doesn’t seem to be an easy solution besides uninstalling apps. [...]

  12. on 26 Dec 2009 at 2:38 pmsonoyuu

    I have been working with Vista since early beta, and (unfortunately) most of the systems in my company network are Vista Ultimate, though the networks of my clients are mostly XP Pro/SBS 2003. After paying for Vista Ultimate licenses it was quite aggravating to learn of this irritating and limiting problem associated with the Winsxs folder.

    Let me be blunt, when I learned Windows 7 also has this system limitation I was finally convinced I need to migrate away from Microsoft and start implementing more Linux systems in my infrastructure.

    This folder which can range from a few gigs to 16+ GB may seem innocuous enough to those with 5400 RPM or 7200 RPM HDD that are 100+ GB, but when you have 37GB 10,000 RPM HDD in most of your systems it can create serious problems when you don’t expect such a large foot print for the OS. What makes matters worse is that when you uninstall applications, the DLL “copies” are kept in the winsxs folder, they are NOT removed.

    Even if you are creative; managing to create junctions/symbolic links and move the winsxs folder to another drive (not a task for the faint of heart) you will find that you can no longer install windows updates as you will generate error 80070011 because Microsoft will not install updates into a folder junction.

    Unfortunately, I see Windows 7 as being a slightly less buggy Vista with some changed/added features, yet is still full of flaws. On the other hand, the Linux methodology is becoming more polished and user friendly despite its limited market share. The reality is that the majority of my client networks will remain XP Pro as long as XP Pro remains available.

    Microsoft’s current line up is more geared towards the high school/college aged social networker than it is towards business and productivity. From my view, Vista and Windows 7 are moving too far away from what computers do in the workplace and too much towards what people do in their personal lives. Employers realize this which is why I think Linux will replace many XP systems when XP is no longer available for licensing.

  13. on 25 Jan 2010 at 7:49 pmpbb

    I have found one very useful application to display linked files: Link Shell Extension (http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html). It will show information about hardlinks, symbolic links and junctions.

    A quick scan of my relatively clean Windows 7 Ultimate 64-bit install, shows around 600MB of “orphaned” files (that is, files that don’t also exist in other folders) in the WinSxS folder, out of 5,5GB reported. This means around 5GB of the files in WinSxS is actually hardlinks to files in other locations in the Windows folder.

    This makes more or less sense, since my total Windows directory tree reports 11GB. That is close to 5GB “real” Windows files, plus 5GB hardlinks in WinSxS, plus 0.6GB orphaned files in WinSxS.

    If you turn this calculation around, you can make an educated guess about how much waste your WinSxS folder really is:
    1. Check the reported size of your Windows folder with all subfolders.
    2. Substract the reported size of the WinSxS folder with all subfolders.
    3. The remainder is all orphaned files in WinSxS plus all files in the Windows folder that don’t have a hardlink in WinSxS.

  14. on 25 Jan 2010 at 8:05 pmpbb

    Sorry, that calculation was total nonsense… Time for me to go to bed ;-)

    But using the Link Shell Extension, you can see how many of the files are not hardlinks…

Trackback this post | Feed on Comments to this post

Leave a Reply

You must be logged in to post a comment.