If you have ever saved any audio files to your computer’s hard drive, you will know that these types of files have a tendency to be rather large. This is probably no surprise to anyone, and it wasn’t to me. So, when TechGenix agreed to allow me to produce the TechGenix Xtreme podcast, I thought I was prepared. In addition to a very clean hard drive, I installed an expansion drive as well as a personal cloud environment, which also causes me stress. (But that issue is for another time.) After all of this preparation, imagine my surprise when I recently received a Windows-generated message advising me that I was dangerously low on disk space! How could this possibly be?
Naturally, I did all of the obvious tasks. I emptied the trash, deleted unnecessary duplicate files, and those nasty temporary Internet files. I don’t want anyone to know where I’ve been anyway. Thinking I was brilliant, I did a quick check to see how much disk space I had freed up. Again, imagine my surprise when Windows smugly divulged that I had only freed up under 1GB of space!
Next, I went to File Explorer in an attempt to identify these large files that were causing me stress only to discover that File Explorer does not easily give up Windows files information. Enter TreeSize. This is a free download that actually returns useful data. Awesome… Something that can help me. This is where I discovered that my PC contained two rather large files named pagefil.sys and hiberfil.sys. What on earth do these files do and why are they consuming my drive space? This is like the squatters I pretend are living in my neighbor’s house. I really don’t think that they asked to be there and I suspect that they are making a mess! In fairness, this is not to say that I don’t have any other issues I need to deal with regarding disk space, but these two files in particular were of concern and needed to be dealt with.
Because my friends have stopped answering their phones when I call for free advice (I know you’re at work, Don!), I turned to Google.
All of the documentation I read indicated that if I disable these files in Windows, the files themselves will cease to exist. While in its pure form this is true, there are many gotchas that need to be addressed before the truth finds itself, and we all know that the truth is out there!
What is pagefil.sys?
Pagefil.sys is basically a swap file that works with your PC’s memory. When you run out of memory, it swaps the data back-and-forth theoretically allowing for faster data access. Personally, I believe this feature requires a lot more work. Prior to disabling this “feature” I had been receiving messages indicating that my PC was low on memory. Since I have disabled this “feature,” I no longer receive these messages.
Bottom line, if you find that your PC, or PCs that are part of your enterprise environment, are low on disk space and you have no idea why, this might be it and like me, you may want to disable this “feature.” Here is how you do it.
Step 1: Did you know that if you hold down the Windows key on a PC and tap the Break key (that’s the same as the Pause key), the Control Panel system settings window will pop up? Do it.
Step 2: Select Advanced System Settings
Step 3: In the Performance box, click the Settings button.
Step 4: In the Virtual Memory section, click Change.
Step 5: You have to change two items here. Make sure that Automatically manage paging file size for all drives is deselected AND select the No paging file radio button. Note that you need to click the Set button to get the No paging file to take effect. Why are these things so complicated????
Step 6: Hit the OK button through all of the many levels that Windows requires us to maneuver. Reboot your PC and buttaboom, buttabing, you are good to go. Check TreeSize to ensure there is no longer a pagefil.sys. I screwed up the first time and had to do it twice. I don’t know why. I drink a lot of wine. Don’t judge me.
And now… hiberfil.sys!
Supposedly, allowing your PC to go into hibernate mode will conserve more energy than sleep mode. Personally, I question why we seem to refuse to turn our PCs off at night. At one point in time a very, very long time ago when the dinosaurs roamed the earth, hard drives were very mechanical devices and turning them on and off would lower their life expectancy. I don’t think we have that problem anymore and I like to turn my PC off. For me, I don’t need sleep mode or hibernate mode and I really need the disk space these files consume.
Do you remember the command prompt? No? Sadly, there is no way to disable hiberfil.sys without the command prompt, and so I am about to reintroduce you. I know, who still uses the command prompt? Apparently, Windows 10 does.
Step 1: To get to the command prompt, you just need to right click the start menu in most Windows versions. Select the Run as administrator option for the command prompt. I found out the hard way that the other one simply will not work. This will open up a command prompt window.
Step 2: Are you ready? You have to type the following command and hit the enter key. If you get an error message that means either (1) you did not select the admin command prompt, or (2) you may have missed a space, which is what I did the first two times.
Here is the command:
Powercfg.exe –h off
There is a space between the exe and the –h and there is a space between the –h and the off.
Step 3: Hit the enter key and it should look like absolutely nothing happened. Good. Technically, hitting the enter key is not really a step, but I already formatted this document so it is going to be a step.
Step 4: Now you have to once again reboot your PC for this change to take effect. You may be wondering if you can do both of these changes and then reboot. I have no fucking idea! And it took me forever to figure these two things out, so I did two separate reboots.
I would love to say I am writing this to help everyone out, but the reality is that I may never remember all of the steps if I don’t write them down, so this is actually being done for very selfish reasons. This afternoon I received a message from LinkedIn asking if I want to follow Bill Gates. I said no.
Photo credit: Shutterstock