1

I have the following phenomena: I have 4GB RAM, and sometimes I use a program (program A) which uses up all the available memory, say 3.9GB. If there are more open programs, then their memory is probably saved to disk and on taskman I see they now use almost no memory. Once I close program A, the memory is freed instantly (I see it on the taskman), and I expect the rest of the programs to load back to memory fast. But unfortunately, it takes them several long minutes (up to 5-10 minutes) until they load up properly.

Example: I open program A while Firefox is minimized on the background. Since Firefox usually uses about 500MB, and A needs my entire memory, Firefox now uses about 10-20MB and I obviously can't open it (technically I can, but it will take forever to restore it). Now I close program A and watch Firefox slowly loading back into memory, and until it reaches 400-450MB it remains "stuck".

What causes the memory loading to be this slow? is it the memory speed? maybe hard disk speed? maybe I can control it via the OS preferences (I use win7)?

Thanks.

yoki
  • 187

1 Answers1

1

The memory of the applications that are not in use has been paged out, meaning it has been written to disk and was removed from RAM. Even if you free up RAM, the memory of the applications is still on the disk and not in RAM. Reading 500 MB from a very slow disk can take a while. Longer if an antivirus manages to mess everything up. This goes significantly faster if the pagefile/swapfile is located on a fast SSD. The process can also potentially be sped up by creating a larger page file, to reduce fragmentation. Some applications also do their own memory management and try to reduce their footprint when memory becomes tight, which may or may not increase or decrease the size of the problem (ie they try to help but may screw up while doing so).

The memory speed is irrelevant, because the slowest RAM is orders of magnitude faster than the fastest harddisk (assumining real world consumer computers).

Peter
  • 4,630