Page file\Hiberfile anomaly

teckneeculler

Member
Power User
VIP
Local time
2:29 AM
Messages
512
In my main W7 Ultimate desktop pc I've recently increased my ram to 32GB, mainly to cater to my irrational habit of keeping many tabs open.
But I've just now checked the contents of my 500GB SSD C drive (pending a possible attempt to drop a W10 version into a new partition) and I find that after allowing Windows to manage my pagefile, the space tied up has become huge, see pic.
Could I not trim this down to a reasonable level?
file.jpg
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
My build
OS
Win7 Ultimate SP1
CPU
Intel Core i5 9400 Coffee Lake 14nm
Motherboard
Asus Prime H310M-E R2.0 (LGA1151)
Memory
16G DDR4
Graphics Card(s)
NVidia GeForce GTX 960
Sound Card
Realtek High Definition Audio (mobo)
Monitor(s) Displays
Asus PA248 24" 16:10 format
Screen Resolution
1920x1200@59Hz
Hard Drives
1863GB Seagate ST2000DM
3726GB Seagate ST4000DM
1863GB Seagate ST2000DM
6TB Seagate
465GB NVMe Samsung SSD 970
PSU
750G2
Case
Tower
Cooling
Standard
Keyboard
USB
Mouse
USB
Internet Speed
920Mbs/480Mbs
Antivirus
Malwarebytes
Browser
Firefox
These are two separate things, the page file and the hibernation file, that are affected separately.

Let's start with the easy one, the hibernation file.
When hibernating, the entire RAM contents must be copied to disk (in order to restore them afterwards), so it needs to be up to your RAM size at worst. Since you've increased RAM, the hibernation file will increase accordingly. There is no way around this, as it's the requirement for hibernation. You either accept the disk footprint cost or disable hibernation althogeter.

Now for the page file.
Windows controls the page file on each drive by giving a minimum and a maximum amount of space allocated, and the actual value moves within those limits based on memory requirements. When you use "allow Windows to manage pagefile" what it really means is that Windows choses those limits.
The problem is that the algorithm for selecting those limits is horribly broken, chosing them to be some proportion of your physical RAM (at least according to some sources, citing the classic "pagefile should be 1.5 times your RAM"). So increasing RAM will result in an increase of the pagefile too.
Given that you've increased RAM, if you keep the same workload, you should be able to trim it without any problem.
But if you increase your RAM demands too (like you said as to "keep many tabs open"), then the increase may be justified as the bigger RAM is under more pressure too and consequently needs a bigger pagefile to support.

Nothing of what you've observed looks like an anomaly to me.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
Alejandro, thanks for the succinct explanation. I didn't know what the hiberfil file was for, but now, seeing as how I never hibernate my desktop computers, I can at least close down that system. Re the main pagefile, it seems I could limit that and see if that affects the speed of my system when I've opened say, 60-70 tabs. This would be maximum - usually I'll have only 20 or so pages tabbed.

EDIT:
Ok, I disabled hiberfil.sys thus:
Press Ctrl + Shift + Enter to open Command Prompt with admin privileges.
Select Yes if the User Account Control prompt appears.
Type powercfg.exe /hibernate off into the Command Prompt window and press Enter.
Close the Command Prompt window.

Then altered the pagefile thus:
Press Win + R to open Run.
Type and press Enter: sysdm.cpl
Advanced tab>Performance section: Click on Settings.
Navigate to the Advanced tab and click 'Change'.
Uncheck 'Automatically manage paging file size for all drives'.
Select the System drive and check 'Custom Size'.
I set the minimum to 800 and max to 2500 (without the letters MB)
Click on Set.
Restart Windows 7.

Rebooted, all seems OK for now. Cheers :-)
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
My build
OS
Win7 Ultimate SP1
CPU
Intel Core i5 9400 Coffee Lake 14nm
Motherboard
Asus Prime H310M-E R2.0 (LGA1151)
Memory
16G DDR4
Graphics Card(s)
NVidia GeForce GTX 960
Sound Card
Realtek High Definition Audio (mobo)
Monitor(s) Displays
Asus PA248 24" 16:10 format
Screen Resolution
1920x1200@59Hz
Hard Drives
1863GB Seagate ST2000DM
3726GB Seagate ST4000DM
1863GB Seagate ST2000DM
6TB Seagate
465GB NVMe Samsung SSD 970
PSU
750G2
Case
Tower
Cooling
Standard
Keyboard
USB
Mouse
USB
Internet Speed
920Mbs/480Mbs
Antivirus
Malwarebytes
Browser
Firefox
Back
Top