topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 4:24 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Windows memory-paging behavior  (Read 9751 times)

superticker

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 143
    • View Profile
    • Superticker's SU reviews about technology
    • Donate to Member
Windows memory-paging behavior
« on: November 12, 2006, 11:46 AM »
I'm hoping this is the right place for OS (computer science) discussions.  This is continued from a thread about Windows drivers.

Windows NT doesn't do "swapping", it does "paging" - ie., it swaps individual pages in and out, instead of full processes.

There are times when Windows gets dog slow when it's running out of physical memory for two applications that want to run.  It's almost as if both applications must entirely fit in physical memory to make Windows work.  Now VAX/VMS would have been smart enough to page both processes successfully, but not Windows.  I also think Windows does way too much paging.  I got lots of memory available, yet Windows is always paging IExplorer.  What's the point of that?

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Windows memory-paging behavior
« Reply #1 on: November 20, 2006, 06:56 PM »
"Windows works in mysterious ways" ;)

Seriously, though, by default windows will even page out parts of it's kernel (those that aren't, surprise surprise, nonpageable). This might've been a good idea back in the days of very little ram, but I've found that this imposes a speed hit when running very greedy programs (especially games). Back when I had a paging file, I found that my system took fairly shorter to "recover" after running a game, if I enabled the DisablePagingExecutive setting - YMMV, though.

Personally I've disabled the paging file entirely (only possible in XP, if you do it in win2k a temporary small pagefile will be created on system boot, along with a warning dialog box). I've got 2 gigs of ram now and haven't run into trouble, with 1gig of ram most things worked, but the game "painkiller" would crash on a few levels.

Whether you'll be able to run without a paging file depends on the apps you use, and it must be added that some apps behave very badly if they run out of RAM. Generally, my system feels a bit smoother when not having a paging file - it does seem like NT by default is a bit too happy about trimming the working-set and utilizing the pagefile.

It's been some years since I used paging file last, and I can't really remember the specific situation you're talking about. I was generally annoyed that it seemd to be used when it wasn't necessary, though.
- carpe noctem

nontroppo

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 649
  • spinning top
    • View Profile
    • nontroppo.org
    • Donate to Member
Re: Windows memory-paging behavior
« Reply #2 on: November 21, 2006, 07:40 AM »
Helped me understand a bit more about windows mem handling (reads easier than most other things I've seen as a non-programmer): http://shsc.info/WindowsMemoryManagement
FARR Wishes: Performance TweaksTask ControlAdaptive History
[url=http://opera.com/]

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Windows memory-paging behavior
« Reply #3 on: November 21, 2006, 09:42 AM »
nontroppo: nice link, and nice to see that somebody finally got it pretty much right :)
- carpe noctem

superticker

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 143
    • View Profile
    • Superticker's SU reviews about technology
    • Donate to Member
Re: Windows memory-paging behavior
« Reply #4 on: November 21, 2006, 11:40 AM »
This helped me understand a bit more about windows memory handling: http://shsc.info/WindowsMemoryManagement
That's an excellent description about the Windows memory-paging system.  The important thing I learned is that an application's active virtual working-set (of memory) is automatically reduced when that application is minimized.  Moreover, its unneeded virtual pages are returned to the "standby" page pool where they remain intact but are up for grabs.  It's much like moving a file into the trash.  It's still there (but up for grabs if needed).  When the minimized application is restored, those same intact standby pages are placed back into service without creating a page fault to disk.  Very nifty.

This also explains why applications page while idle when there's plenty of memory.  They're simply returning pages they won't need for a while to the standby page pool just in case other applications do need them.  This cooperative memory management insures available pages will be there if needed.

My only gripe is that a color-coded memory-map diagram of all the paging areas (free page, zero page, and standby page) and RAM memory areas is not included so one can see how everything overlaps at a glance.  You basically have to draw this diagram yourself to follow the article.