With more expensive components and longer hardware lifespans, nowhere are hardware specifications more scrutinized than in the server environment. Just a few years ago, Windows Server 2000 asked for a measly 650 MB of free disk space to install, while Server 2008 requires several times that amount to install, and it takes a fair deal more to run it effectively. While prices have dropped significantly on hardware over the last 10 years, server hardware has not seen the savings of desktop hardware. In addition, virtual servers have become hugely popular in recent years, which means that a single server may contain dozens of copies of a single operating system.
In other words, Windows 2008 is a space hog. Other than the usual growth that we expect over time from any type of software, there is also an increased need for swap file disk space, due to the growth in memory requirements. A server with 64 GB of RAM, and a swap file to match, would have seemed ludicrous 10 years ago. Plus, there are several new features that use even more disk space! Here we’ll take a look at Windows 2008 and provide some tips on how to reduce the appetite of this server space hog.
One of the first space hogging features that many system administrators run into with Windows 2008 is a folder called "WinSxS," which is used by a system known as Windows Side-by-Side Assembly (WinSxS). Windows Side-by-Side Assembly stores DLLs and executables into one large library so that it can be easily accessed by Windows and other Microsoft components. This allows the server to keep multiple version of various system files, facilitating easy updating and backward compatibility. While previous Windows versions stored many important files in a directory known as "System32," the 2008 version of this directory contains many pointers to system files that are actually stored in this WinSxS folder. This has many advantages. For example, instead of replacing DLLs in the System32 directory when an update is loaded, the new version is installed in the SxS directory, and various pointers are changed to the new version.
The disadvantage of this method is that installing a 200 MB service pack on the system potentially means adding another 200 MB of files that never leave the system. Even without counting service packs, there are hundreds of Windows updates released every year. This can translate to a large accumulation of files in the WinSxS directory. In addition, using this method can make it hard to analyze disk space usage, as every active DLL seems to appear on the system twice.
In addition to the normal disk space’s use of the OS files, alternate OS file versions and swap file, there is one more factor that contributes to why space is eaten up on your Server 2008 system – one more hidden than all the others: System Volume Information.
Volume Shadow Copy Service
Many conventional methods of looking at disk space usage may show 20 GB of files and free space on a 40 GB drive, with no information on what happened to the other 20 GB. If you’re running Windows Server 2008, there is one culprit to look for – the Volume Shadow Copy Service. It is likely that you have never configured this service, and probably haven’t even heard of it, but it may be running on your system. Volume Shadow Copy takes system volume snapshots, which are stored in a hidden folder that is rarely accessible by administrators.
The easiest way to see and reduce the amount of disk space used by the Volume Shadow Copy Service is to use the Disk Management section of Computer Management. When looking at the properties of a volume in Disk Management, there is a section titled "Shadow Copies." You can then view the current statistics of the service, which easily may be many times the amount of space used by the Windows directory. Even if the service shows as disabled for every volume in your system, it could still be using a significant amount of disk space.
While there are many ways to limit or disable this service, the easiest method is to simply set a maximum limit of 300 MB, which is the smallest allowable size. Once you make this change, the system will automatically delete old shadow copies until it is using 300 MB or less of disk space.
As previously mentioned, swap file use is a heavy space consumer on server systems. As such, another way to keep disk space usage down on the C drive is to move swap files to an alternate drive. With many server systems, the logical drive letters do not equate to physical drives. So, while it is generally recommended that the swap file always be on the first drive in the system, putting a swap file on the D drive could mean it is on the first drive in the system.
While many would say 10-20 GB is enough for a C drive on a simple server, these new features make it almost impossible to operate a server with so little space. It may be better to use a C drive with closer to 40-50 GB of space – just to be safe. That said, if you need to conserve disk space usage, be sure to limit the Shadows Copies and possibly move the swap file to a a different drive altogether.
Wrangling a Server Space Hog
To date, Windows Server 2008 is clearly the most space-consuming version of Windows Server, but with good planning and a careful eye on these key areas, this space hog can be wrangled effectively.