How to Optimize pagefile.sys and hiberfil.sys on Windows SSDs
Want to optimize your Windows SSD and free up disk space safely? In this practical guide we explain how to manage pagefile.sys and hiberfil.sys, two system files that take up disk space. Find out how to delete, move or reduce them to improve PC performance.
What are pagefile
. sys
and hiberfil.sys
? Explanation and Functions
The pagefile.sys and hiberfil.sys files are critical to the operation of Windows, but they can take up several GB on your SSD. Here's what you need to know:
pagefile.sys:
This is the paging file that Windows uses as virtual memory when physical RAM is exhausted.
Typical size: 1-4x the installed RAM (e.g., 8 GB RAM → 8-32 GB file).hiberfil.sys:
This is the hibernation file that saves the state of the PC before shutting down, allowing a quick reboot.
Typical size: 75% of installed RAM (e.g., 16 GB RAM → 12 GB file).
In normal cases machines, with so much RAM will never go to disk swap, being a slow process, so we can reduce the pagefile to smaller size (e.g. to 1GB) to reduce disk usage
How to Delete hiberfil.sys on Windows: Free Up SSD Space
On high-performance machines, booting is very fast and especially for desktop computers, there is not much use of suspend or hibernate
To free up space you can disable hibernation, this will remove hiberfil.sys
completely
For those who want to it is possible to do this from the command line:
- Open the Command Prompt as administrator.
- In the search section, type
cmd.exe
, this will show the application "Command Prompt" - Using the right button we can run as administrator "Command Prompt"
In the window that appears, type
powercfg.exe /hibernate off
- Restart the PC: the
hiberfil.sys
file will be deleted automatically.
Warning:
- You will lose the hibernation functionality.
- To reactivate it, use
powercfg.exe /hibernate on
.
Manage pagefile.sys
on SSD: Reduce or Move the File
The paging file also uses a lot of space, we have two alternatives to optimize pagefile.sys
Option 1: Reduce the size of pagefile.sys.
- Click on Start
- Right click on Computer
- Properties
- Advanced system settings (requires administrator user)
- on the Advanced tab we click on Settings under Performance
- in the new Advanced tab we choose in Virtual Memory / Change
- We select
C:
- We select Custom size.
- We enter the size in megabytes, for example 1024 (Megabytes) as initial and 2048 as maximum
- We click set and give the OK
- Let's restart
At startup the pagefile.sys
file will be recreated freeing up space that was previously used
Option 2: Move pagefile.sys
to another disk
- In the Virtual Memory interface, select the current SSD and click No paging file.
- Choose another disk (e.g., HDD) and set automatic size.
Benefits of Optimizing pagefile.sys and hiberfil.sys on SSDs
Optimizing these files offers real benefits:
✅ Free up space on SSD: Up to 20-30 GB more on small disks.
✅ Improve performance: Reduces the write load on the SSD, extending its lifetime.
✅ Less fragmentation: Paging file on HDD does not slow down SSD.
Frequently Asked Questions (FAQ).
❓ Is it safe to delete hiberfil.sys
?
Yes, but you will lose the hibernation functionality. Use sleep mode as an alternative.
❓ Can I completely disable pagefile.sys
?
No, it is not recommended. Windows uses it to handle system errors.
❓ What tools monitor disk usage?
Built-in tools such as Windows Defragment or third-party apps such as CrystalDiskInfo.
Final Tips.
To maximize results:
- Monitor SSD space with tools such as Windows Defrag.
- Do not disable
pagefile.sys
if you have less than 8 GB of RAM. - Update Windows regularly to optimize SSD management.