Home » Blog
date 22.Jun.2014

■ Just how big is that winsxs folder?


How many floppy disks would you need to store a full windows installation nowadays? Around 21,547 1.44MB floppies — a long way from the 6 disks required for windows 3.1. You can see how this space under C:\WINDOWS folder is occupied using xplorer² Tools > Folder statistics menu command (see pic). The biggest item is that WinSXS folder taking up 11.3 GB(!) on my win7 system, around a third of the windows total size (it is much worse on 64 bit windows). What is this folder, why is it so big and can we do anything about it?

WinSXS is a folder for side-by-side components, that is DLLs and other files that various programs need to run. In the past a single DLL was shared among many programs, but a "DLL hell" ensued because different programs required different versions of the same DLL. So nowadays, all the different DLL versions are kept in parallel under WinSXS, sacrificing disk space for improved system reliability.
size of winsxs for windows 7

The big waste in winsxs is caused by storing the very same DLLs in multiple locations. The storage waste is limited using hard links for these identical files, but how effective is it? How much of the 11.3GB reported by xplorer² (and windows explorer) is actually committed to disk? I downloaded the sysinternals tool disk usage which is aware of hard links and can calculate the real storage without double-counting hard linked files. Here is the report:

--- C:\>du windows\winsxs
Du v1.5 - report directory disk usage
Files:        47930
Directories:  12173
Size:         11,434,251,375 bytes (10.64 GB)
Size on disk: 11,594,563,584 bytes (10.80 GB)

xplorer² folder statistics reports 52499 files totalling 11.3GB. So although there are many files hard linked, the disk gains aren't that impressive (less than 0.5GB or 5%).

If you examine in details the hard links under winsxs (see the demo video) the most linked items are very small files around 1KB in size. Hard links only result in gains when the file is large, so its extra "copies" are stored with minimum cost — just a reference to the common storage. In my winsxs 32656 items are without links, taking up a total of 7.4 GB (65.5% of total size). Keep in mind that each extra hard link takes up some book-keeping space so it is not free.

How much space does a hard link reference occupy? I couldn't find a definite answer to this question. If each instance is stored as a reference file, it will take at least 4096 bytes (one cluster). If it is just an entry in the MFT then it will take less but probably not much less than 512 bytes (a sector). So for files under 4KB the storage saving may be zero!

There are many things affecting size on disk but it would appear that winsxs is big no matter how you look at it. Moreover you cannot do anything about it. It is all academic. You cannot delete files from it without upsetting your system to total disaster. You cannot redirect it to another partition with junctions (like we did for the outlook email store) because you cannot have hard links spanning disk partitions (some files are linked in C:\WINDOWS\SYSTEM32).

And the morale of the story is... nothing. If you were ever curious about how big is winsxs folder, now you know for sure it is actually as big as it looks.

PS. after all it looks like there is something to do about it. Windows 8 Disk Cleanup wizard has an option for "Windows update cleanup" which will clean some of the unused files in winsxs. There also is an equivalent download for windows 7. Thanks Tuxman!

Post a comment on this topic »

Share |

©2002-2014 ZABKAT, all rights reserved | Privacy policy | Sitemap