Where did all my hard drive space go? Part 2

May 8, 2011 by . 2 comments

This is the second part of a three part article, for parts one and three go to Part 1 and Part 3

 

Continuing our journey into the world of missing hard drive space this post will focus on things you can change, but shouldn’t.

In this post we’ll be focusing on some of the shadier characters:

  • The page file
  • WinSxS
  • Program Installers

These are the kind of things that seem to be taking up a rather worrying amount of hard drive space but do actually provide some benefit or can break things if removed. You can get rid of them, but at best you’ll get ignored by tech support if you tell them what you did…

System options you can change, but shouldn’t

Page File

The page file is somewhat similar to the hibernation file in that it is quite often sucking up a large quantity hard drive space. It is usually the same size as your system memory and for users who have upwards of 12-16GiB of memory this can be quite a large proportion of any drive to dedicate to an “occasional use.”

The problem with adjusting the size of the page file is that it is complicated, you can easily adjust it’s size to something a little more reasonable so long as you have a good idea of what “reasonable” actually means. You can even disable it, if that’s your thing, but then you’re heading into the land of people who don’t care about you getting strange “out of memory” errors when you clearly aren’t.

This is something that you really have to think about prior to changing, you have to have a good idea how much more memory above what you have installed you may require at any given moment. You may know that 99% of the time you’ll never even come close to using all of the installed memory, but what happens if you suddenly have to run all those Virtual Machines that have 4GiB of memory allocated to them. In that case having a large page file may mean the difference between your system simply working hard (albeit a bit slowly) and your system performing a crash and burn exercise.

You may not think you need it, but it provides one heck of a nice safety net so you can keep working just that bit longer.

WinSxS

There is one thing that has bugged me for a while, and that’s people using some kind of directory scanning tool, seeing that the C:WindowsWinSxS folder is using an apparently obscene proportion of the hard drive space and then asking how to cull it or move it or otherwise destroy it.

This is not the folder you are looking for, move along.

The WinSxS folder does not really contain any data or programs that are not already somewhere else in your system. The NTFS filesystem is smart enough that any given piece of data can have multiple file “handles” pointing to it. Effectively from a user point of view you have two or more files, that all share exactly the same information, when the data in one file changes then the other file sees those exact changes as well. These are typically called “hard links” to files.

This is what is happening in the WinSxS folder, it is a folder of duplicate file handles, used by Windows to bring all those files into one place while also placing them around the system so as to keep compatibility with applications that expect them to be elsewhere.

Picking a file at random from the WinSxS folder and then searching the Windows folder I can see that “IPBusEnum.dll.mui” is present in both the WinSxS folder and in C:WindowsSystem32en-US, both files are exactly identical and are only taking up the space of the file itself (and a little bit extra for the additional file handle).

Your average directory size tool does not account for the fact that WinSxS contains few real distinct files and faithfully reports the data size of each file housed therein, ignoring the fact that the actual space taken up by the files in the directory is minimal if you assume that all the data that is scattered around the system is actually necessary.

In short, deleting it will not actually free up any real amount of hard drive space, it is a red herring.

Program Installers

In Windows Vista and Windows7 the Microsoft Installer puts a copy of every installer file into C:WindowsInstallers, and while this may seem a likely candidate for things to delete I would not recommend it, at best it may prevent you from repairing the install via the “Programs and Features” control panel and at worst it could also prevent you from uninstalling the software unless you have access to the original installer as well.

Sadly, this folder can get pretty huge if you are using multi-gigabyte software packages like AutoCAD.

One folder to watch out for is the MSOCache directory that appears on your C: drive after installing Microsoft Office. For some reason rather than copying its install files to C:WindowsInstallers it copies them to C:MSOCache and, for the same reason that you will not be able to repair or recover your office install without the original media, is a folder that you should not delete.

In my next post I’ll look at some of the worst offenders for needlessly wasting hard drive space: Applications.

Filed under Filesystems

2 Comments

Subscribe to comments with RSS.

  • [...] This is the first part of a three part article, for parts two and three go to Part 2 and Part [...]

  • Foreever says:

    Regarding Page File: Since there is no instructions on how to do it, I will share a link here for other users. http://superuser.com/questions/237813/how-can-i-move-the-page-file-to-another-physical-disk-location Also, since what matters to many is the size in C drive, its good idea to store the page size in another drive. I don’t think there is problem doing so. You shouldn’t store in two drives as it can lead to performance degradation.

  • Leave a comment

    Log in
    with Stack Exchange
    or