Virtual Memory Paging File - Change

How to Change or Move Virtual Memory Paging File in Vista, Windows 7, and Windows 8

information   Information
If your computer lacks the random access memory (RAM) needed to run a program or operation, Windows uses virtual memory to compensate. Virtual memory combines your computer’s RAM with temporary space on your hard drive. When RAM runs low, virtual memory moves data from RAM to a space called a paging file. Moving data to and from the paging file frees up the RAM to complete its work.

Windows manages the virtual memory size automatically by default. This will show you how to manually change the size of virtual memory if the default size is not enough for your needs, and how to change what drive is used for the paging file.

For more detailed information about the page file, see:

Mark's Blog : Pushing the Limits of Windows: Virtual Memory

and

The Pagefile Done Right! | Citrix Blogs

For more information about the new swap file in Windows 8, see:

Windows 8 / Windows Server 2012: The New Swap File - Ask the Performance Team - Site Home - TechNet Blogs

Note   Note
The more RAM your computer has, the better your programs will generally run performance wise since Windows may not have to use virtual memory as often. If a lack of RAM is slowing your computer, you might be tempted to increase virtual memory to compensate. However, your computer can read data from RAM much more quickly than from a hard disk, so adding RAM is a better solution. Plus, Windows usually does a great job at managing virtual memory for you.

The Virtual Memory Paging File is hidden protected operating system file at this location: C:\pagefile.sys

Tip   Tip
To improve the performance of Windows, you can place the page file on a second physical hard drive instead of the same C: drive that Windows is on. Doing this allows Windows to dump temp junk onto one drive while not having to interrupt reads or writes on the other drive.

You will not gain any performance by moving the page file to just another partition on the same HDD that Windows is installed on.


To Reset the Page File:

Turn the page file off and on for the drive it's on with restarting the computer after each time.

warning   Warning
If you receive any type of low memory error message like below, then you need to either add more RAM or increase the size of the page file so that you can run the programs on your computer.

I would advise to not turn off the page file even if you have a lot of RAM installed. Some programs will still require using the page file to run properly.

Low_Memory_Error.png





Here's How:
NOTE:
You will need to be logged in as an administrator to be able to modify the page file.
1. Open the Start Menu.​
A) Right click on the Computer button and click on Properties.​
B) Go to step 3.​

OR
2. Open the Control Panel (Classic View - Vista or Icons view - Windows 7).​
A) Click on the System icon.​

3. Click on Advanced system settings. (See screenshot below)​
NOTE: While your here, note how much Memory (RAM) you have installed under the System section.​
System.jpg

4. If prompted by UAC, then click on Continue (Vista) or Yes (Windows 7).​
5. In the Advanced tab, click on the Settings button in the Performance section. (See screenshot below)​
Advanced_System_Properties.jpg

6. Click on the Advanced tab. (See screenshot below)​
7. Under Virtual memory, click on the Change button.​
Advanced_Performance_Options.jpg

8. To Turn Off Automatic Virtual Memory Management for All Drives
A) Uncheck the Automatically manage paging file size for all drives box. (See screenshot below)​
NOTE: This turns off automatic virtual memory management by Windows so you can manually change the drive and size to what you want instead.​
Automatic_Yes_No.jpg

B) Go to step 10.​

9. To Turn On Automatic Virtual Memory Management for All Drives
A) If one of the listed drives (ex: C: ) is set as System Managed already, then check the Automatically manage paging file size for all drives box. Click on OK and go to step 17. (See screenshot below)​
Automatic_Yes_No2.jpg

OR
B) If one of the listed drives is not set as System Managed already, then uncheck the Automatically manage paging file size for all drives box and do step 10 and step 12.​

10. To Select a Drive to Add or Change the Paging File
NOTE: By default, Windows uses the same drive letter that it is installed on. This system drive is usually the C: drive.​
WARNING: If you have another internal NTFS drive listed and want to use it instead, then make sure it is as fast or faster than the drive Windows is installed on. Make sure you only use a separate hard drive, not another partition on the same hard drive as Windows is installed on. This will cause a decrease in performance if you do. You cannot move the page file to an external or removable drive.
A) Click on a listed hard drive you want to change or add a paging file to for Windows to use. (See screenshot below step 9A)​

11. To Have a Custom Paging File Size for the Selected Drive
NOTE: You would do this if you do not want to use the automatic system managed size by Windows.​
A) Dot Custom size. (See screenshots below step 15)​
B) Type in a size for the Initial size in MB (1 GB = 1024 MB).​
NOTE: This will be the minimum size.​
C) Type in a size for the Maximum size you want in MB (1 GB = 1024 MB).​
D) Go to step 14.​

12. To Have a System Managed Paging File Size for the Selected Drive
NOTE: This will let Windows automatically manage the size of the paging file for this selected drive as needed.​
A) Dot System managed size. (See screenshots below step 9)​
B) Go to step 14.​

13. To Remove the Paging File from the Selected Drive
WARNING: Make sure that you have at least one drive selected to have a paging file on. Otherwise your computer may slow down dramatically.​
NOTE: You would usually only do this if you have more than one drive that you already added a paging file to from step 11 above.
A) Dot No paging file. (See screenshots below step 15)​

14. Click the Set button. (See left screenshot below)​
NOTE: Repeat steps 10 to 14 if you would like to make more changes to the paging file, or add a paging file to another listed drive.​
15. Click on OK. (See right screenshot below)​
Custom.jpgCustom2.jpg

16. If the Paging File Size was Decreased
NOTE: If the paging file was decreased, the computer will need to be restarted before the changes can be applied. You will not see this if you increased the size.​
A) Click OK. (See screenshot below)​
Decrease_OK.jpg


17. Click on OK. (See screenshot below step 7)​
18. Click on OK. (See screenshot below step 5)​
19. If the Paging File Size was Decreased
NOTE: You will not see this if you increased the size.​
A) Click Restart Now. (See screenshot below)​
NOTE: Be sure to save and close anything open first. This will restart the computer immediately.​
Restart_Now.jpg


That's it,
Shawn



 

Attachments

  • thumb_System_Configurations.png
    thumb_System_Configurations.png
    11 KB · Views: 458
Last edited by a moderator:
Hello,

I recently tried to reduce my page file, to the point of turning it right off.

It started at 8.5GB Automatic. according to Performance tab in task manager.

And with it right off, the file was 3.9 GB


I have 4GB of ram.

Is that normal? Shouldn't it be Zero when i turn the paging right off?

Just for fun, i tried to over load my ram... I ran thunderbird, Firefox (with 5 tabs, including a running youtube video), Mediaplayer song, Real Player movie, MS Flight Sim X (in windowed mode while flying), Acrobat and a large PDF, and Photoshop with a 200Mb photo.

I only used 2.6 GB of my 4 GB of ram. At idle it sits at 1.3GB.

This was with my page file set to 210 MB min, 800 Max. Yet the Performance tab still showed a 4GB page file....?


I don't think I want to run with paging right off, but I just want to be sure its working properly and showing the correct size.

I think 8gb is way to big considering how well the computer handled the processing load i put it through last night.

Thanks

Corey
 
Last edited:

My Computer

System One

  • Manufacturer/Model
    Acer Gemstone Blue: 6920G
    CPU
    Core 2 Duo T5750 2.0GHz
    Memory
    4 GB DDR2
    Graphics card(s)
    nVidia 9500M GS
    Hard Drives
    300GB
Hi Corey,

Did you use step 13 to remove the paging file, and restart afterwards?

I would recommend to have a paging file though to avoid potentially getting the "Out of Memory" error followed by a BSOD.
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
Hi Brink,

Yes, that's the way I tried it.

Before that point though, when I was simply trying to reduce it, I found that the Total page file as shown under Performance Tab did in fact drop by the minimum amount I had selected, but never equaled that minimum amount.

When I simply tried to tick off "No Page File" and restarted, i found it went down to a minimum of ~3.9GB as mentioned in my last post. So it seems to be off by ~3.9GB.


Would Changing that registry key to tell it to clear at shutdown help to "reset" the file size? I haven't gotten around to trying i quite yet.


Edit: As a side note: When i navigated to the file itself on C: after setting it to No Page File with restart, I moused over it and it showed the size as my previous minimum setting of 210Mb....

Its currently set to 250 as seen below.

pagefile.jpg



Thanks

Corey
 
Last edited:

My Computer

System One

  • Manufacturer/Model
    Acer Gemstone Blue: 6920G
    CPU
    Core 2 Duo T5750 2.0GHz
    Memory
    4 GB DDR2
    Graphics card(s)
    nVidia 9500M GS
    Hard Drives
    300GB
Update: Just tried to clear the page file with it set at 250mb

Restarted, no change. My boot time didn't even budge, still a solid 54 seconds.

So i tried it again, now with the page file set to OFF, and after the performance tab still shows an available page file of ~3.9GB, with ~1.6GB being used.

To confirm its off, the registry also shows No page file.

:confused:
 

My Computer

System One

  • Manufacturer/Model
    Acer Gemstone Blue: 6920G
    CPU
    Core 2 Duo T5750 2.0GHz
    Memory
    4 GB DDR2
    Graphics card(s)
    nVidia 9500M GS
    Hard Drives
    300GB
Corey,

My guess is that it may be using the RAM as a page file instead. I turned off the page file on a Vista in a VM and this is what I'm seeing as well.

Page.jpg
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
I heard that page is written to even before the physical ram fills up, and consequently it slows down and causes wear and tear on harddrive, and that with 4 gigs or more of ram, it is advised to completely disable pagefile. I understand this has a higher risk of computer crashing but since I have 4 gigs I would like to disable pagefile if I get less wear on hardrive and faster performance. Any thoughts?
 

My Computer

I heard that page is written to even before the physical ram fills up, and consequently it slows down and causes wear and tear on harddrive, and that with 4 gigs or more of ram, it is advised to completely disable pagefile. I understand this has a higher risk of computer crashing but since I have 4 gigs I would like to disable pagefile if I get less wear on hardrive and faster performance. Any thoughts?

I read a few places that many programs will write temp files if paging is disabled or not. And, it is better to have it all in the pagefile with a min/ max of the same size.

Buy a fast hard drive.
 

My Computer

What you heard is incorrect.

The availability of one or more paging files does not slow the system down (that would be a bug in the OS), and it has at least two substantial benefits: the provision of additional overhead should memory pressure reach the commit limit with just RAM, and the ability to generate memory dumps for troubleshooting purposes.

4GB is not little, but it's not exactly monstrous nowadays either. Many people can run just fine with 4GB and no pagefiles, but there's utterly no point whatsoever and the additional risk of a crash makes it unjustified.
 

My Computer

I heard that page is written to even before the physical ram fills up, and consequently it slows down and causes wear and tear on harddrive, and that with 4 gigs or more of ram, it is advised to completely disable pagefile. I understand this has a higher risk of computer crashing but since I have 4 gigs I would like to disable pagefile if I get less wear on hardrive and faster performance. Any thoughts?

I read an article on Tom's Hardware advocating no pagefile. Since I had 12 GBs of memory I gave it a shot. I found no performance increase, and, reading more on it, I went back to the full recommended pagefile.

I also tested the pagefile on different drives with no seen benefit. But with the added complication with backups. I have tested and read that the pagefile is best at a static size.

I am not using one on my main system. but, ReadyBoost can increase benchmarks like PCMark05.

What I would be concerned with is the needless Indexing of you drives. And the Prefech continually making notes on what you are not going to not do again. Oh, and Media Player tracking and noting all your activity and files. What a waste.
 
Last edited:

My Computer

Well my pagefile wasn't set by default.
Set it to automatic, rebooted and now everything makes sense. Before I was using the pagefile and Vista was caching over 8GB's of RAM and only around 2GB's free. In general, Vista was lagging but it managed to run on 12GB's very well.
Now what it seemed fine for a bit is back.
I really don't know about these 1TB drives. Can't distinguish anymore if the micro-stattering on VIsta is caused by Microsoft's poor driver support for high volume drives or it is part of the firmware? I thought that the pagefile was a part of this issue but it's not. I've had smaller drives (200/500GB on RAID 0) & no micro-stattering occured even when prior to implementing performance options.
Regrettably, I'm starting to run out of ideas and overall support on the internet :(
Chuck, did you purchase any 1TB drives recently?
Cheers to everyone with the enlightful comments!
 

My Computer

System One

  • CPU
    i7 965
    Motherboard
    Asus Rampage II Extreme
    Memory
    Corsair TR3X6G1333C9 x 2
    Graphics card(s)
    Gigabyte GTX295 SLI
    Sound Card
    SB X-Fi MB
    Monitor(s) Displays
    Samsung Syncmaster T240
    Screen Resolution
    1900x1200
    Hard Drives
    2x1TB Western Digital Black (Raid 0), 150GB WD Raptor
    PSU
    1200W Thermaltake Toughpower
    Case
    Lian Li PC80P
    Cooling
    Chassis - 3 Front 140mm, Top 140mm, Rear 140mm
    Mouse
    Logitech MX Revolution
    Other Info
    Fold up beast by me :-)
Well my pagefile wasn't set by default.
Set it to automatic, rebooted and now everything makes sense. Before I was using the pagefile and Vista was caching over 8GB's of RAM and only around 2GB's free. In general, Vista was lagging but it managed to run on 12GB's very well.
Now what it seemed fine for a bit is back.
I really don't know about these 1TB drives. Can't distinguish anymore if the micro-stattering on VIsta is caused by Microsoft's poor driver support for high volume drives or it is part of the firmware? I thought that the pagefile was a part of this issue but it's not. I've had smaller drives (200/500GB on RAID 0) & no micro-stattering occured even when prior to implementing performance options.
Regrettably, I'm starting to run out of ideas and overall support on the internet :(
Chuck, did you purchase any 1TB drives recently?
Cheers to everyone with the enlightful comments!

My 1TB drive is a little on the older side. But, if I was going to buy a 1TB hard drive, right now, I would get the Western Digital Caviar Black WD1001FALS 1TB.

http://www.wdc.com/en/products/products.asp?driveid=488

HD-sys_01
 

My Computer

I have the WD Caviar Black 1TB in Raid 0. Is there anything I should know about these drives? Do you happen to know the optimal raid 0 strip size? I'm beginning to speculate that 128kb is not ideal but anything lower.
What do you mean by pagefile being static?
I don't understand how the hell Vista manages the pagefile if over a period of time it caches over 90% of the ram. How should I manually adjust so that the caching rational?
 

My Computer

System One

  • CPU
    i7 965
    Motherboard
    Asus Rampage II Extreme
    Memory
    Corsair TR3X6G1333C9 x 2
    Graphics card(s)
    Gigabyte GTX295 SLI
    Sound Card
    SB X-Fi MB
    Monitor(s) Displays
    Samsung Syncmaster T240
    Screen Resolution
    1900x1200
    Hard Drives
    2x1TB Western Digital Black (Raid 0), 150GB WD Raptor
    PSU
    1200W Thermaltake Toughpower
    Case
    Lian Li PC80P
    Cooling
    Chassis - 3 Front 140mm, Top 140mm, Rear 140mm
    Mouse
    Logitech MX Revolution
    Other Info
    Fold up beast by me :-)
You probably ought to start at least one new thread for these questions.

The pagefile is used in conjunction with RAM - it does not "cache RAM". In most situations, leaving the pagefile settings at system defaults is the best thing to do.
 

My Computer

I have the WD Caviar Black 1TB in Raid 0. Is there anything I should know about these drives? Do you happen to know the optimal raid 0 strip size? I'm beginning to speculate that 128kb is not ideal but anything lower.
What do you mean by pagefile being static?
I don't understand how the hell Vista manages the pagefile if over a period of time it caches over 90% of the ram. How should I manually adjust so that the caching rational?

I always use 128KB strip. I went 64KB one time and had lower performance.

Static as in One Size for both Min/ Max. Many techs, MVPs etc suggest a single size pagefile (for several different reason). You take the recommended size for both the Min and the Max.

This is how I have my system set up:

PagePost.PNG
 

My Computer

You almost certainly don't need a 20GB pagefile. The "18GB recommended" is just the system applying its 1.5xRAM logic. Odds are that with 12GB of RAM your commit charge is way, way less than 32GB (12GB RAM + 20GB pagefile).

What you would benefit from is splitting up the pagefiles onto the other spindles as well. At least one fragment on E: ("Barracuda"), and another on F: if that's a separate drive. The OS has the ability to pick the least busy drive at any point in time, and hence to gain the fastest possible response out of its pagefile setup.
 

My Computer

You almost certainly don't need a 20GB pagefile. The "18GB recommended" is just the system applying its 1.5xRAM logic. Odds are that with 12GB of RAM your commit charge is way, way less than 32GB (12GB RAM + 20GB pagefile).

What you would benefit from is splitting up the pagefiles onto the other spindles as well. At least one fragment on E: ("Barracuda"), and another on F: if that's a separate drive. The OS has the ability to pick the least busy drive at any point in time, and hence to gain the fastest possible response out of its pagefile setup.

You almost certainly don't need a 20GB pagefile

I know that

-----

I have tested the pagefile on a separate drive and have not found any performance increase. And, it complicates some full image backups.

My C: Drive

HDTune_032709.png
 

My Computer

How should one calculate the min/max values? I have 12GB's of ram and 2TB's hard drive.
Why is 18GB's recommended?
 

My Computer

System One

  • CPU
    i7 965
    Motherboard
    Asus Rampage II Extreme
    Memory
    Corsair TR3X6G1333C9 x 2
    Graphics card(s)
    Gigabyte GTX295 SLI
    Sound Card
    SB X-Fi MB
    Monitor(s) Displays
    Samsung Syncmaster T240
    Screen Resolution
    1900x1200
    Hard Drives
    2x1TB Western Digital Black (Raid 0), 150GB WD Raptor
    PSU
    1200W Thermaltake Toughpower
    Case
    Lian Li PC80P
    Cooling
    Chassis - 3 Front 140mm, Top 140mm, Rear 140mm
    Mouse
    Logitech MX Revolution
    Other Info
    Fold up beast by me :-)
How should one calculate the min/max values? I have 12GB's of ram and 2TB's hard drive.
Why is 18GB's recommended?

I would use the recommended size. But, before you do it, remove the pagefile to a diffident drive or remove it all together. Download the trial Perfect Disk and compact your data. Run maybe 2 times in a row. Then, set the pagefile on your c drive again. After, create a few restore points because they probably will all be deleted.

This is just my opinion. Do this at your own risk. If you don't understand something, keep it at default.
 

My Computer

I am sorry i am bit confused here:) Can anybody please help me with what is the best option for me?

I got 4GRam, so what should I do exactly to improve for example the amount of ram used for the game i use for the lineage2 , online game, which is located i the D: disk?
Tnx.
 

My Computer

System One

  • Manufacturer/Model
    SP1
Hello Denise,

You would just want to keep the default settings for the page file for this. No need to do anything with the page file for the game. :)

Hope this helps,
Shawn
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
Back
Top