How To Optimize The Paging File In Windows (2024)

Computers these days are pretty fast and the latest operating systems are pretty good at keeping them that way. Gone are the days of the annual “format and reinstall” ritual most tech-savvy Windows users performed. That’s not to say your fresh new installation of Windows 10 will remain snappy forever though.

Some users may notice that if they alt-tab from a video game or swap between heavy-hitting apps such as video editors or 100-tab browser windows, things grind to a halt. This is a sign that you’ve run out of the ultra-fast Random Access Memory installed in your PC, and Windows now has to rely on your much slower secondary storage as an overflow.

Table of Contents

    How To Optimize The Paging File In Windows (1)

    The slowdown you’re witnessing occurs when Windows swaps information from your RAM chips with an overflow area known as the “page file”.

    You can improve performance when you optimize the paging file in Windows 10.

    What Is a “Paging File” Anyway?

    Before we get to how you can optimize the paging file, let’s dig a little deeper into what the file is. If you’ve set up Windows explorer to show you hidden system files, you’ll find it at the root of your C drive with the name “pagefile.sys”. Assuming that your PC has the default configuration.

    The pagefile has a reserved size and is divided into “pages” internally. This is the data format that RAM data is stored in for any operating system that uses RAM paging as a memory management method.

    “Pages” are blocks of information that each have a unique address and exactly the same size. The software on your computer keeps a record of which pages have its information, so when it wants that information, it requests the page from Windows.

    How To Optimize The Paging File In Windows (2)

    When your apps need more RAM than your computer physically has, it needs to use “virtual memory” which is exactly what the page file is. From the application’s point of view, it’s just more RAM. The only difference is that reading information from a hard drive is much, much slower than RAM. Which is rather the point of having RAM!

    So if the page file is so slow, why even have it? Without a page file, your applications will crash or seriously malfunction, as any additional information that needs to be stored in RAM will simply be lost. Having a bit of slowdown to handle peak RAM demands is better than having the system go down as a whole.

    OK, But Why Optimize The Paging File?

    RAM paging is one of the oldest memory management methods in existence. Mainframe computers from the 1960s were already using it! It made a lot of sense when RAM was measured in dozens of kilobytes. It still made sense when 640KB of memory was “enough for anyone”.

    These days most mainstream computers have way more RAM than the user is likely to need unless they routinely run memory-hungry applications. If you’re always running out of RAM because of your daily user case, a far better strategy to solve the issue is adding more RAM to your system.

    How To Optimize The Paging File In Windows (3)

    Like most computer components in modern times, RAM is relatively cheap!

    Given that your computer has the right amount of RAM, there may still come a day when something makes RAM paging necessary. At which time you’ll be thankful you had the presence of mind to make sure paging takes no longer than necessary.

    General Tips To Improve Paging Performance

    Apart from tweaking Windows’ own management settings, there are a few things you can do to improve the performance of RAM paging when it happens. One of the most common pieces of advice is to set your page file to a different drive than your operating system drive.

    The thing is, most new computers have a solid state drive (SSD) as their primary disk these days. While SSDs using the SATA interface still have to queue read and write requests sequentially, they are orders of magnitude faster than mechanical drives with spinning platters.

    The logic behind this makes sense, since hard drives have to queue requests for reads and writes. The read/write heads have to physically travel to different parts of the disk platter where data is stored. So if Windows is trying to swap information from your page file and also trying to use the disk for other purposes it will all slow down to a crawl. If you put your page file on a separate hard drive, then this problem goes away.

    How To Optimize The Paging File In Windows (4)

    So if you have two SATA SSDs in your computer, then it still makes sense to put your page file on the secondary drive. If you have a main drive that uses the NVMe over PCIe interface however, you gain nothing by moving the page file That’s because NVMe over PCIe is parallel, which means read and write requests are handled simultaneously.

    On mechanical hard drives, fragmentation can also be an issue. Files are not stored continuously, but written into any available gaps left by deleted files. This means that over time as files are written and deleted, a specific file might exist in bits and pieces all over the drive.

    If your page file is physically scattered all over the disk platter, it takes longer for the drive heads to put it all together. On solid state drives, this is a non-issue. If you are using a mechanical drive, creating a dedicated partition after first defragmenting the drive in question can be a good way around this. By putting the page file on a defragmented partition, you’ll ensure all the data is physically in the same location.

    How To Optimize Your Paging File In Windows 10

    Now that you have a good understanding of the context and rules to optimize the paging file, it’s time to actually dig into the settings themselves. It’s up to you to decide what specific settings to use based on your specific configuration.

    • First, open the start menu and then type performance into the search bar.
    • Look for Adjust the appearance and performance of Windows under the settings category as you can see in the screenshot below.
    How To Optimize The Paging File In Windows (5)
    • The Performance Options window should now open. Switch to the advanced tab.
    How To Optimize The Paging File In Windows (6)
    • With the Advanced tab open, click on Change under the Virtual memory section.
    How To Optimize The Paging File In Windows (7)
    • The Virtual Memory window will now open. All of the options are greyed out by default. So first we have to uncheck Automatically manage paging file size for all drives.
    How To Optimize The Paging File In Windows (8)
    • Now you’ll see the following options open up for you to change.
    How To Optimize The Paging File In Windows (9)
    • Each drive’s settings can be managed independently. Click on the desired drive in the window above to change its specific settings. Logical partitions will also show up as independent drives.
    • Select custom size to specify your own minimum and maximum paging file size. Select No Paging File if you don’t want a particular drive to have one at all.
    • The default automatic behavior is to have a minimum size 1.5 times the amount of actual RAM. We don’t recommend you choose a minimum size below this. Once you have set a particular drive the way you like it, remember to click Set to lock those choices in.

    How To Optimize Your Paging File In Older Versions Of Windows

    The way in which virtual memory is tweaked and managed on older versions of Windows is virtually identical to how it works on Windows 10. Specifically, Windows 7,8 and 8.1 still have exactly the same virtual memory interface.

    We aren’t going to include anything older than Windows 7 in this discussion since there should be no extant machines still running these unsupported operating systems anymore.

    The process is identical to the Windows 10 steps outlined above from the point where you have reached the Performance Options window. However, getting there is a little different.

    • Go to Start, then the Control Panel.
    • Once there, open System. Then click on Advanced System Settings.
    • Under the Advanced tab of the System Properties window, click on Settings.
    How To Optimize The Paging File In Windows (10)

    From here you can follow the same instructions as above. If you are running Windows 7, consider upgrading as soon as possible. Regular support for Windows 7 ended in 2015 and extended support ends early in 2020.

    Paging Dr. Performance

    How To Optimize The Paging File In Windows (11)

    While most modern computers aren’t going to perform any differently if you change their paging settings, a little bit of tweaking can make a difference on low-end computers with limited RAM. Even on high-end machines that occasionally need to punch above their weight in terms of memory.

    So if you next encounter a computer grinding to a halt, it might very well be that it needs a visit from the paging file doctor to set things right again.

    ';document.getElementsByClassName("post-ad-top")[0].outerHTML='';tocEl.outerHTML=tocHTML+newHTML;}}catch(e){console.log(e)}

    How To Optimize The Paging File In Windows (2024)

    FAQs

    How can I improve my paging performance? ›

    Simple tactics to improve paging

    Place the page file on a local physical disk separate from the OS or workloads. This reduces contention for the same physical disk. If you need to work with multiple paging files, use multiple disks or a disk array to avoid putting multiple page files on the same physical disk.

    What is the best paging file size for 16gb RAM? ›

    The paging file is typically 1.25 GB on 8 GB systems, 2.5 GB on 16 GB systems and 5 GB on 32 GB systems. For systems with more RAM, you can make the paging file somewhat smaller.

    What should I set my paging file size to? ›

    Your paging file size should be 1.5 times your physical memory at a minimum and up to 4 times the physical memory at most to ensure system stability. Your minimum paging file size can be calculated by 8 GB x 1.5, and your maximum paging file size by 8 GB x 4.

    Do you need a paging file with 64gb RAM? ›

    No. Don't disable page file even if you have 128 GB of memory or more. Set it at the very least to a fixed size, 256-512 MB or so should be enough.

    What is the optimal virtual memory size for 8gb RAM? ›

    To calculate the "general rule" recommended size of virtual memory in Windows 10 per the 8 GB your system has, here's the equation 1024 x 8 x 1.5 = 12288 MB. So it sounds as if the 12 GB configured in your system currently is correct so when or if Windows needs to utilize the virtual memory, the 12 GB should suffice.

    What is the optimal virtual memory size for 32gb RAM? ›

    If you are Running an SSD for your OS and 32 GB of RAM, you don't need any virtual at all. Unless your running a whole bunch of VM's. 4GB should be more than enough to hold Sleep and unless your actually using 32 GB of RAM your RAM can hold it all by itself.

    What is the optimal virtual memory size for 4GB RAM? ›

    For example, a system with 4GB RAM would have a minimum of 1024x4x1. 5=6,144MB [1GB RAM x Installed RAM x Minimum]. Whereas the maximum is 1024x4x3=12,288MB [1GB RAM x Installed RAM x Maximum]. Still, 12GB for a paging file is enormous.

    Should page file be on SSD or HDD? ›

    5 Answers
    1. Put it on the SSD for better performance from your page file. This will DRAMATICALLY shorten the lifespan of you SSD if you are frequently writing/reading from your pagefile.
    2. Based on the amount of RAM you're running, you could potentially disable the pagefile in its entirety (or just hide it on the HDD).

    How much virtual memory should I set for 16GB RAM? ›

    For example with 16GB, you may want to enter Initial Size of 8000 MB and Maximum size of 12000 MB.

    How much VRAM do I need for 16GB RAM? ›

    How much VRAM do You need? An Overview.
    WorkloadRecommended VRAM
    GPU Rendering (Passive Workloads)8 - 16GB GDDR6/6X
    Video Editing, Motion Design, CompositingGeneral Video Editing6 - 8GB GDDR6/5X/5
    Video Editing with heavy GPU support, e.g., Davinci Resolve8 - 16GB GDDR6
    Motion Design and Composting8 - 10GB GDDR6
    7 more rows

    Does page file affect gaming? ›

    Paging file size is important for gaming because it can affect the performance of the game. If the paging file size is too small, the game may lag or stutter. If the paging file size is too large, the game may take up too much memory and cause the computer to slow down.

    Should I use paging file with SSD? ›

    Some “experts” suggest leaving the Page File on the SSD to maximize system performance while others suggest placing it on an installed hard drive (if one is present of course) in order to maximize the life of the SSD.

    Does disabling page file increase performance? ›

    Myth: Disabling the Page File Improves Performance

    This isn't really true. People have tested this theory and found that, while Windows can run without a page file if you have a large amount of RAM, there's no performance benefit to disabling the page file.

    Does increasing virtual memory improve performance? ›

    Virtual memory is important for improving system performance, multitasking and using large programs. However, users should not overly rely on virtual memory, since it is considerably slower than RAM.

    Do I need page file if I have 32GB of RAM? ›

    In any case, when you have 32GB of RAM, unless you routinely run at 98% memory usage, I'd consider eliminating the page file altogether. The system will warn you if you're running low on virtual memory, and you can probably find a couple apps to close. Pagefile is just insurance nowadays.

    How do I determine page file size? ›

    Inspecting Page File Usage in Performance Monitor
    1. Via the Windows start menu, open Administrative Tools, and then open Performance Monitor.
    2. Expand Monitoring Tools.
    3. Click Performance Monitor.
    4. Right-click on the graph and select Add Counters... from the context menu. ...
    5. From the Available counters list, select Paging File.

    How much virtual memory should I set for 12gb RAM? ›

    Microsoft recommends that you set virtual memory to be no less than 1.5 times and no more than 3 times the amount of RAM on your computer.

    Does virtual RAM increase gaming performance? ›

    Virtual memory is a memory management technique that is used by computers. It allows a computer to use more memory than is physically available by using a portion of the hard drive as if it were RAM. This can increase gaming performance because it allows the computer to access more data more quickly.

    How do I optimize virtual memory? ›

    Windows 10 Optimize Performance Using Virtual Memory - YouTube

    What is a good virtual memory size for Windows 11? ›

    Microsoft actually recommends "3 × RAM or 4 GB, whichever is larger," which will protect your system from instability when you do use your paging file. However, Windows automatic paging file management might decide otherwise, so it's typically best to let the operating system figure things out for itself.

    How much virtual memory should I set for 16GB RAM? ›

    For example with 16GB, you may want to enter Initial Size of 8000 MB and Maximum size of 12000 MB.

    What is the recommended paging file size for Windows 10 4GB? ›

    The paging file is a minimum of 1.5 times and a maximum of three times your physical RAM. You can calculate your paging file size using the following system. For example, a system with 4GB RAM would have a minimum of 1024x4x1. 5=6,144MB [1GB RAM x Installed RAM x Minimum].

    Will turning off page file increase performance? ›

    Myth: Disabling the Page File Improves Performance

    This isn't really true. People have tested this theory and found that, while Windows can run without a page file if you have a large amount of RAM, there's no performance benefit to disabling the page file.

    How do I reduce the cost of paging to disk? ›

    One option to reduce paging activity is to add memory. Adding memory reduces the likelihood that the system will rely solely on the hard disk for virtual memory. You can monitor your system's changing memory requirements and properly configure the paging file to maximize paging performance.

    Can virtual memory increase performance? ›

    Virtual memory frees up RAM by swapping data that has not been used recently over to a storage device, such as a hard drive or solid-state drive (SSD). Virtual memory is important for improving system performance, multitasking and using large programs.

    What is the optimal virtual memory size for 32gb RAM? ›

    If you are Running an SSD for your OS and 32 GB of RAM, you don't need any virtual at all. Unless your running a whole bunch of VM's. 4GB should be more than enough to hold Sleep and unless your actually using 32 GB of RAM your RAM can hold it all by itself.

    Is virtual memory good for gaming? ›

    Virtual memory is a great way to improve gaming performance. By using virtual memory, the game can run faster and smoother. Additionally, virtual memory can help to improve the quality of the graphics.

    How much virtual memory should 4GB RAM have? ›

    Microsoft recommends that you set it to be a minimum of 1.5 times and a maximum of 3 times of the physical RAM. If your computer has 4GB RAM, the minimum paging file should be 1024x4x1. 5=6,144MB and the maximum is 1024x4x3=12,288MB.

    How do I manage pagefile size? ›

    Change the virtual memory settings

    Select the drive that you want to change the paging size for. You then have the option for selecting a 'Custom size' to enter in your own amount, let the system manage the size, or turn the paging file off completely.

    What should I turn off in Windows 10 performance? ›

    Disable programs that run on startup. One reason your Windows 10 PC may feel sluggish is that you've got too many programs running in the background — programs that you rarely or never use. Stop them from running, and your PC will run more smoothly.

    Do you need a pagefile with 32GB of RAM? ›

    In any case, when you have 32GB of RAM, unless you routinely run at 98% memory usage, I'd consider eliminating the page file altogether. The system will warn you if you're running low on virtual memory, and you can probably find a couple apps to close. Pagefile is just insurance nowadays.

    Should I use paging file with SSD? ›

    Some “experts” suggest leaving the Page File on the SSD to maximize system performance while others suggest placing it on an installed hard drive (if one is present of course) in order to maximize the life of the SSD.

    Should you set page file with SSD? ›

    With 16 GB of RAM you probably never gonna need a pagefile so you can put it wherever you want or even turn it off (that is what I would recommend to you). But if it's gonna be used one day, then best performance you get if you set it on SSD and HDD (basically on each physical disc in your system).

    What is paging in RAM? ›

    Paging is a method of writing and reading data from a secondary storage(Drive) for use in primary storage(RAM). When a computer runs out of RAM, the operating system (OS) will move pages of memory over to the computer's hard disk to free up RAM for other processes.

    Why do we need paging in OS? ›

    Paging is a function of memory management where a computer will store and retrieve data from a device's secondary storage to the primary storage. Memory management is a crucial aspect of any computing device, and paging specifically is important to the implementation of virtual memory.

    Where are pages stored in memory? ›

    In x86 systems, page tables are structures used by the CPU, but they are too large to be hold in registers, so they are kept in RAM. Any process has a memory map in which there is two big zones: user space and kernel space. Kernel space is the same space for all process.

    Top Articles
    Latest Posts
    Article information

    Author: Carmelo Roob

    Last Updated:

    Views: 6500

    Rating: 4.4 / 5 (45 voted)

    Reviews: 84% of readers found this page helpful

    Author information

    Name: Carmelo Roob

    Birthday: 1995-01-09

    Address: Apt. 915 481 Sipes Cliff, New Gonzalobury, CO 80176

    Phone: +6773780339780

    Job: Sales Executive

    Hobby: Gaming, Jogging, Rugby, Video gaming, Handball, Ice skating, Web surfing

    Introduction: My name is Carmelo Roob, I am a modern, handsome, delightful, comfortable, attractive, vast, good person who loves writing and wants to share my knowledge and understanding with you.