Microsoft made a lot of changes and enhancements in Windows Vista promising better security and usability. One of the thing previously not in prior Windows that they added is a folder called winsxs. It means windows side-by-side. Nothing much is known then about this folder but a lot of users are complaining that it keeps on growing bigger and bigger taking up to 15GB for some people. This winsxs system was then also ported into windows 7 which brings us to continue asking this question.

So what is this winsxs folder and what is so important about it that we cannot delete anything in it?

Well, I am going to give a simple nutshell explaination. If you want detailed explanation and analysis of this folder and what it does EXACTLY, then head for these links.

<links>

Basically winsxs folder contain a lot of hardlinks or junction points (as being called by microsoft) to a lot of system files. It keeps a lot of different versions of systems files which probably is used for when rolling back drivers and so on. So these files are actually just linkage to other files in your windows system. I think there are also some real physical files there but all these are managed by windows and never explained by microsoft on the structure of this winsxs folder.

Why does winsxs folder keep on growing in size?

When you look at the properties of this folder, the file size listed is not really the physical space taken up due to them being links and not physical files.

Here is an example that someone did experiment on junction points. It explain well on how windows cannot report disk space usage as opposed to linux’s link system. This is the main reason which causes confusion about winsxs.

Assuming there is this test D: drive with 1000MB disk space left.

We create an empty folder called test123.

Copy a file that is 100MB in size into folder test123.

Check the space usage and we see 900MB space left. So far so good.

Next we create 3 junction points in folder test123 that points to the 100MB file.

So we have 4 files there with 1 is actually physical file of 100MB.

However, when we check the disk space properties for folder test123, it report 400MB being used by this folder.

Check free disk space and it is still around 900MB. For explanation sake, we ignore the small space used by each junction point for the pointer file.

So you see, when checking disk space used by junction point, windows port the file size of the physical file it is pointing to. This is essentially how junction point works in windows. Not very smart design by windows engineer.

Back to the winsxs folder. You now know why when you do drivers updates and windows updates, winsxs folder size keep growing and growing. But if you check you free diskspace, the growth doesn’t tally.

How to reduce winsxs size without screwing up my Windows?

Before starting on clearing up winsxs space. You can first run a Post Windows 7 SP1 cleanup. For those who have already applied Windows 7 SP1. This will clean up virtual space of around 5GB. Because remember, 5GB reported by windows on winsxs folder does not equal REAL 5GB. In actuality, around 500MB are saved. Looks at screenies below.

DISM /online /Cleanup-Image /SpSuperseded

C:\>dir/w
Volume in drive C has no label.
Volume Serial Number is 1EB4-6A03

Now that you know the usage size reported on winsxs is not the correct exact storage used, do we still need to find a way to reduce the size? How do we find out exactly how much space is actually used by winsxs? My answer is yes and no.

Despite Windows over reporting the size of winsxs, it still in some way take up unnecessary space. That might be nothing when you have a 500GB HDD. However, when it comes to SSD, this is a different story. SSDs are still very expensive. Some people only have 20GB for SSD and every MB counts. So I would recommend trying to reduce unnecessary storage taken up to files that we hardly ever touch.

After some googling, the only tool that I found to be able to help clear up winsxs is winsxslite created by Christian Bering Boegh. This is basically a “bat” file running DOS commands. It depends on a few DOS command line tools which is listed in “Help” section when you run the software. I have to say this tool is amazingly complex. It take a lot of time when running it just to come up with the list of actual physical space taken up by winsxs. I tried it on a Windows 7 SP1 laptop and it took me around 5 hours to finish Stage 1 of this tool. There is another stage 2 which I did not bother to run at it is really time consuming. I did end up saving around 1GB by the end of stage 1. However, I do not recommend anyone running this as it is quite a hassle and normal user would find it difficult just to download the third party tools required to get this software running.

By now, you know what winsxs is about. Some might also be wondering why Microsoft engineers designed such an insufficient system. Something that waste resources. I don’t know if this is totally a lousy system because everyone also hated Windows Registry system when it was introduced in Windows 95. It’s not that bad once everyone got used to it by now. I guess same thing applies to winsxs. We will probably see more tools released by third party that can optimize it more efficiently. Until then I guess most of use will need to stick to it and leave it to it’s own devices. BTW, I still don’t really fancy registry and still think it sucks. LOL…

Linux 64bit has been around for a very long time. It came out long before Microsoft released 64bit version of their Windows. During that time, AMD was the leader in 64 bit processor, thus it was called AMD64 during that time. The name has stuck on until now that some linux packages are using it in their package for 64bit packages. So don’t be puzzled that you will be installing package_AMD64.deb for your debian or ubuntu.

It was a no brainier for me by now that Linux 64bit platform has been established to be very stable and almost all packages comes with it. Being 64bit means your software will have double the bandwidth for memory usage and even processing power. However, in real work, performance is not that much faster. But the main thing about 64bit platform is to break the memory limitation of 32bit which is 4GB RAM.

I would go for 64bit for almost all my OS installation nowadays be it Linux or Windows. However, something happened the other day that made me re-think my perception on 64bit.

Recently, there was a server that I manage that needed to be upgraded. We bought a new server with better hardware specs but it remained 4GB RAM. At that time, we do not think there is a need to add more RAM and server RAMs are not cheap either. As usual, I went for Ubuntu 10.04 LTS 64bit as this is currently our choice of Linux for our servers. After taking few days to painstakingly install, configure and migrated the data from old server, the new server went online. However, the following day we encountered some problems. The server were slow and at one time it even crashed. We had to reboot it and as usual, we check the logs for any signs of problems. Eventually, we found that the APC (Alternative PHP cache) that is running in the server keep churning out error that it does not have enough memory. So we knew this has something to do with memory. We tinkered with APC and the server became more stable and load is now running pretty low at less than 2.0.

However, there are still some problem which we are still not sure whether it is APC or other components like Apache2 or PHP. Eventhough the configurations are all same from old server, the software version is running at newer version. Another few days are spend checking and tinkering until we found the “blank page” problem is due to APC. However, disabling APC does not solve the problem permanently as it will cause the server to run higher load and more memory.

After even more checking, we found that each PHP session is using double the amount of memory from previous server. This eventually lead to the culprit…..64bit. Apparently when you go to 64bit, the amount of memory used will almost become double. That is for certain applications only. In our case, PHP is using double the memory to run the usual stuff but to give 64bit some credit, it does run a bit faster than before. Maybe it is due to the wider 64bit memory bandwidth or maybe it is due to the better processor.

In any case, this taught me a lesson on 32bit vs 64bit.

Use 32bit – if you do not plan to upgrade your system RAM to more than 4GB.**

Use 64bit – if you will definitely be using more than 4GB memory now or later in upgrade. To take advantage of 64bit processor and hardware.

**Bear in mind that it is possible to have 32bit Linux with more than 4GB RAM. Linux 32bit kernel will still be able to make use of all the memory using something called PAE (Physical Address Extension). However, this method does have some limitations. **