none
Should the pagefile be used even if I have sufficient physical memory? RRS feed

  • Question

  • Or perhaps a better question:

    Is there a reliable application-agnostic method of determining when detrimental memory paging is occuring?

    So far I am using the perfmon counter "% usage" under the "paging file" performance object.  I notice the % usage will be high, even though Memory:"commited bytes" will be well under my physical RAM amount.

    Memory:"Page reads/sec" will always appear to be healthy.  I'll see it spike when an application is opened then settle back down to zero.

    This is not a single fluke case, I notice this on a variety of our servers.  I am wondering if this is normal or if memory upgrades are in order.

    Thanks,
    Jaime

    Friday, August 20, 2010 3:41 PM

Answers

  • The pagefile is used even when free RAM is available by design.

    Processes with less activity are paged away to make room for other memory claims. Consider Windows always first using all RAM. In the case RAM is full and a new application is started, Windows should identify which processes can be paged away, read them from ram, write them to disk, read teh new program from disk and load it in the freed RAM. This consumes a lot of time as disk read/write is a very slow operation, and all while the user is waiting for his program to start.

    So to work around this performance hit, Windows will monitor memory usage and page away all that is not often used to keep RAM free for new processes that might start.

     


    MCP/MCSA/MCTS/MCITP
    • Marked as answer by JaimeBisceglia Wednesday, August 25, 2010 6:18 PM
    Tuesday, August 24, 2010 10:23 AM

All replies

  • Have you seen these KBs?

    http://support.microsoft.com/kb/889654

     http://support.microsoft.com/kb/2267427


    Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+ Houston, TX http://blogs.sivarajan.com/ http://publications.sivarajan.com/ This posting is provided "AS IS" with no warranties, and confers no rights.
    Saturday, August 21, 2010 3:13 PM
  • Thanks, these do help with my perfmon digging.

    Though I am still curious about the more fundamental question of:

    * Why is the PF is being used in the first place if free physical memory exists, is this by design?  Or would this indicate poor application design?

     

    If you care to indulge, here is an example in more detail:

    Win2003 Citrix box with 4G RAM hosting a resource hungry GIS application.  For this test the PF is set to a range of 2G to 4G.

    0 users logged on: 450MB committed, <1% PF usage

    1 users logged on: 819MB committed, 5.0% PF usage

    2 users logged on: 1115MB committed, 9.1% PF

    3 users logged on: 1326MB committed, 12.7% PF

    etc..

    This will continue until PF usage reaches 100%, at which point the PF size will gradually increase to its defined max of 4G.

    pages/sec will be at 0 most of the time but will frequently spike

    Monday, August 23, 2010 1:52 PM
  • please check the following link.

    http://www.tomshardware.com/forum/258652-30-12gb-pagefile

     

     

    Tuesday, August 24, 2010 9:28 AM
  • The pagefile is used even when free RAM is available by design.

    Processes with less activity are paged away to make room for other memory claims. Consider Windows always first using all RAM. In the case RAM is full and a new application is started, Windows should identify which processes can be paged away, read them from ram, write them to disk, read teh new program from disk and load it in the freed RAM. This consumes a lot of time as disk read/write is a very slow operation, and all while the user is waiting for his program to start.

    So to work around this performance hit, Windows will monitor memory usage and page away all that is not often used to keep RAM free for new processes that might start.

     


    MCP/MCSA/MCTS/MCITP
    • Marked as answer by JaimeBisceglia Wednesday, August 25, 2010 6:18 PM
    Tuesday, August 24, 2010 10:23 AM
  • Please refer to

    http://www.overclock.net/faqs/12192-info-what-windows-paging-file.html

     http://en.wikipedia.org/wiki/Paging

     


    Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+ Houston, TX http://blogs.sivarajan.com/ http://publications.sivarajan.com/ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, August 25, 2010 2:28 AM
  • To quote the dude with the blue tiger avatar on your first link above:

    "On most systems this (the pagefile) is absolutely critical to system performance, but on higher end machiens with large memory banks it can actually slow the system up. "

    This vague rule of thumb seems to sum up any discussion I find on Google about this: yes the PF is "needed", but maybe you don't need it on systems with lots of RAM.  The maybe part seems to be application specific. 


    Conclusion for now:

    I will not interpret my high PF usage as cause to buy more RAM.

    I will continue to size PF on a case by case basis.


    Thanks for the help all.

    Wednesday, August 25, 2010 6:17 PM
  • I have always used a rule of thumb (((Memory + (Memory/2) )+ .5) for kicks.

    4 GB RAM is 6.25 paging file. Don't give a low and high single size file. What happens when a file grows many times through the day. It Fragments, thus having the page file fragmented. Not only do you have to Read and Write data from page but also read it across several parts of the disk. and if you update the page, (not really you), you have to update all the fragmented parts of the file across the disk. multitasking at its finest. Give your computer ample paging file or turn it off. Min and Max is good for only those systems you did not purchase enough Disk space. Bite the bullet and admit you purchased the wrong size disk and purchase a new disk. Creating the page file with equation above will prevent a lot of page faults. That's when the system expects that the information exist on a Page, When it does not it has to go back and get that information again. This is known as a page fault. Most people see a slow system as an issue with Hardware. Increasing Hardware is easy and lest conflicts. So you buy more memory making the situation worse. If you have the ability always purchase a separate disk set. I like to call it the S drive. System Page set to max based on Memory requirements. 64 GB ram would = (64 + 32 +.5) 96.5 GB = 98816 MB the system will round up or down to the correct amount of Ram it needs. Once this file is created then move system logs. Remember this order you don't want a fragmented paging file.


    • Edited by Quin5t3r Tuesday, July 14, 2015 4:24 PM
    Tuesday, July 14, 2015 4:21 PM