How I Freed Up 12 Gigabytes Of Hard Disk Space In Windows 7 - gHacks Tech News

How I Freed Up 12 Gigabytes Of Hard Disk Space In Windows 7

I built a new computer recently that uses Windows 7 Professional 64-bit as its operating system and a very fast Intel Solid State Drive with 80 Gigabytes of storage space as the primary hard disk.

More than half of the hard disk was filled with data according to Windows 7 shortly after the installation of the operating system and some necessary software programs.

That was a lot and quite worrying at first as I had plans to install some bigger applications and games on that drive as well without breaking the 20% rule which suggests filling no more than 80% of the hard drive with data to avoid performance impacts.

I decided to run a hard disk analyzer for a visual display of the files and folders that use most of the space on the hard drive. Disk Space Fan was my choice but any hard disk analyzer, e.g. WizTree, will do.

Findings

I noticed that two files that were using 14 Gigabytes of space together: hiberfil.sys with 6 Gigabytes and pagefile.sys with 8 Gigabytes. Hiberfil.sys is used for hibernation, a feature that I'm not using at all while pagefile.sys was the data that the Windows set the pagefile to which is used for disk caching purposes.

Eight Gigabyte sounded a lot considering that the computer had eight Gigabytes of computer memory installed.

I therefore decided to disable hibernation completely to free up the six Gigabytes it was using, and reduce the pagefile size from eight Gigabytes to a maximum of two. This freed up 12 Gigabytes of hard disk space on a 80 Gigabyte hard drive, not bad I think.

Disabling Hibernation

disable hibernation

The easiest way to do this is to open an elevated command prompt (by right-clicking the cmd tool in the start menu and selecting the run as administrator option). The command to turn off hibernation in Windows is powercfg.exe -h off.

A restart is required for the changes to take effect. Windows will remove hiberfil.sys from the system which frees up the allocated disk space.

Please note that Windows does not display a confirmation when you run the command. You can turn it on at a later point in time with the command powercfg -h on.

The only downside of turning off hibernation is that the system start may take longer, and of course, that you can't use hibernation anymore.

Reducing the size of the pagefile

Windows uses the pagefile for caching purposes even if enough RAM is available.

Note: If you reduce the pagefile below the installed amount of RAM, Windows may not be able to create certain memory dumps anymore.

The pagefile can be controlled in the Windows control panel. Use the shortcut Windows-Pause to open the System Control Panel. Select Advanced System Settings, and then on the settings button under performance.

Last but not least, switch to the advanced tab when the Performance Options window opens. Windows lists the total paging file size for all drives there. Click on change to configure the feature in detail.

windows pagefile

The configuration window lists all storage devices and the page file for each of them. First thing you may need to do is disable the automated mode that Windows uses by default.

Once done, select a drive and pick one of the following options:

  • Disable the paging file for the drive.
  • Set a custom size with initial and maximum values in Megabyte.
  • Let Windows handle the page file size automatically.

While you may not want to turn off the pagefile for the primary hard drive, you could consider turning it off for other drives. Also, you could reduce the size of the page file to free up disk space.

The two little configuration changes freed up 12 Gigabytes of storage space on the hard drive allowing me to install the applications that I wanted without breaking the 20% rule. Do you have additional tips for saving up space on the primary partition? Let us hear them in the comments.

Update: Please note that you may use the methods in newer versions of the Windows operating system as well.

Related articles

Summary
How I Freed Up 12 Gigabytes Of Hard Disk Space In Windows 7
Article Name
How I Freed Up 12 Gigabytes Of Hard Disk Space In Windows 7
Description
Find out how to free up disk space on the primary Windows partition by making two changes to the default configuration of the operating system.
Author
Publisher
Ghacks Technology News
Logo




  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. Hartza said on March 4, 2010 at 2:17 pm
      Reply

      I have almost same configuration, first I run win7 without pagefile, but some games required page file so now I have it 128mb. I have decoded digital hd camera videos 5gb and it works without any problems..

    2. Mike said on March 4, 2010 at 3:31 pm
      Reply
    3. ALeX said on March 4, 2010 at 3:34 pm
      Reply

      Generally, the rule is to have the pagefile file 1.5 times your RAM. The thing is that the more RAM you have the less you need a pagefile (unless you constantly push the Ram to it’s limits..). I think you should be fine with 1gb.
      Hibernations is a no-brainer, if you don’t use it disable it…

    4. beachbuoy said on March 4, 2010 at 4:10 pm
      Reply

      You are misguided in directing your focus on reducing the size of the pagefile and eliminatging the hiberfil file. Your focus should be on getting a larger hard drive. Or, better yet, add a second hard drive, a standard 7200 RPM hard drive, to the system an put the pagefile (a large one) on the second drive. Placing the pagfile and hiberfil file on the second drive will improve overall system performance and save even more space on that puny 80 GB solid state drive. Don’t penalize Windows 7 because just because you didn’t put enough storage on your new computer.

    5. tuna said on March 4, 2010 at 6:02 pm
      Reply

      You can refrain from losing up to another 8GB by reducing the Recycle Bin size. Default 10% is overkill these days.

    6. Ken said on March 4, 2010 at 6:05 pm
      Reply

      Hiberfil is obviously only required if you want to be able to hibernate your system. On a system with a space constraint it is an easy delete.

      However, your comment regarding pagefile.sys being used for “disk caching” is incorrect. It is actually used as an extension of your RAM. Operating systems move inactive RAM pages to this swap file, freeing up more of the physical ram for applications that need it.

      Current best practices are to leave the management of the swapfile size to the operating system. By limiting it as you have, you are at risk if the system ever needs more memory than you have allocated.

    7. matt said on March 4, 2010 at 8:31 pm
      Reply

      I have to agree with ken, the 1.5 rule is a hangover from the nt days (though its use was arguable in xp)

    8. Jasray said on March 4, 2010 at 10:42 pm
      Reply

      May be best to read Mark Russinovich’s Blog on the subject in order to understand what happens when changing pagefile size:

      How Big Should I Make the Paging File?

      http://blogs.technet.com/markrussinovich/archive/2008/11/17/3155406.aspx

    9. Tony said on March 5, 2010 at 4:50 am
      Reply

      Your pagefile shouldn’t be on the same drive as your operating system, and even with Windows 7 should still be 1-1.5 x ram.

    10. Conditioned said on March 5, 2010 at 8:20 am
      Reply

      Well, in most other os´s I have dealth with the ramsize + a little is recommended so you can do an analysis in case of core dumb/bsod.

    11. Ani said on March 5, 2010 at 12:17 pm
      Reply

      Look, i have reading a lot regarding Win7 from a long time since RTM & also hav being using it. i am ‘geek’ kind of user.

      Win7 is a totally revamped OS whose system policies has been very much different for any older windows OS. many things has been optimised for win7 only. it is hiighly recommended not to tweak pagefile area unless otherwise. win7 uses highly aggresive usage policy for pagefile & memory management. it is more efficient than older OSes. however is u hav to do then dont make it so low. ur system may get unstable in heavy load condition & ur overall performance will slow down.

      Memory management algorithm of Win7 is somewhat rocket-science. dont mess with it. and dont use uninitiated suggestions & old theories wont work..

      Thanx

    12. mamac said on March 7, 2010 at 2:58 pm
      Reply

      i have just saved 70gb by deleting restore points, 500 gb hdd, vista

    13. someguy said on March 15, 2010 at 9:10 pm
      Reply

      Ani is retarded. The author is talking about SOLID STATE DRIVES. There is no reason not to make these tweaks as the access time on solid state drives is much faster.

      Recycle bin trick… great idea. I knew about it… but never really thought about it.

      1. Ani said on March 16, 2010 at 6:56 pm
        Reply

        hard drive technology has nothing to do with OS system management.

        its true that SSD are much faster than Magnetic, but to yield more free space SSD is no advantage. u need a bigger disk. OS [win7] will need & take space as required by default irrespective of disk technology.

        and yes recycle bin tweak is ok, but its not a tweak really. recycleBin space allocation is not static but dynamic. it is unlike pagefile which pre-allocates give size. recycleBin fills up space as things are deleted. its like a threshold.

        grow up, learn more.

    14. Mark said on May 4, 2011 at 6:07 pm
      Reply

      Everyone keeps suggesting to disable or reduce the size of pagefile if you are using an SSD but why not just move the entire pagefile to another mechanical HDD? Problem solved. I am sure those who use an SSD for the boot drive also use a secondary mechanical drive to store all their files.

      The only problem I see is the hiberfil.sys file as it cannot be moved but at the same time disabling it is not an option for everyone. I usually encode videos or run video rendering jobs while I am away from the computer, leaving it unattended and if power fails when I am not around, my UPS is set to hibernate the PC instead of shutting down so that I can continue the encoding from where it left off once power returns. So hiberfil.sys is indispensable for me.

      1. Martin Brinkmann said on May 4, 2011 at 6:13 pm
        Reply

        Mark this becomes less of a issue with every new generation of SSD. They get bigger and become better at reading and writing to the drive. Moving the pagefile to another drive may look like a good idea, but it goes along with a decrease in speed, obviously unless the other drive is a very fast drive as well.

    15. Mark said on May 4, 2011 at 6:58 pm
      Reply

      There is slight performance decrease if you move the pagefile to a mechanical drive but not something that affects real world performance unless you have less than 3GB RAM and the OS is forced to constantly read and write from/to the pagefile.

      At the end of the day, those who have enough money to buy an SSD can easily afford to buy 6-8 GB RAM which leaves the OS to use very little pagefile.

    16. M Azeem Sarwar said on October 15, 2017 at 4:57 pm
      Reply

      Thanks a lot dearie… I freed up 4.6 GB on my detachable tablet pc that merely contained 23 GB usable space on C:.

    Leave a Reply