Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Apr 2010
    Thanked 0 Times in 0 Posts

    Managing pagefile.sys and hiberfil.sys on Win 7 laptop with SSD drive

    I have a Sony Vaio laptop with a 128GB SSD drive and 8GB of RAM. Great machine, but I am continually running into storage issues. I just downloaded SpaceSniffer to see if I could uncover hidden issues. Among the surprises were a pagefile.sys file that is 6.8GB and a hiberfil.sys file that is 5.7GB. Together they are occupying 10% of my total drive space.

    I have a rough understanding of what these files are for, but only rough. I read on one forum that pagefile.sys should be disabled on SSD drives. Is that true? If so, what is the best way to delete it? Or should I manually configure the min & max size of pagefile.sys to make it something smaller? Anything I can/should do to reduce the size of the hiberfil.sys file?

    On a related note, I also discovered that my c:\Windows folder is occupying 28.7GB. I knew Windows was a beat of an OS, but is it really this big? Or is this there likely some stuff in there that I don't really need?

    Thanks for any insights!

    Out of space in Phoenix,


  2. #2
    WS Lounge VIP
    Join Date
    Jun 2010
    Thanked 1,421 Times in 1,232 Posts
    It's not true that pagefile.sys should be disabled because you have a SSD. The page file is part of the Windows memory management system. With 8GB you may get away with disabling it, but it's not certain that you can run successfully without it. Probably the best way would be to specify a maximum smaller size for it and see how Windows behaves.

    To get rid f hyberfil.sys, you need to disable hibernation. Here is how to do it:

    You can try and run cleanmgr.exe (disk cleanup utility) to get rid of Windows updates leftovers and other stuff you no longer need. This will mean, however, that you won't be able to uninstall any of the already installed Windows updates.

    When running it, click the button to cleanup system files and then check everything you want. You will know how much you can save in disk space.


  3. #3
    Plutonium Lounger Medico's Avatar
    Join Date
    Dec 2009
    Thanked 937 Times in 856 Posts
    I run a batch file that includes Disk Cleanup on steroids. Just copy the attached into Notepad and save as a .bat file to your desktop. Now just run it.

    @Echo off
    cleanmgr /sageset:65535
    del /F /S /Q  "%systemroot%\temp\*.*"
    del /F /S /Q  "C:\AppData\Local\Microsoft\Windows\History\*.*"
    del /F /S /Q  "C:\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\*.*"
    del /F /S /Q  "C:\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5\*.*"
    del /F /S /Q  "C:\AppData\Local\Microsoft\Windows\Temporary Internet Files\Temporary Internet Files\Content.IE5\*.*"
    del /F /S /Q  "C:\AppData\Local\Microsoft\Windows\Temporary Internet Files\Temporary Internet Files\Low\Content.IE5\*.*"
    del /F /S /Q  "C:\Users\%UserName%\AppData\Local\Temp\*.*"
    del /F /S /Q  "C:\Temp\*.*"
    del /F /S /Q  "C:\Users\%UserName%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5\*.*
    del /F /S /Q  "C:\Users\%UserName%\AppData\Local\Microsoft\Windows\History\*.*
    ::Rem:  No need to duplicate the following section for each registered User
    del /F /S /Q  "%homepath%\Cookies\*.*"
    del /F /S /Q  "%homepath%\recent\*.*"
    del /F /S /Q  "%homepath%\Local Settings\cookies\*.*"
    del /F /S /Q  "%homepath%\Local Settings\History\*.*"
    del /F /S /Q  "%homepath%\Local Settings\Temp\*.*"
    del /F /S /Q  "%homepath%\Local Settings\Temporary Internet Files\Content.IE5\*.*"
    del /F /S /Q "C:\$Recycle.Bin.Bin\*.*" 
    del /F /S /Q "C:\Recycled\*.*"
    cleanmgr /sagerun:65535
    The sageset command (shown in red) only needs to be run the first time. To save a little time this one line can be deleted after running it as shown once.

    Note: This will also clean up a bunch of temp files that tend to grow over time. Also the hiberfil.sys file is quite large and if you do not avail yourself of hibernation it is not needed. I believe that simply disabling hibernation may eliminate the file.
    Last edited by Medico; 2013-12-07 at 16:12.
    Have a Great Day! Ted

    Sony Vaio Laptop, 2.53 GHz Duo Core Intel CPU, 8 GB RAM, 320 GB HD
    Win 8 Pro (64 Bit), IE 10 (64 Bit)

    Complete PC Specs: By Speccy

  4. #4
    Administrator satrow's Avatar
    Join Date
    Dec 2009
    Cardiff, UK
    Thanked 661 Times in 556 Posts
    Much depends on your actual usage

    Aim to keep ~25% SSD space free for good long-term performance, going below that briefly shouldn't be an issue.

    The paging file can be disabled as Windows will silently create a temporary one if it needs to; for BSOD dump collection purposes, there's a patch that allows for a dump to be created regardless of page file existence: Overall, I think I'd advise setting the paging file to a small (100MB?) minimum and 4092 maximum then checking the actual size in use during your heavier Windows sessions (Winkey+Pause/Break > Advanced ... ignore the Recommended size), if it's always 100MB, you're safe.

    Also consider reducing the amount of space used by System Restore, if you haven't already done so, I use 3-4% only, the default size is something like 12% of drive capacity.

    If your email is stored locally, empty the trash and compact the database regularly.

    Reducing the amount of space allowed for temp. Internet files might also help a little, do it for all browsers used, I'd suggest ~250MB (some browsers default to 1GB). If you use a metered Internet connection - don't clear this out before you head out onto the road - it'll lead to unnecessary downloads of rarely changed web page data from sites you frequently visit.

  5. #5
    New Lounger
    Join Date
    Apr 2010
    Thanked 0 Times in 0 Posts
    Thanks, everyone, for the great input! Each of your replies was helpful and appreciated!


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts