What is the Windows OS page file?
This file is a form of virtual memory.
When your memory RAM becomes full, Windows moves data from your memory RAM to your hard drive, placing it in the page file (also known as the swap file).
You never want your SQL Server to start paging.
SQL Server tends to go pear-shaped when its memory is paged to disk.
Optimal SQL Server Page File Size Settings
By default, the page file is auto-managed by Windows.
You don’t want to trust the management of page files to Windows, as it won’t do what is optimal for SQL Server.
The size of the page file depends on:
- the requirements of the system crash dump settings, and
- the peak or expected peak usage of the system’s commit charge.
Both considerations are unique to each system, even for identical systems.
The old rule of thumb (page file size = 1.5 or 2 times the RAM) makes no sense in modern systems.
The current logic is: the more RAM you have, the less you need a paging file.
So, how should you size your page file?
It depends on the specific workload and the type of server.
Having worked with various server configurations and applications, I’ve found that when sizing the page file, considering our application’s memory needs and crash dump settings is crucial.
I would say that a good point to start is to set an 8-12 GB size for Kernel Memory dump on the System with up to 256GB RAM.
How can I change the Windows file size?
You can configure the SQL Server page file by using System Properties as follows:
- Run sysdm.cpl
- Go to Advanced
- Select Settings under Performance
- Go to Advanced (again)
- Change under Virtual Memory
Note: Make sure to set SQL Server max memory settings correctly.
There are some best practices on how to configure this here.