Solved WinSXS Folder not actually consuming lots of space

How does one get rid of the hard links so the "properties" tab runs true?
 

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bit 7601 ...Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz6 GBRadeon 6750 1gb
Computer Manufacturer/Model Number
HP Pavilion p6745f
OS
Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz
Motherboard
PEGATRON CORPORATION 2AB6
Memory
6 GB
Graphics Card(s)
Radeon 6750 1gb
Sound Card
(1) IDT High Definition Audio CODEC (2) Intel(R) Display A
Monitor(s) Displays
Acer x193w
Hard Drives
(1) WDC WD15EARS-60MVWB0 (2) Generic- Compact Flash USB Device (3) Generic- MS/MS-Pro USB Device (4) Generic- SD/MMC USB Device (5) Generic- SM/xD-Picture USB Device (6) WD My Book 1110 USB Device
PSU
Internal 500W (100V-240V)
Case
Mid-size ATX
Cooling
unknown
Keyboard
HP usb multimedia keyboard
Mouse
HP usb compliant mouse
Internet Speed
256 kbps
Other Info
Ver: CHI_713.bin vCHI7.13

My Computer My Computer

At a glance

Windows 10 Pro (x64)Intel Core i7-3930K (3.2GHz - 4.5GHz)4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)Nvidia Geforce GTX 690
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
everyone is interested in this!

look at the time dedicated to attempting to get a true reflection of the space consumed by files alone - that is my understanding of the issue here (unable to understand true folder size, ignoring hardlinks)

Many others asking for similar

I use the amazing TuneUp Utilities, and the Disk Space Explorer has excellent filtering options.. but nothing for "ignoring hard-links"

The previous tool I used (treesize) does have that option... but apparently only as an option in it's duplicate file finding functionality.

solution: try and ignore the gargantuan growth of the windows folder?

Almost every atom of me is screaming don't do this
 

My Computer My Computer

At a glance

Windows 7 Ultimate 64bit2.28GbNVIDIA
Computer type
Laptop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 Ultimate 64bit
CPU
2.2
Memory
8Gb
Graphics Card(s)
NVIDIA
Screen Resolution
1280/762
Mouse
built in pad || iphone || MS wireless
Internet Speed
100MB
Antivirus
Avast
Browser
Chrome, Chrome portable
keep it simple! listen to pparks!

Lets make it simple. So that space exist but is not usable in normal everyday way. That I wanted to know :)

You aren't making it simple, you are not understanding it completely.

1). Some of the files, are real files. They really take up some space on your hard drive. These reduce the amount of space available to store files and install applications.
2). The other items are hardlinks to files that exist someplace else on the hard drive. Now, the real true physical file exists and WILL decrease the amount of space that is really on your hard drive. The hardlinks are NOT real physical files and DO NOT consume disk space on your hard drive.

Go back to my example recently.
  • I started with 44.9GB of free disk space.
  • I copied in a "REAL" file that was about 650MB in size
  • My hard drive space dropped to 44.2GB of free disk space. This is what applications have access to and represents how much stuff I can copy onto my hard drive before it's full.
  • I then created numerous hardlinks and made it appear that my C:\Windows\aTestFolder had almost 4GB of stuff in it.
  • I demonstrated that TreeSize free would report an increased size of my C:\windows folder and would report that C:\windows\aTestFolder was 4GB in size.
  • But looking at my command prompt showed that my free drive space stayed consistent at 44.2GB of free space. it's the same amount of space that I had above, applications still have access to the exact same amount of free space. (even though I magically created what appears to be 4GB folder called C:\windows\aTestFolder)
  • I could have made 500 hard links to that same file and made it appears that my C:\windows\aTestFolder was (500 x 650MB) was 325GB in size. Treesize free would show a 325GB folder, and Explorer would show a 325GB folder if I looked at properties. All miraculously on my 80GB hard drive.
  • Even with 500 hard links to the file, my command prompt would continue to show 44.2GB of space free. (Because none of these hardlinks actually decrease the amount of free space on your hard drive.


So, NO....it's not like the space exists and you cannot use it in everyday use. The space that is free can be demonstrated with a command prompt or looking at Windows Explorer...or the bottom of the TreeSizeFree window. The hardlinks DO NOT, and HAVE NOT reduced the amount of free space on your hard drive. The amount of hardlinks have never counted against you.

the 4.2GB worth of hardlinks you discovered have NOT reduced your available free space by 4.2GB. In fact, if they did actually count against you, instead of having 8GB of free space on your hard drive, it would actually drop to 4.

YOU ARE NOT BEING CHEATED OUT OF ANY SPACE, THE SPACE ISN'T MASKED OFF AND UNUSABLE.

I've read a few pages this morning on this winsxsx and hardlinks and actual folder size thing. On this thread pparks is the only one who is clear enough with his explanation for me to glean any insights.

VERY surprised re the apparent absence of apps developed to deliver info on (what I would class as) actual folder size...

So I understand (thanks to pparks clear workings :) why this misunderstanding occurs...
My question is: how do we use this info to work out folder size (files only) as efficiently as possible?

I can imagine it could involve subtracting (actual) free space from (actual) volume size ... and then I get stuck....

If we could identify hard links, count them recursively, and subtract that from reported folder size, would that work?

Thanks

JjCEOgf.png
 

My Computer My Computer

At a glance

Windows 7 Ultimate 64bit2.28GbNVIDIA
Computer type
Laptop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 Ultimate 64bit
CPU
2.2
Memory
8Gb
Graphics Card(s)
NVIDIA
Screen Resolution
1280/762
Mouse
built in pad || iphone || MS wireless
Internet Speed
100MB
Antivirus
Avast
Browser
Chrome, Chrome portable
finddupe c:\windows\** -listlink

Files: 16722836 kBytes in 83506 files
Dupes: 1600291 kBytes in 11492 files
12 files of zero length were skipped
18 files could not be opened

This is a clean build, with zero windows functions installed.

I calculate that 1.526(GB) of windows is duplicates; taken from reported (16.23) that makes windows ~ 14.704GB


on winsxs

Files: 13417882 kBytes in 59325 files
Dupes: 1108638 kBytes in 7692 files (1gb)
2 files could not be opened

great article here, the author claims his 5Gb winsxs is only ACTUALLY 1.5 GB (references hardlink scanner, broken link :( )

I'm wasting so much time being obsessive compulsive over this because I'm trying to get as small a footprint on my base VHD as possible.

Would love to hear if anyone else has similar figures to the author, and especially if anyone has a copy of hardlink's installer / URL they can share.

thanks again
 

My Computer My Computer

At a glance

Windows 7 Ultimate 64bit2.28GbNVIDIA
Computer type
Laptop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 Ultimate 64bit
CPU
2.2
Memory
8Gb
Graphics Card(s)
NVIDIA
Screen Resolution
1280/762
Mouse
built in pad || iphone || MS wireless
Internet Speed
100MB
Antivirus
Avast
Browser
Chrome, Chrome portable
found hardlink scanner (thanks james ross!)

Does anyone know what params to give hardlink scanner to ascertain how much of a folder (winsxs, for example :) is actually extra hardlinks?

ie how to do

EN only:

Full size: 6.18 GB
Hard links: 4.80 GB
Normal files: 1.37 GB

Given that every file is a hardlink, and we're interested in files with more than one hardlink, I tried

"Hardlink Scanner.exe" c:\windows/winsxs /c 2
(count: 2)

and got this
Naive file size: 10,305,500,773
Unique file size: 9,129,396,568 ( 88%)
Difference: 1,176,104,205 ( 11%)
 

My Computer My Computer

At a glance

Windows 7 Ultimate 64bit2.28GbNVIDIA
Computer type
Laptop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 Ultimate 64bit
CPU
2.2
Memory
8Gb
Graphics Card(s)
NVIDIA
Screen Resolution
1280/762
Mouse
built in pad || iphone || MS wireless
Internet Speed
100MB
Antivirus
Avast
Browser
Chrome, Chrome portable
It is important to understand that the folder size reported (by any utility) is at best only an approximation. There are numerous issues involved, hard links being only one. The problem is inherent in any file system but particularly so in complex file systems like NTFS. This blog entry explains this in more detail:

Computing the size of a directory is more than just adding file sizes - The Old New Thing - Site Home - MSDN Blogs

The author of the blog is Raymond Chen, a Microsoft developer since prior to Windows 95.
 

My Computer My Computer

At a glance

Windows 7 Pro 64 bitXeon W35208 GBNvidia Geforce 210
Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP
OS
Windows 7 Pro 64 bit
CPU
Xeon W3520
Memory
8 GB
Graphics Card(s)
Nvidia Geforce 210
Back
Top