Why Does Vista Use all My Memory? - Answers

Discussion in 'General Technical' started by Jason, Mar 6, 2007.

  1. Jason


    Sep 26, 2005
    Likes Received:
    Windows Vista has a radically different approach to memory management. Check out the "Physical Memory, Free" column in my Task Manager:


    At the time this screenshot was taken, this machine had a few instances of IE7 running, plus one remote desktop. I'm hardly doing anything at all, yet I only have 6 megabytes of free physical memory.

    Now compare with this screenshot of Windows XP's Task Manager under similar low-load conditions:


    Under "Physical Memory, Available" I have approximately 1.5 gigabytes of free physical memory, as you'd expect.

    So what's going on here? Why is Vista using so much memory when I'm doing so very little?

    To answer that question, you have to consider what your computer's physical memory (RAM) is for. Just as a hypothetical, let's say you wanted to create a new text file:

    1. <LI>You double-click on the notepad icon. <LI>The Notepad executable loads from disk into memory. <LI>Notepad executes. <LI>Notepad allocates free memory to store your text document. </LI>

    So Notepad clearly needs a little memory for itself: enough to execute, and to store the contents of the text document it's displaying. But that's maybe a couple megabytes, at most. If even that. What about the other 2,046 megabytes of system memory?

    You have to stop thinking of system memory as a resource and start thinking of it as a a cache. Just like the level 1 and level 2 cache on your CPU, system memory is yet another type of high-speed cache that sits between your computer and the disk drive.

    And the most important rule of cache design is that empty cache memory is wasted cache memory. Empty cache isn't doing you any good. It's expensive, high-speed memory sucking down power for zero benefit. The primary mission in the life of every cache is to populate itself as quickly as possible with the data that's most likely to be needed-- and to consistently deliver a high "hit rate" of needed data retrieved from the cache. Otherwise you're going straight to the hard drive, mister, and if you have to ask how much going to the hard drive will cost you in performance, you can't afford it.

    Diomidis Spinellis published an excellent breakdown of the cache performance ratios in a typical PC circa January 2006:

    <TABLE border=1><TBODY><TR><TD></TD><TD align=right>Nominal </TD><TD align=right>Worst case </TD><TD align=right>Sustained </TD><TD align=right></TD><TD align=middle colSpan=2>Productivity </TD></TR><TR><TD>Component </TD><TD align=right>size </TD><TD align=right>latency </TD><TD align=right>throughput </TD><TD align=right>$1 buys </TD><TD align=middle colSpan=2>(Bytes read / s / $) </TD></TR><TR><TD></TD><TD align=right></TD><TD align=right></TD><TD align=right>(MB/s) </TD><TD align=right></TD><TD>Worst case </TD><TD>Best case </TD></TR><TR><TD>L1 D cache </TD><TD align=right>64 KB </TD><TD align=right>1.4ns </TD><TD align=right>19022 </TD><TD align=right>10.7 KB </TD><TD>7.91·10<SUP>12</SUP> </TD><TD>2.19·10<SUP>14</SUP> </TD></TR><TR><TD>L2 cache </TD><TD align=right>512 KB </TD><TD align=right>9.7ns </TD><TD align=right>5519 </TD><TD align=right>12.8 KB </TD><TD>1.35·10<SUP>12</SUP> </TD><TD>7.61·10<SUP>13</SUP> </TD></TR><TR><TD>DDR RAM </
    Jason, Mar 6, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.