Monday, 25 January 2016

Navigation Through Win OS - Impact Of WinSxS Folder

Know WinSxS (Windows Side By Side) folder of your Operating System
Most of the time while navigating drive to drive on your system you may have noticed the WinSxS folder size in Windows 7/ 8/ 10 and been surprisingly increased than other folder’s size which might impact your system speed. Those who are not aware, this folder is situated at C:\Windows\Winsxs and has a whopping size.

What is winsxs folder –
This folder is the repository of all the components store of the operating system, where each component has a unique name that includes the version, language, and processor architecture that it was built for. This folder is the only location where the component is found on the system, all other instances of the files that you see on the system are “projected” by hard linking from the component store.  

This feature is also responsible for why you will no longer be prompted for media when running operations such as System File Checker (SFC), or when installing additional features and roles.

winsxs directories –
There are a few directories in the component store so let’s look at their general role is in Windows.
\Winsxs\Catalogs:  Contains security catalogs for each manifest on the system
\Winsxs\InstallTemp: Temporary location for install events
\Winsxs\Manifests: Component manifest for a specific component, used during operations to make sure files end up where they should
\Winsxs\Temp: Temp directory used for various operations, you’ll find pending renames here
\Winsxs\Backup: Backups of the manifest files in case the copy in \Winsxs\Manifests becomes corrupted
\Winsxs\Filemaps: File system mapping to a file location
\Winsxs\<big_long_file_name>: The payload of the specific component, typically you will see the binaries here.

Why it grows in Size –
When we update a particular binary we release a new version of the whole component, and that new version is stored alongside the original one in the component store. The higher version of the component is projected onto the system, but the older version in the store isn’t touched. The reason for that is the third part of why the component store gets so large.
Also, as you patch your systems and add new roles and features, the winsxs directory will also grow in size.

Commands that can be used to reduce the folder size –
There are few commands available that can be used to create the space however we need to understand the later effects of running those commands. For example –

The following command will remove files needed for uninstallation of service packs. You won’t be able to uninstall any currently installed service packs after running this command:
DISM.exe /online /Cleanup-Image /Superseded

The following command will remove all old versions of every component. You won’t be able to uninstall any currently installed service packs or updates after this completes:
DISM.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
(Deployment Image Servicing and Management (DISM) is a command-line tool that allows you to install, uninstall, configure, and update Windows features, packages, drivers, and international settings.)

Conclusion –
We should not touch the winsxs folder and be as it is until you are an expert or have full knowledge about it, as it can impact your system adversely.

This blog post is inspired by the blogging marathon hosted on IndiBlogger for the launch of the #Fantastico Zica from Tata Motors. You can apply for a test drive of the hatchback Zica today.