9

On my Windows 7 (64-bit) PC, when I have a few resource hungry programs going, and half a dozen others, when I switch to an app that I haven't used for a while, it takes a long time to respond and I can hear the hard drive working a lot. I assume it's getting data from the page file. In Windows Task Manager it shows that I'm using about 75% of physical RAM, with the rest split about 50/50 between cached and free.

Even though RAM is available, has it moved data out of RAM to be only on disk? How can I make other programs more responsive? Will upping my RAM from 4GB to 8GB speed this up when switching from one program to another?

2
  • Note you'll need Windows 7 64-bit to use more than 4GB. Adding more memory will help alot, and then set the Pagefile to Min 200MB / Max 200MB. Commented Nov 1, 2011 at 22:05
  • It's probably because of the "I have a few resource hungry programs going" part, I bet.
    – surfasb
    Commented Nov 2, 2011 at 6:39

3 Answers 3

7

Windows has to make a tradeoff between throughput and latency.

If it kept applications in RAM, even when they hadn't been used for a long period of time, throughput would suffer. The used, but idle physical RAM would reduce the RAM available to other applications and the system.

Windows makes the decision to page out memory that has not been accessed in a long time. This allows more physical RAM to be used as a disk cache, and it significantly improves application throughput.

The tradeoff is that when these applications eventually do need to access the memory pages that haven't been accessed in a while, they may not be resident. In this case, the application has to wait for a moment as they are read back into RAM.

Windows generally does a very good job of making these tradeoffs, and I wouldn't recommend trying to tune it too much. You can make the latency better, but there will be a huge penalty to throughput and, worse, you can get into a state where some things just don't work. (For example, if you disable your paging file, two months from now you may find you're editing a large image or something and are simply unable to save it because the memory allocations always fail.)

Of course, you can always add more RAM. It's absurdly cheap right now. And that makes it less likely that Windows will have to make any tradeoffs in the first place.

1
  • 1
    As far as disabling the paging file, it's possible your system could just straight up crash.
    – surfasb
    Commented Nov 2, 2011 at 6:42
6

Windows will have paged the programs out of memory and onto disk. I don't know the algorithm it uses but I wouldn't be surprised if it looked at the length of time the application had been idle.

Windows will be trying to maximise the amount of free physical RAM as that's useful, so upgrading your memory to 8 or even 12GB would improve the responsiveness of your system - especially if you are running several "resource hungry" applications.

1
  • 3
    It definitely does look at how long the memory has been idle. When Windows wants more free physical RAM, the first thing it will discard (or page out) are memory pages that haven't been accessed in a very long time. Commented Nov 1, 2011 at 21:52
0

You can check in Windows Task Manager which program is using so much RAM.

From personal experience, I find swap file unnecessary on PCs with 4GB+ RAM. You may want to disable swapping entirely to see if it is the cause of the problem.

Also, there are Windows Services which I prefer to turn off, as they tend to make a lot of unnecessary disk I/O: Superfetch, ReadyBoost, Windows Search, Windows Defender, Volume Shadow Copy and Distributed Link Tracking.

2
  • 2
    Check BlackViper's excellent site to see which services you safely can disable Commented Nov 1, 2011 at 21:09
  • 1
    Turning off Superfetch along with the page file is a huge mistake. This has already been discussed numerous times.
    – surfasb
    Commented Nov 2, 2011 at 6:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .