Windows 8 and low disk space

October 30, 2013

With 1TB hard disk drive, no one really cares about the amount of space taken by OS. But after switching to a much smaller drive, 120GB SSD, space on drive C:\ becomes precious. So it was very surprising to me to see only 50GB free just after installing Win 8.1 on an empty drive.

Full installation of Win 8.1 takes only about 15GB. Where did the rest 50GB go?

Running Disk Cleanups didn't reveal any magical space drainage either. I even suspected a few SSD chips gone bad and now half of the drive is simply unusable.

Turns out, Windows has two very hidden files C:\pagefile.sys and C:\hiberfil.sys. So hidden that if you turn on the show hidden files feature in windows explorer, they still remain hidden. Even if you run C:\>dir as Administrator you won't see them. I only came across them by accident with Cygwin.

  • pagefile.sys is a Windows version of swap partition. It is typically the size equal to the amount of system's ram and in my case it's a whooping 32GB file. Pagefiles can be disabled all-together, moved to a different drive or modified to a custom size but by default they seem to be same size as ram on C:\
  • hiberfil.sys The secret sauce behind Windows fast boot-up and the cache file for OS state when hibernating. Also typically large, on my system - 26GB.

Finally windows space allocation is making sense.