Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: WinSXS Folder not actually consuming lots of space

15 Sep 2009   #1

Windows 7 Ultimate x64
 
 
WinSXS Folder not actually consuming lots of space

I've seen a recurring post on many forums discussing the absurd amount of disk space being consumed by the C:\Windows\WinSXS folder.

I've done some testing in house to confirm the fact that the files in this folder are predominantly hard links to a small number of files and it's not really taking up anywhere near the space that Windows Explorer is reporting.

Here is a link to better explain what I am talking about:
WinSxS Disk Space Usage: It’s Not What You Think (David's Blog)


Here was my conclusive test:

1). I took a virtual machine and created a new 200MB hard drive that I assigned the drive letter E:

2). I created a subfolder on E: called WinSXS. So, I had E:\WinSXS

3). I copied in a 13MB zip file into E:\WinSXS.

4). I then created 20 hard links to that zip file with the command shown in the link above (mklink /h hardlink#.zip original file

5). According to Windows Explorer, E:\WinSXS is now 267MB in size.....even though the entire E drive is only 200MB.

6). From a cmd prompt, running dir on E:\ shows 174,543,872 bytes free.

Therefore, tools like Windows explorer and TreeSizePro will report that that WinSXS folder is consuming massive amounts of space....while the true fact is that the folder is being misrepresented because the reporting tools do not understand the difference between hardlinks and real files.

My System SpecsSystem Spec
.

04 Jun 2011   #2

Windows 7 Home 64
 
 

Sorry for dragging up this old post, but it answers a question I've been searching and searching for an answer to. I can confirm that on my system, when I add up all the root directories on my main hard drive then subtract the "size" of the WinSXS folder, I get the reported used space in the properties of my boot drive.

Thanks pparks from ending this tail chasing!
My System SpecsSystem Spec
13 Jul 2011   #3

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by LafinJack View Post
Thanks pparks from ending this tail chasing!
Your welcome. After 10,000 views and not a single reply, I was wondering what was going on.
My System SpecsSystem Spec
.


13 Jul 2011   #4

Windows 7 Ultimate
 
 

yes winsxs my not actually using that amount of space, but the space is still reserved by windows none the less. the only way to free up that space for use is to use the one procedure to move the winsxs folder to another drive. the procedure is in no way for novice. i strongly recommend against doing it.
My System SpecsSystem Spec
13 Jul 2011   #5

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by DalekOverSeer View Post
yes winsxs my not actually using that amount of space, but the space is still reserved by windows none the less. the only way to free up that space for use is to use the one procedure to move the winsxs folder to another drive. the procedure is in no way for novice. i strongly recommend against doing it.
No, it is not used by Windows and reserved. You assume the space is used as right clicking on the folder and selecting properties says that it's X amount in size. But as I've shown above, if the folder "REALLY" had 270MB of stuff in it, then the 200MB hard drive would have been filled beyond capacity.

So, when I put in the 13MB file, Windows explorer showed that my D drive went from 200MB free to 187MB free. Once I created the 20 hardlinks, Windows explorer continued to show that my D drive had 187MB free. A command prompt showed 187MB free. But if you were to look at D:\winsxs with Explorer, windirstat or treesize free....it would "claim" that the folder was 270MB in size.

Edit: I am researching ctts.exe and it's ability to properly distinguish between hardlinks and real files. From initial observations, it appears that C:\windows\winsxs might be more real files and less hardlinks than originally expected. This would obviously impact my statements above.
My System SpecsSystem Spec
13 Jul 2011   #6

Windows 7 Ultimate x64
 
 

Here was the guide used as reference at first;
Disk Space - Engineering Windows 7 - Site Home - MSDN Blogs

In this guide, it says this;
Quote:
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 Windows\System32, and it will be counted twice (or more) when simply looking at the individual directories from Windows Explorer.
However, when you run something like ctts.exe...it seems to indicate that an overwhelming majority are "real" files and not hardlinks. In my case, out of nearly 6GB reported (somewhat erroneously by Windows Explorer), ctts.exe says that only 78MB are hardlinks. Well, that wouldn't jive with the MSDN blog article from above.
My System SpecsSystem Spec
13 Jul 2011   #7

Windows 7 Ultimate
 
 

Quote   Quote: Originally Posted by pparks1 View Post
Hmmm...might have to revist this topic under Windows 7 to see if there are not as many hardlinks as MS led people to believe. If there are legit files in C:\windows\winsxs..they would take space. But my understanding was that these files were Mostly (80%+) hardlinks. However, ctts.exe seems to say otherwise...as it shows my 5.8GB of C:\windows\winsxs consists of only 75MB of hard links and 5.7GB of actual files. Most everything I have read in the past was reverse of this in Technet...meaning 75MB of files with over 5GB of hard links.
the prob with microsour is they really do not have a clue. i say this because it was microsoft that told me that for the most part that winsxs contains psychical files. they got lucky when they created win 7.
My System SpecsSystem Spec
13 Jul 2011   #8

Windows 7 Ultimate x64
 
 

Alright, figured something out. Thanks to this thread ( Windows 7 Free Space - Neowin Forums - Page 2).

You have to run ctts.exe against C:\windows and not just C:\windows\winsxs.

The output for me against C:\windows says
13.2GB of total size in use. And TreeSize agrees that C:\windows is indeed 13.2GB. (We agree both will count hard links and inflate real number)
4.2GB of space is consumed by Hard Links
9.0GB of space is actually used by "real" files. ( I believe this is value of ctts.exe..."real files" here consume about 9.0GB of space.

But TreeSize Free, and Windows Explorer both say that my C:\windows\winsxs folder is 5.8GB in size.

Therefore, the conclusion would be that out of 5.8GB reported, nearly 4.2GB is coming from other areas within the the C:\windows directory. Thus, approx 75% of the space is represented by hard links.

So, I would maintain that if I flat out deleted C:\winSXS that I wouldn't get back 5.8GB of free space, but instead would get back (5.8 - 4.2) 1.6GB of space.

So, if you had a 20GB hard drive...even with the "appearance" of a 13.2GB C:\windows folder, I think actually 9.0GB of space is used, and you would really have yourself about 11GB free if you went to a command prompt and typed DIR. I think you could put about 11GB of more files onto that 20GB drive before it would truly be full. Even though, it would seem that counting up the Windows folder with Windows Explorer means that 13.2GB is used and thus only 20-13.2 = 6.8GB would really exist.

And that's what I showed with my example at the top. I could make it "appear" that D:\winsxs was almost 270MB in size..even though my hard drive itself was only 200MB. All of the tools said D:\winsxs was taking 270MB....but yet I could still copy about 187MB of more stuff onto the drive before it really was full.
My System SpecsSystem Spec
13 Jul 2011   #9

Windows 7 Ultimate
 
 

hard links or not in vista anyway if you had a 20 gig drive and windows and everything else was using 5 gigs, winsxs was reporting 4.7 gigs, and you tried to add 12 gigs of files to your c drive you would get told not enough room. now in 7 they may have fixed that i honestly do not know. now once you moved the winsxs to say d in vista your free space in windows did increase by the full 4.7 gigs that winsxs was claiming it was.
My System SpecsSystem Spec
13 Aug 2011   #10

Windows 7 Professional x64 sp1
 
 

Everything sound logically till I tried to copy a file which according to the info should can be fit in there. But all I get was this >

WinSXS Folder not actually consuming lots of space-ctts.jpg

So should I trust in first post explanation and search the error in my system or what?


My System SpecsSystem Spec
Reply

 WinSXS Folder not actually consuming lots of space




Thread Tools



Similar help and support threads for2: WinSXS Folder not actually consuming lots of space
Thread Forum
17GB in winsxs folder help to reduce please General Discussion
Windows 7 OS consuming 100GB space ,how???? Performance & Maintenance
Winsxs file already consumes half of my disk space... Installation & Setup
Solved Moving the winsxs folder General Discussion
Too much space on OS drive being taken up by WinSxS General Discussion
Cannot shrink any more space... When I have lots of space left. Performance & Maintenance
winsxs folder General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 06:46 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33