Sunday, 31 March 2013

Shrinking disk free space with Windows 8

So it has been a while since I blogged, because I haven’t been doing any development. I figured it was stupid to abandon this blog, so I’m going to occasionally blog with things I consider relevant and useful to readers.

So, a couple of days ago I noticed that my free space on my SSD was much lower than it should have been, in the order of about 20GB. I don’t check it particularly often, so I had absolutely no idea how long it had been like that.

I decided to use Disk Usage, which is a simple command line program similar to the UNIX ‘du’ command, but for Windows.

I fired up an administrator command prompt and set to work.

Capture1

When I did it, I noticed that C:\Windows was 35GB, which I considered to be unusual. So I continued to drill down as per the image below:

Capture

I eventually discovered that C:\Windows\System32\config was over 17GB in size.

Navigating to that folder in Windows Explorer showed 18 items, the largest of which was far less than the 17GB reported by du. I displayed hidden items in explorer, and discovered that there were over 46000 old .blf and .regtrans-ms files which hadn’t been automatically deleted by Windows.

They were all dated over a month ago apart from 3 or 4 current ones so I figured deleting all the old ones would be safe, knowing I had a backup image if anything went horribly wrong.

So, after 46000 items were deleted and my SSD was 17GB better off, I did a bit of digging to see if it is a common issue. I found a thread on Microsoft Community which suggests it happens now and again.

As per normal support forums, people have their convictions that some arbitrary act fixed the issue ‘for them’, so it *must* be the problem. Nvidia 3D vision was blamed by one because the files apparently stopped generating themselves after they removed 3D vision, and following that, others automatically started blaming it like a flock of sheep.

I remember that mentality from my kernel development days, and it is pretty unhelpful in getting the problem fixed.

I find it unlikely that Nvidia 3D vision is at fault for the following reasons:

  • I purchased my Nvidia card and installed the drivers, including 3D vision, in December. The 46000 files were all generated in February over a period of a few days, then stopped. All whilst 3D vision was happily installed.
  • How and why would a Nvidia driver stop Windows from dealing with it’s registry backups correctly and how could it possibly interfere with that process anyway?

Personally, I have no idea what caused it, and I wouldn’t really like to speculate. I suspect something was locking files for some reason causing the old backups not to be deleted, as to what, who knows.

So, if you notice a lot of disk space being eaten on a Windows 8 box, check for arbitrary hidden .blf and .regtrans-ms files in C:\Windows\System32\config

Just for info, if it looks like this, it is normal:

Capture2