Like any modern operating system, Windows 7 does a fair amount of behind-the-scenes housekeeping to help it respond more smoothly when you launch a program or open a file. Those features can consume a fair amount of disk space. On a conventional hard disk, the impact is almost unnoticeable, but on a small SSD it can add up quickly. Here are four places where you can minimize the amount of space used on the system drive.
Several of these settings use the System Properties dialog box. You can access it from Control Panel, but I find it easier to c lick Start, then click Computer, and finally click System Properties. From the sidebar on the left, click Advanced System Settings.
Let’s start with the most controversial one of all. Windows creates a paging file (sometimes referred to, inaccurately, as a swap file) on the system drive. The initial size of the paging file is determined by the amount of memory you have installed. The more memory you have, the larger the paging file.
The paging file is literally that: a file, called Pagefile.sys, stored by default in the root of the system drive.
You can move the paging file to your alternative data drive, or you can resize the existing paging file on your system drive. I could spend hundreds of words on the pros and cons of each strategy and the calculations you can use to calculate the correct paging file size, but I’ll save that for another day.
To change these settings, you have to burrow deep into dialog boxes. On the Advanced tab of the System Properties dialog box, under Performance, click Settings. That opens the Performance Options dialog box, where you’ll find yet another Advanced tab (yes, this is very advanced). Under Virtual Memory, click Change.
The first thing you need to do is clear the Automatically Manage box at the top. That unlocks the remaining options on the page.
In my case, because my desktop system has plenty of RAM and never uses it all, I have set the initial size to a svelte 1024 MB, allowing it to grow to 4 GB if necessary. After you make any changes, be sure to click Set.
To move the paging file to a different drive, first select the system drive, click No Paging File, and click Set. Then select the secondary drive and choose either System Managed Size or Custom Size (entering appropriate values); then click Set.
Windows supports two types of low-power states. One is sleep, and the other is hibernation. Hibernation is essential for notebooks, less so for desktops, especially those that have a reliable uninterruptible power supply. Hibernation works by reserving space in a hidden file called hiberfil.sys, which is stored in the root of the system drive. By default, this file uses 75% of your total installed memory.
You can reclaim this space on a desktop PC with a small system drive by disabling hibernation. To do so, you need to open an elevated Command Prompt. Click Start, type cmd, then press Alt+Shift+Enter. In the command window, enter powercfg –h off and press Enter. (To re-enable hibernation, use the same command, but change off to on.) From that same command prompt, you can verify the size of both your paging file and your hibernation file: use the command dir c:\ /as.
The System Restore feature has two benefits: it allows you to reverse system configuration changes, and it keeps track of previous versions of files that you change. It does this by periodically saving snapshots of the current configuration and saving them as restore points. You can completely disable System Restore on any drive, but I don’t recommend this extreme measure for your system drive. Instead, change the amount of space set aside for restore points.
To restrict the amount of space used, open the System Properties dialog box and click System Protection. From the list of drives, click the system drive (C:) and then click Configure. That allows you to configure settings. As you can see here, I’ve adjusted the amount of reserved space so that it uses only 3% of the total disk. That’s enough to save a handful of restore points—enough to get out of trouble in the event of a failed driver installation.
Windows Search is one of the killer features of Windows 7, but it comes at a price. Every file that you save in user data folders is indexed so that you can find it based on its contents or properties. The same is true of e-mail. This index is stored as a group of files in a hidden folder on the system drive, and the total size of the index can get very large—even into multiple gigabytes, depending on how many documents you have on your data drive.
I have seen some authors recommend turning the Windows Search service off completely. That is very bad advice, in my opinion. Instead, move the index so that it is stored on your data drive. Here’s how:
1. On your data drive, create a new, empty folder to hold your index files. In this example, I’ve created a folder called Index on the X: (data) drive.
2. Click Start and type index in the search box. Click Indexing Options from the results list to open the Indexing Options dialog box.
3. Click Advanced to open the Advanced Options dialog box.
4. In the Index Location section, you can see the current location of the Index (by default, this is in C:\ProgramData\Microsoft). Click Select New and pick the folder you created in step 1.
When you click OK, Windows moves the index files off your system drive and onto the location you specified. The net result is you recover a potentially large amount of disk space without compromising your ability to search quickly.