When a disk partition is at 90% capacity it should be treated as full. The final 10% needs to be reserved for breathing room for the operating system and/or applications that need temporary space to function, changes to files, and bad sectors on the disk. Ideally, the partition will never even get to 80%, but what if your resources are limited?
Microsoft is not known for being a trim system. “Temporary” and log files build up over time and can eventually fill up the available disk space and bring the server to its knees.
Here are some things you can do to reduce bloat and reclaim disk space, particularly on the C: partition.
- Run Disk Cleanup. Windows includes a built-in tool that deletes temporary files and other unimportant data. To access it, right-click one of your hard drives in the Computer window, select Properties, then click the Disk Cleanup button in the disk properties window. Select the types of files you want to delete and click OK. This includes temporary files, log files, files in your recycle bin, and other unimportant files. You can also clean up system files, which don’t appear in the list here. Click the Clean up system files button if you also want to delete system files.
- Clean Temporary Files. Windows Disk Cleanup doesn’t delete temporary files used by other programs, such as Firefox or Chrome browser caches, which can use gigabytes of hard disk space. For additional temporary and junk file cleaning, try CCleaner. There’s a good article on How-To Geek with tips on how to make the most of CCleaner.
- Manage the event logs. Options include limiting the size of the log files, allowing overwrites of the oldest events when the max log size is reached, and setting the log path to another partition. Know where they are so you can archive or delete the oldest logs.
- Manage the IIS logs. Options include limiting the size of the log files and setting the log path to another partition. Know where they are so you can archive or delete the oldest logs.
- Delete temporary Microsoft patch files. Once the patches have been tested and installed for a while, the chances of wanting to uninstall them are very slim. You can reclaim some space by deleting the install packages which Microsoft leaves behind.
- Move the page file to another partition. Though the OS page file defaults to C:, it doesn’t need to stay there and will work just as well from another drive.
- Move user profiles to another partition. Even on a server where only the admins are logging in (who should know better than to clutter up the server with their files), user profiles can get bloated. You can move the default location to another partition and delete defunct profiles while you’re at it.
- Install applications on another partition. Most applications don’t have to be installed on C:.
- Defrag regularly. Though its primary benefit is an increase in speed, keeping the fragmentation down on a partition does free up some disk space as well. Either way, it’s a good idea to schedule a defrag to run monthly. If the server is virtual, defragging the virtual disk is a slightly different process.
- Analyze Disk Space. If, after all of the above, you still find yourself short on space, find out exactly what is tying up the most disk space with a disk analysis utility such as SpaceSniffer, WinDirStat, or TreeSize Free.