Winsxs. Last Ditch Survival Guide?
I have a 20 Gb drive on my virtual hosted Server. Win Server, SQL 2008, IIS. nothing fancy 64 bit 2.27Ghz Intel Xeon, Gig of Ram.
I received it initially as part of the Microsoft WebSpark Program for which I was very grateful and can't praise them enough for supporting small concerns with projects such as these.
I now maintain the same server with my own funding after the initial period of funding lapsed.
My question is this.
I have 17.8 Gb of Winsxs folder, 13.5 of which is really taken up according to ctts.exe
Gross:
85925 Files, 20206 Folders
17.8 GB (19.195.923.555 Bytes)
Hardlinks:
20393 Files
4.32 GB (4.645.255.771 Bytes)
Compressed:
10 Files
UnCompressed: 8.18 MB (8.580.084 Bytes)
Compressed: 8.72 MB (9.152.587 Bytes)
Average Compression rate: -6.7%
Total:
65532 Files, 20206 Folders
13.5 GB (14.551.240.287 Bytes)
Including Clusters-Blend: 13.6 GB (14.684.323.840 Bytes)
When the server was provisioned to me all the updates were configured to install by default, I only remedied this issue about 11 months after taking ownership or the server when I noticed the Winsxs had swollen majorly and went about reading articles (mainly
really defensive and sketchy forum posts) that could a) highlight why and b) fix it
So I figured out a) via researching the issue and stopped the updates save for the absolutely critical ones.
Nothing new is ever installed on the box excepting some WebInstaller stuff for new websites.
now b) is proving more tricky.
I dont have the luxury of razing the box to the ground as my provider states "The 20 Gb partition is the recommended MS size for that OS therefore we have provided you with a tool fit for use." Despite the fact it was their foolish initial setup that added
to this mess. but I digress.
I have spent days and days researching the issue now. over many months. I get it. it's required in many cases to give access to a wide variety of versions of files in a nusthell.
But for pities sake please can someone just give me a way to fit this stuff into a 20 Gb box. Because quite frankly Im running out of ideas.
Can I at least confirm that MS have run a base Win2008 server with SQL installed over - SAY - a 3 year period (since the inception of the platform would seem fair)
Installed all of the "Required" Updates for the base server and SQL for that period and therefore have some sort of metric that I can look at and say "AH, I see yours easily fits in the 20Gb, I understand now"
Because honestly I don't. I'm frustrated there is no solution and even more frustrated to be hit over the head with figures seemingly plucked out of the air.
Please could someone confirm a "Plan of attack" to at least scrape back a Gig (The previous 4 REQUIRED security updates were 100 MB in size and Took 1GB of space after install :( sigh ) which lurched me back to the critical mark again after I managed
to trim back to 2.5 gb free only last month. now back to 1Gb free and nothing else has changed.
The logs are cleaned weekly, temp files cleaned out, everything that can be zipped sanely is zipped, there is less fat on this server than the average triathelete. Someone throw me a bone here, This is making me really old.
Many many thanks for any help at someone can offer for this plan of attack
and rest assured I have probably read every single forum post of the subject, I've read hundreds now
with years of history, From MSDN, thru technet, techrepublic, private MS staff blogs, Official MS forums, 3rd party (endless list) and they all more or less either aim to educate the user what Winsxs is for or does but none address the issue of absolute
LAST RESORT, I MUST REDUCE THIS OR DIE actions.
This is what I need. not more education or links to someone elses non-solution.
I am not someone saying "Can I delete my Winsxs folder??? lolz"
I am a desperate vaguely proficient coder partner looking for some last resort help. Just some rough pointers or what you could do IF YOU HAD TO.
see? I bet there will be an avalanche of hits to this page if someone actually gives some last-ditch survival instructions, after all that is what is needed at this point. And Yes. 99% of the obvious steps to follow have been undertaken. Im thinking Winsxs
Prune here. Texas Style.
dir c:\windows\winsxs /s /ta >file.txt might not be a terrible starter for 10. if not, why not. Heck anything. If I have to get another 30 Gb of space just to accomodate the Swollen Cache this will cost me over a $1000 in 3 years, factoring in pricing plans
for more space and will only grow. the last 4 Required updates caused a swell of 1GB. they all came together and within a month, so I think I am underestimating at this point.
This just doesn't seem to make any sense, I am being crushed by a seemingly errant solution.
Many thanks.I came, I saw, I coded
May 23rd, 2012 10:15am
"after taking ownership OF the server", sorry typo.
REFS:
http://blogs.msdn.com/b/jonwis/archive/2007/01/02/deleting-from-the-winsxs-directory.aspx
http://blogs.msdn.com/b/jonwis/archive/2005/12/28/507863.aspx
http://blogs.technet.com/b/askcore/archive/2008/09/17/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large.aspx
http://blogs.msdn.com/b/e7/archive/2008/11/19/disk-space.aspx
I mean "I am being crushed by a seemingly errant solution." in the sense of not fitting in the space I was advised is the right amount as opposed to some "meta" debate about architectural fitness.
Would like to add that I appreciate just what a tough question I'm asking.
Yep, it's not a great idea. but lot's of things that aren't great ideas need to be done in the absence of another solution.
Winsxslitealike, batch removing, powershell ninjing, fancy Dism or ANY other manouvers all happily considered.
I managed to scrape back to 1.7Gb via uninstalling every app that had no immediate or medium term use on the box, reasoning that I could mstsc to it with notepad++ etc.
Thanks again
=============================================================
This is also a decent read for those who stumbled here hoping for some quickfix from http://social.technet.microsoft.com/profile/dominik%20gau%C3%9F/?ws=usercard-mini
Q1. What is the meaning of "winsxs"?
A1. It's an acronym for the "windows side-by-side" feature. it's mainly a compatibility mechanism allowing you to run software that depends on specific versions of system files - while other softwares on your rig might be dependent on the exact same system
files - but a different version.
Q2. What does this thing do? and
Q3. Why is is so freaking big?
A2. Within the winsxs folder windows keeps different version of windows system files needed specifically by the applications on your pc. to make it more clear: only 1 copy per system file and version is beeing kept and only of those systemfile/verion combinations
actually needed by your applications. So each time you start one of your applications which request a specific version of a system file from the \Windows or \Windows\System32 folders the windows kernel grabs and loads the real file from within the winsxs folder.
It only can grab the specific version from there because of what happened during the installation process of your applications: Let's say your application setup tried to replace a system file within the \Windows\system32 folder (a typical example would be
a VB runtime dll) and succeeded - at least that is what was reported to the setup process. In reality the windows kernel used winsxs feature to evaluate whether it already has a copy of this system file/version combo in the winsxs storage or if it
has to store a new system file/version copy as needed by your application.
A3. With A2 beeing said you allready have a glimpse why this folder "seems" to be so big and even "seems" to get even bigger. this perception is somewhat of an illusion tough due to the hardlinks being used.
A4. Meaning? plaintext please!
Q4. To clear up the hardlink myth: Hardlinks are a file system feature allowing you to access the the exactly same blob of data located anywhere physically on your hard disk via different file system paths. here's the catch: there is no such thing as "i-am-the-first-hardlink-so-im-the-real-position-where-the-data-lies".
In fact there is no way to distinguish between hardlinks in this way. there is only one truth: If you delete different hardlinks of one and the same data blob on the disk, the data remains untouched - until you delete the last hardlink. Then the data blob
get's also deleted.
Having all that said it is valid to turn all those winsxs laments the other way around: The original \Windows and \Windows\System32 folders are in fact getting thinned out. As far as disk space goes: Applications unaware of hardlinks can't distinguish between
regular files and hardlinks. Such software takes each entry for the real deal and gives you wrong file/folder sizes.
Q5. Any other quirks?
A5. Apparently if you uninstall unneded apps, system file copies specifically for this app should also get deleted from the winsxs folder. Unfortunately the cleanup process is somewhat slow and not invocable by the user - at least as far as I know. What
makes things even less clear: I haven't found any solid piece of information as to when exactly the scavenging process takes place.
Some things are indeed a bit frustrating. Take the patch uninstallation folders from Windows XP
$NtUninstallKBXXXXXX$ or in case of an ServicePack the folder $NtServicePackUninstall$. As we all know with each and every patch
that got installed a corresponding uninstall folder was generated so that the patch could get safely uninstalled. So regarding these uninstallation folders i developed a habit: if I didn't encounter any problem with installed patches after a month or so I
deleted the uninstallation folder - because it wasn't gonna happen that i would uninstall the patch.
In Windows XP I had the choice to do so and I regularly did so. With the NT 6 kernel series of the Windows operating system this choice
got killed. It's no longer possible to regain space used by patch uninstallation folders like it was in Windows XP. Instead we are bound to wait for the scavenging process to kick in - and hope it will cleanup unused copies of system files. To be fair: There
is at least a cleanup tool for service packs - but my nagging self would ask in the same breath: Why is there no such tool for the average patch?
Let's draw a summarizing line underneath all of this: One of the main design principles of the NT 6 kernel series of Windows
operating systems was to stay compatible with older hardware and software - so winsxs was born (not exactly because an early version of winsxs was already existent in windows xp though barely used). The winsxs feature accomplishes another task: If applications
cannot effectively replace system files Windows will definitely stay more stable and reliable - a fact that I personally feel even more proven with the latest releases of Windows 7 and Windows Server 2008 R2.
As a matter of fact I'm juggling with WIM images (Windows installation source files) in the office for the last few weeks
and I'm really interested in how SP1 for Windows 7/ Server 2008 R2 will impact on the winsxs folder.
And on a last note: Did you even hear me talking about re-hardlinking via 3rd party tools or deleting files from within the winsxs folder or do anything even more fancy to the winsxs folder?The answer is for a good reason a clear, unmistakable and resounding:
NO! There is no way for you to identify which files and folders within the winsxs store would be obsolete so that they could be safely removed from your drive. My one and only advice here is: Keep your hands off of the winsxs.
Well maybe there is a clever programmer anywhere out there who can analyze the winsxs store or maybe there is even a Windows API interface to ask what files you could safely delete. But for now I'm not aware of either such an program or interface. Maybe
Microsoft will implement such a feature in the next release of Windows. ====================================
I came, I saw, I coded
Free Windows Admin Tool Kit Click here and download it now
May 23rd, 2012 10:16am
Hello,
As a production server, we highly recommend you keep Winsxs folder untouched. 20GB is way too small to hold Windows Server 2008 + IIS server + SQL server. I guess there is no solution except obtain a larger drive.
Thanks
Zhang
May 24th, 2012 1:54am
Fair enough. I wish my webhost had the same opinion.
Thanks for replying.I came, I saw, I coded
Free Windows Admin Tool Kit Click here and download it now
May 24th, 2012 3:50am


