Windows 7 process which changes pagefile size configuration?
I am working to debug an issue where my PC randomly freezes after being idle. At one point I had disabled my page file, but noted I was not getting crash dumps because of this. I am running an SSD, so I did not want to have all 32gb of ram made into a page file, so I configured my system as such:
However, after reboot, I see a large pagefile.sys, and when I return to the Virtual Memory configuration option, it is set to "Automatically manage paging file size for all drives"
I have yet to figure out the crashing issue, so I am not sure if it is related. However, I think its odd that Windows configures the pagefile how it wants without asking me. I also do not see any memory dumps or crash logs (only the power event when I manually kill the power), that seems like it may be related.
Windows 7 64 bit (Microsoft Windows [Version 6.1.7601])
Update info which may be useful:
- This does not appear to be related to the crashing, I had solved this a few months back with a bios firmware upgrade.
- I am using ASROCK Extreme Tuning Utility and the XFast RAM feature. Thoughout this whole time the option for storing the page file in the ram disk (I am not sure why this exists), but in this configuration I have the memory pagefile turned off. Windows should still be in control of the pagefile and any settings. I cannot think of any other programs which may affect this.
Windows may not have deleted the old pagefile.sys. Try to :
- set to "No paging file"
- reboot
- delete C:\pagefile.sys (hidden file, and permissions may need to be managed)
- reset to "Custom size"
- reboot
If the setting for the page-file is reset by some program, you could try using Process Monitor to do Boot time logging of all registry changes in order to identify the program that changes it. Just remember that this slows the boot process a lot.
The page-file settings are found in the registry at
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\
.
The value involved might be PagingFiles
, but you can easily check which one
by changing the Virtual Memory settings between System managed and Custom and
refreshing the display in regedit to see what changed.
With this information you can set up a filter in Process Monitor and identify the process that changes that value in the registry.
The page file is used chiefly for swapping-out programs when the RAM is full. Its use for the dump is only incidental - a convenient place for Windows to put crash data. Its size therefore should be at least as large as your RAM. You should verify if Windows does not allocate a larger file when the specified allocation is too small, which seems to me a reasonable built-in safeguard for Windows to employ.
Remark: If you have another drive in addition to the SSD, you could move the page file there so as not to reduce it too much.
Another remark: Modern SSDs are rated for many gigabytes per day for up to a decade, so you really should have no fear of some 32 MB reducing the life-time of your disk. SSD longevity is no longer an issue unless the SSD is old or of low quality.
For example, a test by AnandTech came up with the following results :
If for example the daily usage is only 5 GB written, the above lifespan should be multiplied by a factor of two. A modern SSD should last for the lifetime of the computer.
To use full-memory dumps in Windows, the pagefile must be the same size as the total RAM, or larger. In your case, that means it must be at least 32GB.
However, you could use "minidumps" which are significantly smaller.
Try this:
-
Change your pagefile settings back to "no paging file" and reboot so that Windows deletes pagefile.sys.
Note: Double-check that pagefile.sys was actually deleted after you reboot. To do this, use Windows Explorer to browse the system drive (usually C:) and look for pagefile.sys. You will probably have to go to
Tools > Folder Options > View > 'Show hidden files, folders, and drives' > Apply
to get it to show up (if it is there). If pagefile.sys is still there, delete it. Use the instructions at the bottom of this page to enable small memory dumps: Link
Set the initial and maximum pagefile size for the system drive (usually C:) to the "minimum allowed" size listed at the bottom of the Virtual Memory settings window (your first screen shot does not show the very bottom, but that is the window I am referring to). It should be pretty small; mine is 16MB for example.
Save the new Virtual Memory settings and reboot.