What is the WINSXS directory in Windows 2008 and Windows Vista and why is it so large?

What is the WINSXS directory in Windows 2008 and Windows Vista and why is it so large?

Rate This
  • Comments 74

A commonly asked question among people looking at a Windows Vista or Windows Server 2008 installation is “why is the WinSxS folder so big?!”   To answer that question I need to first describe componentization, and how components are managed in Windows Vista.

One of the largest changes between previous versions of Windows and Windows Vista was a move from an INF described OS to componentization.  A component in Windows is one or more binaries, a catalog file, and an XML file that describes everything about how the files should be installed. From associated registry keys and services to what kind security permissions the files should have.  Components are grouped into logical units, and these units are used to build the different Windows editions.

All of the components in the operating system are found in the WinSxS folder – in fact we call this location the component store.  Each component has a unique name that includes the version, language, and processor architecture that it was built for.  The WinSxS folder is the only location that the component is found on the system, all other instances of the files that you see on the system are “projected” by hard linking from the component store.  Let me repeat that last point – there is only one instance (or full data copy) of each version of each file in the OS, and that instance is located in the WinSxS folder.   So looked at from that perspective, the WinSxS folder is really the entirety of the whole OS, referred to as a "flat" in down-level operating systems.  This also accounts for why you will no longer be prompted for media when running operations such as System File Checker (SFC), or when installing additional features and roles.

That explains why the folder starts off big, but not why it gets larger over time – the answer to that question is servicing.   In previous versions of Windows the atomic unit of servicing was the file, in Windows Vista it’s the component.  When we update a particular binary we release a new version of the whole component, and that new version is stored alongside the original one in the component store.  The higher version of the component is projected onto the system, but the older version in the store isn’t touched.  The reason for that is the third part of why the component store gets so large.

Not every component in the component store is applicable, meaning that not every component should be projected onto the system.  For example, on systems where IIS is available but has not been installed, the IIS components are present in the store, but not projected into any location on the system where they might be used.  If you’re familiar with how multi-branch servicing works in previous versions of Windows then it’ll make sense to you that we have a different version of the component for each distribution branch and service pack level, and that all these different versions are also stored in the WinSxS folder, even if they’re not immediately applicable.  So a single Post SP1 GDR package that contains an update to one component will end up installing four versions of that component in the WinSxS folder – double that on a 64 bit operating system for some components.

Now that you know why the store can grow to be so large, your next question is probably to ask why we don’t remove the older versions of the components.  The short answer to that is reliability.  The component store, along with other information on the system, allows us to determine at any given time what the best version of a component to project is.  That means that if you uninstall a security update we can install the next highest version on the system – we no longer have an “out of order uninstall” problem.  It also means that if you decide to install an optional feature, we don’t just choose the RTM version of the component, we’ll look to see what the highest available version on the system is.  As each component on the system changes state that may in turn trigger changes in other components, and because the relationships between all the components are described on the system we can respond to those requirements in ways that we couldn’t in previous OS versions.

The only way to safely reduce the size of the WinSxS folder is to reduce the set of possible actions that the system can take – the easiest way to do that is to remove the packages that installed the components in the first place.  This can be done by uninstalling superseded versions of packages that are on your system.  Service Pack 1 contains a binary called VSP1CLN.EXE, a tool that will make the Service Pack package permanent (not removable) on your system,  and remove the RTM versions of all superseded components.  This can only be done because by making the Service Pack permanent we can guarantee that we won’t ever need the RTM versions.

So yes, the WinSXS folder is very large, and it will continue to grow as the OS ages.  I hope that this clears up some of the questions about why that is, and what you can do about it. Note that the Windows servicing structure and the layout of the store is subject to change.

Joseph Conway
Senior Support Escalation Engineer
Microsoft Enterprise Platforms Support

Leave a Comment
  • Please add 2 and 4 and type the answer here:
  • Post
  • I wanted to put some sort of content on here quickly, so here is a link to my teams blog which I wrote

  • Sorry everyone, I think we had comments turned off for a while on our blog.  I have answered a lot of these questions on my blog but please feel free to post new comments here and I will attempt to get to them:

    VSP1CLN on 2008: blogs.technet.com/.../where-is-vsp1cln-on-windows-2008.aspx

    Disk provisioning: blogs.technet.com/.../general-guidance-on-disk-provisioning-for-winsxs-growth.aspx

    CheckSUR: blogs.technet.com/.../why-does-checksur-take-a-long-time-to-run.aspx

  • So, tell me what I am supposed to do now?  

    I have 80 GIG boot drive, and the WinSxS folder is consuming 30 gigs of this space.  

    I have 3 gigs left.

    The full Win7 comes on a DVD so I don’t really believe it takes 30 GIG to store a backup of the OS, but even if it did, how can I relocate the Winsxs folder to an old useless drive?  

    Besides, your backups are useless, when the machien crashes I restore fropm my drive backup which, thanks to this Winsxs, consumes 30gig*5 backups of data, not to mention the extra backup time.

    So what is the recommendation?  Do you want me to take 2 days off of work to backup data, flatten the machine, build a new OS, when schedule to do this next quarter when you fill up my harddrive again?

    Seriously, what am I supposed to do?  

    Write me at rwgreene999 at hotmail and tell me what you planned for full harddrives.

  • one day you will do something right...

  • Hi, at a Time where Windows Server should be installable on a 20 GB Harddisk, i s pretty worse that WINSXS-Folder could not easy be moved to another Partition. WIN7 is a mess, not everybody has more than 10 - 20 GB Harddisks!!!! Server 2008 exists on HP DL 360 with 20 GB Systempartition and 10 GB Programpartition! Some of the older ones only have 18,2 GB HD`s!!!!!!!

    Time to change OS: my new UBUNTU Server  and Client are installable on my HD`s without having Terabyte HD`s!!!!!!!!!!! THey can be installed on a 8GB Systempartition and 10 GB Datapartition.

    Microsoft should learn to have new OS`es with older HD`s.

    With best Regards

    Martin

    MCP NT4

    MCSA W2K

    MCSE 2K3

    MCITP 2008

  • The question is... why is there no way to remove unnecessary pieces from this store?

    I have an Intel machine -why in this nstal would I ever (EVER!) need amd files? It's 32-bit W7 - can I delete any 64-bit files if they are in there. If I have 1 language (or 2, say, real English and English - American)  why can't I delete Cantonese and Ukrainian and Tagalog and Hindu and... Does this mean that as we progress to IE9 and IE10 and IE-Google (the number, not the competent software company, that is...)  we will be keeping every prior install for no particular reason and I asume odds ar we will not be able to regress to those versions ayway...

    Some items are simply not necessary; they should be deletable. I like the idea of using WUpdate for a retreival repository of last resort. If a new install NEEDS a missing file, then roll back the install and keep running as before.

  • @Linux Guy: That will never happen. Windows will always be bloated and need terabytes of HD space and RAM, while you can install - and run smoothly - linux on as little as 256kb of RAM. Linux has respect for the user in the sense that it doesn't use more space than nessesary, but still is faster than windows, and more reliable. Well, AND more secure, of course.

  • @Microsoft.  Any update on this?  it's a complete nightmare.  Currently this makes windows server a terrible choice for vitualised servers.

  • @Martin If you don't have harddrives larger than 20 gb your server/laptops/desktops are probably outdated and can hardly handle the OS. I might be wrong but 20 gb is almost too small for even XP.

  • Seeing as how Vista claimed it needed around 30 gigs, I put it on a 50 gig partition thinking it would have plenty of space.  I am now down to 1.5 gigs.  My computer is not outdated, but I didn't expect Windows would grow and grow to almost double its original size.

  • "Your computer is probably outdated."

    Idiot.  I use an SSD as my boot drive and spinning disk for my data.  My fresh Win7 Pro install had me with 6GB free.  A day later, I'm down to 500MB.

    The only reason I still have to boot into Window is DRM (Netflix and iTunes).  It's just infuriating.

  • I have to agree that this logic doesn't seem to make much sense, particularly in a virtualized data center environment.  If we create 200 VM's running 2008, each with 80 GB C:\ drives booting from SAN, then a VERY large percentage of each VM spinning on expensive disks is just wasted with redundant data.

    It would see that creating one "component network share" and having all instances point back to just 1 location would be a much better idea.  If you can virtualize all components in the OS to spot on the drive..Why not virtualize all servers to just 1 share?  New SP comes out, just add those components to the component share.  

    This does make for a very compelling case to NOT upgrade your data centers to 2008.

  • Forget about windows, change to Linux or Mac. Bill Gates and Devils made enough Money.

  • Ok Jeff, you wrote the article are you gonig to answer any of the questions or not? Can an intel user get rid of the amd files? Like others I have used a SSD drive for speed, but had to keep down to 60Gigs for price. I tried to do a reinstall from my downloaded win7. It said I needed to have 16,480 free so I did what I had to do to make that happen, but then the install placed 12 gigs of files on my drive and says I need to free up again. I can't find the files from box1 so I can delete tham and do it again.

  • Words cannot express what a horrible engineering choice the current winsxs situation is. Were it a one-off "whups" kind of thing it'd be forgivable, but unfortunately Microsoft has such a long history of making choices just as bad if not worse where technology is concerned that I am not even surprised any more.

    Which is really too bad.  I had high hopes for the current generation of post-Vista Windowses.

Page 2 of 5 (74 items) 12345