CertificationsCategoriesLast web search to herePLEASE IGNORE - Temporary item created by Microsoft Conferencing Add-in for Outlook (Version 8.0.6362.149)
ati radeon 9000 windows 7 driver forefront stirling release date "programming for unified communications" free download internet stops working after 30 minutes exchange 2010 um cisco ucm 6 70-648 xsx "Windows 2003 ISO" ati driver for windows 7 |
Sunday, September 30. 2007Demystifying the WinSxS directory in Windows XP, Vista and Server 2003/2008Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
One important thing I forgot to note in those two articles... When the servicing stack installs a component (during setup, optional component install, OOB install, whatever), it must project (our term) the files of that component out into the system so they can be used. Consider a clean install of Vista. The component carrying kernel32.dll appears in the WinSxS store, as does the file itself. On Vista, an optimization for projection is done by creating a hard link from the winsxs\[..]\kernel32.dll file to windows\system32\kernel32.dll. Hard links are a functionality of NTFS by which two files in the filesystem point at the same blob of bits on the physical volume. (Note: hardlinking of files is only an optimization - there are times when files must be projected by copying them.)
Using "dir /s" to compute the size of the winsxs directory will report every file and its size. Unfortunately, "dir" doesn't know how to deal with hard links, so it reports the total file size by summing the size of each name, not summing the size of the used disk space. This isn't a bug in dir, per-se. In NTFS, there is no such thing as the "first" link to a file, so there's no way to determine whether or not a file's size should be included in a scan. Dir (and other tools that use FindFirstFile/FindNextFile and sum the returned file sizes) err on the side of caution. Using Explorer (open explorer on "Computer", right-click the system volume, choose properties, go get some coffee while it scans) should make this better, as it's aware of things like hard links, symbolic links, reparse points, etc. One of these days I'll write this up in a post as well. Alternatively, you can use "chkdsk" to compute the difference between your volume's total size and its free space. On the "move it out of windir" point - the stuff in there that's part of Windows should stay in %windir%. The stuff that's not in-the-box (out-of-band releases, 3rd-party side-by-side components, IHV-delivered drivers) /could/ move out, but then the question is where should it go?
That's all great information! It clears up a couple of questions I was tempted to ask you at some point.
As for "move it out", I guess I really don't have a good answer for that one. It is a complex issue if you want to draw the line in the sand on what is application and what is operating system inside the folder. I'm mainly interested in redirecting the folder much like you can redirect MSOCache and CSC files, but I understand the rationale behind keeping it in %windir%.
Where to move it to?
I'd suggest a relocatable shell folder, similar to the way Documents, Pictures, Music etc. are managed. My own practice is to keep material that has to be retained, but is seldom if ever accessed, in a distant (as in, physically at the "far" end of physical drive) logical volume. As it is, these updates etc. really clobber C: performance; for every one active file, there may be 2 or 3 inactive files over which the heads have to move. I can't imagine such inefficiency being tolerated elsewhere in the system, e.g. RAM or CPU cycle usage. As to "disks are cheap", that's not the point - yes, we have large physical hard drives, but we may want to leverage that in less obvious ways than dumping everything in one big C:. You may want a small C: so that it's more practical to perform partition image backups, or simply to concentrate most head travel within a small part of the disk, no matter how much other clutter you leave lying around. So, back to my original point; IMO, the Windows Installer, updaters, etc. should dump their inactive stuff to a shell location defined by CLSID or whatever, that may be located on any permanently-available storage device (i.e. not including network shares or removable storage).
Windows explorer even in Vista SP1 isn't aware of ntfs hard links. Symbolic links yes, but not hard links. So if MS really uses hard links in the windows dir, the explorer properties window will show more space consumption then there is.
Just like Ninho, this folder is now on my XP machine and appeared with the Service Package #3. Is there any reason
to keep this item on an XP machine?
Can i move this folder to another drive and leave a Junction Point instead of it after modyfing the registry ?
(I've done this with "Program Files" Folder) And also, i'm getting an error when adding Features to vista (Like Telnet support) could it be a corruption in the winsxs folder ? Or
I have found that a user can move the winsxs directory (do a google search for EEEpc move winsxs directory to find a tutorial.) I have tried it myself and it seems to work on any non sp1 vista install. there are 2 issues. 1. Updates will NOT work on the machine as they are hard coded to the directory in a way that the junction stops. and 2. Vista SP1 wont install if the winsxs dir is moved, but if you move the winsxs folder on vista that already has SP1, it will blue screen as there is a direct link to the winsxs dir as well.
You can try this and your case may be different, just make a ghost or backup of your machine first!
Great blog, thank you ! A question, if you will :
I've gotten this folder and contents on a *Windows 2000* SP4 ! Is it any use on this OS, or may I zap it altogether in order to recover space ?
Interesting post. I would like to find out more about this 'scavenging' technique. Is it a service or can I trigger it manually ? Some quick googling didn't turn up any results yet. Greetz !
A coulple of Q's
Many of the directories/DLL's in here seem to be microsoft ones. Does this mean that different components of the OS need different versions of the same library? Also, is Explorer aware of hardlinks or does it count the links as two files? If many of the DLL's are hardlinks, but Explorer treats them as multiple files, then the ACTUAL space these are taking up would be much less wouldn't it? By moving this folder to another partition, do you not give up the hard-link optimisation?
My winsxs contains a file called winsatencode.wmv with duration 666, pretty weird huh?
It's in the x86_microsoft-windows-winsatmediasamples (yada yada...) directory. Think it has something to do with windows experience rating, but still it's nice to know there are some hackers over at Microsoft still.
Simply outstanding article. I've been telling people the same thing(s) since long before Vista actually hit store shelves but not many people listen. Now I've got a published article to point them to and say "See, I was telling you this stuff long ago, now go read what another smart fella says..."
Thanks...
Thought i would ask the question, but i see that many have already asked why the winsxs is so large.
mines gone upto 7.56 GB with recent installs etc Although i have free space between 8 and 11 GB free on the C drive. If or when it fills up my C drive, would it just be easier to re-install vista as new.
Okay, WinSxS is space consumpting but nowadays hard disk space is cheap.
If you know WinSxS will grow to gigs you can make a system partition who covers that. Moving data files to another place will lead to an instable system, investigation(s) according to application errors will get harder.
Harddisk space is cheap - yeah in Wall-Mart. We use a dual redundant approach to all our backend-storage which include dual SAN-disks, dual fiberswitch, dual everything else.
With VMware Infrastrucure 3 and about 50 Windows servers times 10+ GB extra space on system partitions ... add backup, handling ... it all amounts a lot of extra $'s or €'s If you are serious you would have to put that into your calculations when upgrading from i.e. W2003 -> W2008.
Many of the files contained in winsxs are smaller than the standard HD cluster size, especially for partitons large enough to contain Vista. Hence my query, why did MS not compress this folder?
What would be the implications for linked file and running system files directly from the folder? After getting rid of the trusted installer and taking control I tried this on a test rig, only to find several files in use, so I gave up, I do not wish to call down upon my head the performance limiting gremlins of compression. If there were a list of non-essentials, these could maybe be compressed?
What I don't understand is just why this folder has to get so big? On a fresh install of Vista Premium with updates and sp1 added, but no other s/w at all, I was up to over 7GB! Running vsp1cln.exe cut this back to 6GB. I see that there are 5 separate folders for different versions of the natural language 'tool', consuming 1.5GB alone - and I don't even have the nat-lan search turned on!
Surely there must be some way I can remove unwanted elements? Or at least throw all but the latest away? On top of that (although relatively small beer at only 200MB), the unwanted media files I already deleted from 'public videos' are also in the winsxs folder, and of course I can't remove them. Now why on earth do they need protecting? I have seen references to 'scavenging' which may eventually remove unwanted files, but when might that occur? Is it that hard to provide a tool to remove unwanted items?
One aspect I didn't know until recently was that most of the files in WinSXS are hardlinked to each other, which means Explorer.exe is rather 'dumb' when it comes to calculating actual hard drive space used.
I found it frustrating that MS (well, XP or Vista) apparently give no way to identify hard links. I found NTFS link at http://elsdoerfer.name/=ntfslink worked a treat (when installed on XP, don't yet know if it works on vista, I am dual booting the two) to identify hard links with a different icon. But I wanted to see which files linked to each other, and it didn't help. I failed to find a utility to do this, apart from hlscan.exe, found (ironically) within the Win2000 support tools, freely downloadable from MS, and install fine on XP (for some reason this is less readily available if one searches for it under XP support).
This will perform a full recursive scan of the requested drive/folder, and can print out to a log file. This helped me confirm which of the vista natural language folders in winsxs were links. I had intended just brutally removing the unwanted nat-lan rubbish, but decided to see if I could identify which updates had caused them to download. I don't know how i found it, (since in Vista one can list the updates installed, but no further info is available about them except by searching for info on the KB number, so its not clear which of the many updates are the bif ones causing bloat), but something pointed me to KB955020. According to many reports, this is a (shock, horror!) 50MB download - but on my PC the download was 1.2GB (as found in the Vista software distribution/download folder). I had already removed the download install files (It seems vista doesn't tidy this area up, or if it does, its very slow off the mark), but the junk was still in winsxs. Now 955020 was hardly essential, even though MS identified it as 'important' - you can read lots of amusing stuff on the web about how important it is - I had blindly allowed it as I was trying to get my PC to a state where SP1 would be offered, and it wasn't happening. Uninstalling released about 80MB initially, but later on (without my doing anything), Vista silently tidied up the garbage in winsxs, and I was 1.5GB better off (although some of this was hard links, of course). As my concern is getting my Ghost image down to a manageable size, hard linked files don't 'cost' anything, but i did want to get rid of as much as possible. I am planning on looking into which other Vista updates are redundant, and removing them. However, my winsxs folder is down to under 4GB, and the Ghost image fits on a single DVD, which was my goal.
Excellent review and information. Saved me from making a huge mistake in deleting the folders I know I uninstalled... Is there any way to force a cleanup?
Well, after reading the several posts here, I decided to be brave and remove a lot of these directories. The easiest way to clear some of the space out is to use the drive clean up tool. My excess size went from 25 gig to 10 gig after doing that. And yes, I have ran update since then with NO isues. I hope this helps you.
Drive clean up tool huh... hhmmm... can you repost in about a week and let us know if you still haven't seen any issues? for some reason, I'm still not confident, and I'm being a pessimistic wuss when it comes to my work laptop. I also just got a new puter (AMD Quad Phenom), so I don't have those issues yet on the new one. Still, it would save a ton of space and defrag time.
Well, firstly, this is really bad, no absolutely awfull programming. Whatever group of school leavers wrote vista should really take some other YTS job scheem....
I read here about 8gigs, I would feel lucky! Mine at one point was 30gig of a 40gb OS partition. I think 40gb just for the OS was plenty, apparently M$ disagree. My vista is soon to be removed and XP re-installed. What a waste of everyones time and money....
ehmmm... let me ask a stupid question:
Did any of you contact MS and whine about it to them? (and assuming someone did; what was their response?)
Sorry if my points have been made before – but this is a long thread.
I have an Acer 7520 laptop and did not install vista myself. I do not have original Vista dvds but only what Tesco supplied when I bought the laptop. I do have extended warranty and am not sure if I am covered if I try and replace/or repartition the 32.5 GB partition with a new bigger disk or partition Unfortunately 9.48 of that partition is winsxs almost a third of my disk space and so I am spending an inordinate amount of time trying to clean up everything else. One problem that I seem to have is that trying to install software [such as vb express] on another drive seems to require quite a it of free space on c: are there any walk-rounds of this? Thanks Alfred
Just ran into these threads - interesting. Where my heartburn lies is in the inordinate amount of disk access going on involving these files. Task Manager gives access to Resource Monitor, and the amount of disk I/O involving files in this sxs folder is gigantic and seems way out of proportion on a machine sitting around doing (next to) nothing. Just what's going on here???
|
Search this blogLinks
My e-mail address
Exchange: Hotfix Tracker (All products) OCS: Office: Office Cumulative Updates Site Windows: Other: FriendFeedTranslate this pageCalendar
Creative Commons Restrictions |
|||||||||||||||||||||||||||||||||||||||||||||||||