Virtual memory (caching) on Windows 8

0

I have read a bit about the issue, and I understood that the OS constantly pushes memory to the disk, so later, when another application needs a lot of RAM, it allocates that memory to it and "moves" the older programs to the disk-cache.

Unfortunately to me, this behavior is pretty annoying. I've inspected my hard disk behavior during a torrent download and a program installation. Please note I have a 5000RPM HDD, not an SSD - on a laptop.

The torrent is using 0.1MB/s on disk, and 15MBit/s (about 2MB/s) - writing on the memory cache (I've manually set it to a whooping of 1GB mem-cache because the HDD was bottle-capping it)

The installation is using about 10MB/s, and the "System" process is using 20MB/s (!!!)

Therefore, I assume that Windows is caching the temporary data which the installation app is using (about 0.5GB of RAM, its extracting data from an archive) and even when it finishes, the "System" process keeps using the HDD for a while (a couple of minutes at 100%).

I have 8GB of RAM (on an i7 3630QM, 7670HD Radeon, Windows 8 64bit Pro) and usually don't use multiple heavy programs (even VS+Photoshop+Chrome will use about 3GB) - is it better for me to disable disk caching?

Is there a way to quickly re-enable it without having to restart, in case I need it?

Thanks!

Mark Segal

Posted 2013-09-04T17:14:01.423

Reputation: 75

1As far as I know there's no way to re-enable it without having to restart. You only really need this feature if you're constantly running out of RAM. – Yass – 2013-09-04T17:23:57.090

120MB/sec is nothing to be honest. Sounds like you should avoid resource intensive program like torrent downloaders ( which require writting to the hdd ) while your trying to install a program which also requires writting to the hdd. – Ramhound – 2013-09-04T17:43:37.157

Answers

0

I think you are confusing several different concepts:

  • Virtual memory: Processes (running programs) are assigned memory by the operating system, but the addresses they are given do not necessarily correspond the real addresses in memory, even more importantly, some of the processes memory may not even be in RAM at any given moment. All modern operating systems are always using this.
  • Swap: This requires virtual memory, but virtual memory does not imply you are using swap. An operating system can remove some of a programs data from RAM and store it onto secondary storage (i.e. HDD, SSD). Usually this is only done when needed.
  • Disk cache: This is almost the opposite of swap. The operating system will keep data from secondary storage in RAM after it has been used, so that if it is needed again soon it won't have to be loaded again.

I think what you are asking about is whether you should have a swapfile setup. With 8 GB of memory, it is unlikely you will run out of memory, and even if you did, disks are so much slower than RAM that the usual effect of using swap is that your computer becomes unresponsive. It also has security implications, in that confidential information (passwords) that should only be in RAM may get written onto the disk. I suggest not using any swap.

wingedsubmariner

Posted 2013-09-04T17:14:01.423

Reputation: 1 432

Really? Because as much as I've read, nobody really suggested disabling this (under "Advanced" in My Computer's properties) – Mark Segal – 2013-09-04T19:15:28.230

Windows used to leak memory, so it was necessary to give the computer a few more hours of stability. People have started to disable swapfiles now that they've realized they put more wear onto SSDs. – wingedsubmariner – 2013-09-04T19:31:40.933