 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Relation Between virtual memory, cache memory and RAM?</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/</link>
	<description></description>
	<lastBuildDate>Sat, 25 May 2013 05:16:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: crunchiegeek</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-97659</link>
		<dc:creator>crunchiegeek</dc:creator>
		<pubDate>Tue, 11 Oct 2011 14:04:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-97659</guid>
		<description><![CDATA[@Chippy008 I used to work on the buffer pool manager and resource manager for an enterprise database. I stand by what I said.

I thought I explained what each part does pretty clearly. I also pointed out a incorrect statements; I don&#039;t see why that would be considered thrashing.

As for the OP question, it was about size relationship between virtual memory, cache memory and RAM; I don&#039;t see any mention of storage methods.

Your statement about the application being not really aware of how much physical memory it is running in, because it does not controll the virtual environment is also inaccurate. Applications can control whether its VM allocation is maintain strictly in RAM or if it will allow Windows to page it out to disk (other OS&#039;es have similar capabilities). Feel free to verify this yourself and see how VirtualAlloc is used in &quot;regular&quot; allocations and how it works with AllocateUserPhysicalPages when you need to lock it in physical memory. You&#039;ll also need to map the two but I&#039;m guessing you already know Win32 API functions for those.]]></description>
		<content:encoded><![CDATA[<p>@Chippy008 I used to work on the buffer pool manager and resource manager for an enterprise database. I stand by what I said.</p>
<p>I thought I explained what each part does pretty clearly. I also pointed out a incorrect statements; I don&#8217;t see why that would be considered thrashing.</p>
<p>As for the OP question, it was about size relationship between virtual memory, cache memory and RAM; I don&#8217;t see any mention of storage methods.</p>
<p>Your statement about the application being not really aware of how much physical memory it is running in, because it does not controll the virtual environment is also inaccurate. Applications can control whether its VM allocation is maintain strictly in RAM or if it will allow Windows to page it out to disk (other OS&#8217;es have similar capabilities). Feel free to verify this yourself and see how VirtualAlloc is used in &#8220;regular&#8221; allocations and how it works with AllocateUserPhysicalPages when you need to lock it in physical memory. You&#8217;ll also need to map the two but I&#8217;m guessing you already know Win32 API functions for those.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-97575</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Sat, 08 Oct 2011 04:04:31 +0000</pubDate>
		<guid isPermaLink="false">#comment-97575</guid>
		<description><![CDATA[&lt;i&gt;Servers are a bit trickier...&lt;/i&gt;

And for IBM i systems (essentially the entire line beginning with the System/38 up to AS/400s and later), it&#039;s really tricky. Applications and the OS see everything as a &quot;single-level store&quot; model. Effectively, all RAM and disk is accessed as an address range for memory. All addressable objects are seen as being &quot;in memory&quot;. The OS itself has no concept of a disk unit -- it&#039;s the VM that everything runs on top of that effects address translation into disk units and sectors.

&quot;Virtual memory&quot; is the size of available DASD in the system storage pool of disk drives.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>Servers are a bit trickier&#8230;</i></p>
<p>And for IBM i systems (essentially the entire line beginning with the System/38 up to AS/400s and later), it&#8217;s really tricky. Applications and the OS see everything as a &#8220;single-level store&#8221; model. Effectively, all RAM and disk is accessed as an address range for memory. All addressable objects are seen as being &#8220;in memory&#8221;. The OS itself has no concept of a disk unit &#8212; it&#8217;s the VM that everything runs on top of that effects address translation into disk units and sectors.</p>
<p>&#8220;Virtual memory&#8221; is the size of available DASD in the system storage pool of disk drives.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kccrosser</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-97558</link>
		<dc:creator>kccrosser</dc:creator>
		<pubDate>Fri, 07 Oct 2011 17:40:08 +0000</pubDate>
		<guid isPermaLink="false">#comment-97558</guid>
		<description><![CDATA[(I know some of this has already been stated, but it seems like some clarification is still warranted.)

RAM is Random Access Memory.  This is PHYSICAL memory in which it is possible to individually address and read/write the smallest memory storage unit (generally an 8-bit byte in most systems, but it may be a 16-bit or even 32-bit &quot;word&quot;).

&quot;Cache&quot; covers a lot of different storage.  I assume from the original question that this refers specifically to the L1/L2 (and now L3) types of cache in a personal computer.  These caches are generally physically embedded in the CPU chips in the computer for speed of access, and are used to hold recently referenced information, and also to hold &quot;future&quot; instruction and data information (aka a &quot;pipeline cache&quot;).

Virtual Memory is any memory area that appears to the application software as real physical memory, but which may be relocated dynamically in the RAM memory or even temporarily stored on secondary (i.e., disk) storage.

The size of the L1/L2/L3 cache memory is generally fixed for a given CPU.  In the Intel i7-2620M CPU, the processor includes 4 Megabytes of on-chip &quot;Smart Cache&quot; (they no longer distinguish L1/L2/L3 sizes individually).

Maximum RAM is usually a function of the physical capacity of the box containing the computer.  Laptops may only hold 8 GB, while servers can hold 256 GB or more.

Virtual Memory is usually configured as 1.5x to 2.5x the size of the physical (RAM) memory in the system, but that ratio can vary widely.

So - a typical home or laptop computer might have the following configuration:
RAM - 4 GB
CPU Cache - 2 MB
Virtual Memory - 5-6 GB

Servers are a bit trickier, as almost all current servers use multiple CPUs, with each CPU including its on-chip cache memory.  A 4-CPU server might have:
RAM - 64 GB
CPU Cache - 16 MB (4 MB per CPU)
Virtual Memory - 96-128 GB]]></description>
		<content:encoded><![CDATA[<p>(I know some of this has already been stated, but it seems like some clarification is still warranted.)</p>
<p>RAM is Random Access Memory.  This is PHYSICAL memory in which it is possible to individually address and read/write the smallest memory storage unit (generally an 8-bit byte in most systems, but it may be a 16-bit or even 32-bit &#8220;word&#8221;).</p>
<p>&#8220;Cache&#8221; covers a lot of different storage.  I assume from the original question that this refers specifically to the L1/L2 (and now L3) types of cache in a personal computer.  These caches are generally physically embedded in the CPU chips in the computer for speed of access, and are used to hold recently referenced information, and also to hold &#8220;future&#8221; instruction and data information (aka a &#8220;pipeline cache&#8221;).</p>
<p>Virtual Memory is any memory area that appears to the application software as real physical memory, but which may be relocated dynamically in the RAM memory or even temporarily stored on secondary (i.e., disk) storage.</p>
<p>The size of the L1/L2/L3 cache memory is generally fixed for a given CPU.  In the Intel i7-2620M CPU, the processor includes 4 Megabytes of on-chip &#8220;Smart Cache&#8221; (they no longer distinguish L1/L2/L3 sizes individually).</p>
<p>Maximum RAM is usually a function of the physical capacity of the box containing the computer.  Laptops may only hold 8 GB, while servers can hold 256 GB or more.</p>
<p>Virtual Memory is usually configured as 1.5x to 2.5x the size of the physical (RAM) memory in the system, but that ratio can vary widely.</p>
<p>So &#8211; a typical home or laptop computer might have the following configuration:<br />
RAM &#8211; 4 GB<br />
CPU Cache &#8211; 2 MB<br />
Virtual Memory &#8211; 5-6 GB</p>
<p>Servers are a bit trickier, as almost all current servers use multiple CPUs, with each CPU including its on-chip cache memory.  A 4-CPU server might have:<br />
RAM &#8211; 64 GB<br />
CPU Cache &#8211; 16 MB (4 MB per CPU)<br />
Virtual Memory &#8211; 96-128 GB</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chippy088</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-97548</link>
		<dc:creator>chippy088</dc:creator>
		<pubDate>Fri, 07 Oct 2011 14:06:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-97548</guid>
		<description><![CDATA[@CHruNcHieGeEk not a bad first post, riddled with inconsistencies, but interesting. I am guessing you are newly qualified to the technology. I say that because most of your comments are general and unsupported.

&quot;RAM is just a generic reference to physical memory in a computer.&quot;
&quot;RAM is a specific definition of a type of memory.&quot;
Random Access Memory, denoting it does not have to be read sequentially. (any bit or byte can be read and changed in any order, if you are capable of low level programming.) There is also a ROM type of memory. Some of the logic chips on the motherboard are this type.

&quot;All memory in most modern operating systems is virtual memory.&quot;
Strange statement. If it is truely virtual, it will not exist except in ones imagination. It has to have a physical presence. The Virtual in this case refers to the fact that the application is not really aware of how much physical memory it is running in, because it does not controll the virtual environment. That is what the OS does. APIs assist programmers to save &quot;re-inventing the wheel&quot;, and cut down the size of the application. 

The actual postee was requesting some form of co-relation between the memory storage methods. Although you trashed a mention of cache prioritisation, you didn&#039;t provide any form of reasoning behind your statement, and definately didn&#039;t assist in providing a relevant answer.]]></description>
		<content:encoded><![CDATA[<p>@CHruNcHieGeEk not a bad first post, riddled with inconsistencies, but interesting. I am guessing you are newly qualified to the technology. I say that because most of your comments are general and unsupported.</p>
<p>&#8220;RAM is just a generic reference to physical memory in a computer.&#8221;<br />
&#8220;RAM is a specific definition of a type of memory.&#8221;<br />
Random Access Memory, denoting it does not have to be read sequentially. (any bit or byte can be read and changed in any order, if you are capable of low level programming.) There is also a ROM type of memory. Some of the logic chips on the motherboard are this type.</p>
<p>&#8220;All memory in most modern operating systems is virtual memory.&#8221;<br />
Strange statement. If it is truely virtual, it will not exist except in ones imagination. It has to have a physical presence. The Virtual in this case refers to the fact that the application is not really aware of how much physical memory it is running in, because it does not controll the virtual environment. That is what the OS does. APIs assist programmers to save &#8220;re-inventing the wheel&#8221;, and cut down the size of the application. </p>
<p>The actual postee was requesting some form of co-relation between the memory storage methods. Although you trashed a mention of cache prioritisation, you didn&#8217;t provide any form of reasoning behind your statement, and definately didn&#8217;t assist in providing a relevant answer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crunchiegeek</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-97507</link>
		<dc:creator>crunchiegeek</dc:creator>
		<pubDate>Thu, 06 Oct 2011 17:24:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-97507</guid>
		<description><![CDATA[RAM is just a generic reference to physical memory in a computer.

All memory in most modern operating systems is virtual memory. You&#039;d be hard pressed to find a computer that allows applications to access physical memory directly. Different OS have different ways to grant and allocate memory requests but they all pretty much boil down to an API call. If granted, what you really get is an address range. 

Depending on the OS memory management design and state of the system at the time, your grant may be fully backed by physical RAM or partly by physical RAM, partly by the page file. In other words, virtual memory is not your page file, some place on the disk, etc... Page files or the likes are sometimes called virtual RAM because they use disk files to emulate the role of RAM. None of that matters in most applications as they all appear as virtual memory to the application.

Cache is just another term that refers to transient storage for data/binaries that you will or might need soon. The purpose is to improve performance. For example, RAM is a cache for physical disks. Many application perform read ahead operations to pre-fetch data the OS think you will likely need based on current/previous patterns. Since RAM access can be up to 10,000 times faster than a basic disk, pre-fetching the data while you&#039;re working with the current data can significantly improve user experience. 

Other more specialized forms of cache can be physical memory chips for specific tasks. This includes regular hard disks (yes, many new ones have built in caches), CPU, storage controller cards, etc... Their physical specs may be very different from traditional RAM but they still serve the same purpose.

Btw, the post about percentages in L1 and L2 caches in CPUs (...should fulfill &gt;90% of requests, etc.....) is completely incorrect. That&#039;s not how CPU caches are used and it is not the right way to think about CPU caches. At a very high level, CPU caches are small, high speed memory that fronts regular RAM and for CPU instructions. Cache hit ratios are generally not meaningful here, at least not in the say &lt;a href=&quot;http://itknowledgeexchange.techtarget.com/profile/solutions1&quot;&gt;@solutions1&lt;/a&gt; described.]]></description>
		<content:encoded><![CDATA[<p>RAM is just a generic reference to physical memory in a computer.</p>
<p>All memory in most modern operating systems is virtual memory. You&#8217;d be hard pressed to find a computer that allows applications to access physical memory directly. Different OS have different ways to grant and allocate memory requests but they all pretty much boil down to an API call. If granted, what you really get is an address range. </p>
<p>Depending on the OS memory management design and state of the system at the time, your grant may be fully backed by physical RAM or partly by physical RAM, partly by the page file. In other words, virtual memory is not your page file, some place on the disk, etc&#8230; Page files or the likes are sometimes called virtual RAM because they use disk files to emulate the role of RAM. None of that matters in most applications as they all appear as virtual memory to the application.</p>
<p>Cache is just another term that refers to transient storage for data/binaries that you will or might need soon. The purpose is to improve performance. For example, RAM is a cache for physical disks. Many application perform read ahead operations to pre-fetch data the OS think you will likely need based on current/previous patterns. Since RAM access can be up to 10,000 times faster than a basic disk, pre-fetching the data while you&#8217;re working with the current data can significantly improve user experience. </p>
<p>Other more specialized forms of cache can be physical memory chips for specific tasks. This includes regular hard disks (yes, many new ones have built in caches), CPU, storage controller cards, etc&#8230; Their physical specs may be very different from traditional RAM but they still serve the same purpose.</p>
<p>Btw, the post about percentages in L1 and L2 caches in CPUs (&#8230;should fulfill &gt;90% of requests, etc&#8230;..) is completely incorrect. That&#8217;s not how CPU caches are used and it is not the right way to think about CPU caches. At a very high level, CPU caches are small, high speed memory that fronts regular RAM and for CPU instructions. Cache hit ratios are generally not meaningful here, at least not in the say <a href="http://itknowledgeexchange.techtarget.com/profile/solutions1">@solutions1</a> described.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chippy088</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-78012</link>
		<dc:creator>chippy088</dc:creator>
		<pubDate>Wed, 09 Jun 2010 19:14:09 +0000</pubDate>
		<guid isPermaLink="false">#comment-78012</guid>
		<description><![CDATA[Virtual RAM, or page file or swap file, (different names, same thing) is located on the hard drive, and is flexible in it&#039;s size.

It is normally initialized, as Darklinx says, at  about 1.5 times the physical ram installed,(depending on OS and/or manual settings) it could be more. It will increase if several memory hungry applications are loaded.

To see what virtual memory you are using, launch task manager and have a look. Run it when you start the pc and look at the swap file usage, then load some programs and look at the figures again. You will see the difference in the size if you are running something memory grabbing, like excel or a graphics based application.]]></description>
		<content:encoded><![CDATA[<p>Virtual RAM, or page file or swap file, (different names, same thing) is located on the hard drive, and is flexible in it&#8217;s size.</p>
<p>It is normally initialized, as Darklinx says, at  about 1.5 times the physical ram installed,(depending on OS and/or manual settings) it could be more. It will increase if several memory hungry applications are loaded.</p>
<p>To see what virtual memory you are using, launch task manager and have a look. Run it when you start the pc and look at the swap file usage, then load some programs and look at the figures again. You will see the difference in the size if you are running something memory grabbing, like excel or a graphics based application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darklinx</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-77953</link>
		<dc:creator>darklinx</dc:creator>
		<pubDate>Tue, 08 Jun 2010 16:59:41 +0000</pubDate>
		<guid isPermaLink="false">#comment-77953</guid>
		<description><![CDATA[As was mentioned before, Primary RAM is the physical sticks in the computer used to run your programs.  Virtual memory is space allocated on the hard drive for use LIKE RAM.  Theoretically you should have at least 1.5 times the space in virtual memory than physical.

With regard to CPU cache, L2 is used to store anticipated instructions for the CPU, and the L1 is to store the immediate instructions.  So the L1 cache will setup all instructions for processing by the CPU and the cache controller will fetch instructions from RAM and fill the L2 cache in prediction for what will be needed in L1 after the next instruction is put to the processor. 
Conversely, any memory used on  hard drives or RAID controllers is called a buffer, because it&#039;s used to store data to be written.  Cache memory isn&#039;t used to write to anything.]]></description>
		<content:encoded><![CDATA[<p>As was mentioned before, Primary RAM is the physical sticks in the computer used to run your programs.  Virtual memory is space allocated on the hard drive for use LIKE RAM.  Theoretically you should have at least 1.5 times the space in virtual memory than physical.</p>
<p>With regard to CPU cache, L2 is used to store anticipated instructions for the CPU, and the L1 is to store the immediate instructions.  So the L1 cache will setup all instructions for processing by the CPU and the cache controller will fetch instructions from RAM and fill the L2 cache in prediction for what will be needed in L1 after the next instruction is put to the processor.<br />
Conversely, any memory used on  hard drives or RAID controllers is called a buffer, because it&#8217;s used to store data to be written.  Cache memory isn&#8217;t used to write to anything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: segun</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-77864</link>
		<dc:creator>segun</dc:creator>
		<pubDate>Sun, 06 Jun 2010 06:09:34 +0000</pubDate>
		<guid isPermaLink="false">#comment-77864</guid>
		<description><![CDATA[explain the relationship beween primary memory to vitual memory]]></description>
		<content:encoded><![CDATA[<p>explain the relationship beween primary memory to vitual memory</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: solutions1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-48833</link>
		<dc:creator>solutions1</dc:creator>
		<pubDate>Thu, 16 Feb 2006 12:15:56 +0000</pubDate>
		<guid isPermaLink="false">#comment-48833</guid>
		<description><![CDATA[With respect to what you term &quot;size relation,&quot; a rule of thumb is that at each level the cache should exhibit a 90% or greater &quot;hit rate.&quot; That is, L1 cache should fulfill &gt;90% of requests and pass the rest to L2 Cache, which fulfills &gt;90% or more requests, and passes the rest to main memory, which fulfills 90% or more, and passes the remainder to disk-based cache, which fulfills 90% and passes on the rest to non-cached file system/database reads. Overall, what is needed is balance.

As physical capabilities and $ per unit of performance change, you need to rebalance. For example, new PCs and servers typically have bigger L1 and L2 cache than older ones, so you may need to expand memory and disk caches to stay in balance. Also, from a data base performance perspective, some predictable percentage of a given database needs to be cached at the disk level (e.g., 10%), so as a data base gets bigger, caching capability should expand at each leel to maintain balance and throughput.

Therefore what is critical is to have effective performance measurements and diagnosis, and not only of cache utilization. For example, some processes are computationally constrained rather than data constrained, in which case adding more cache is irrelevant.
]]></description>
		<content:encoded><![CDATA[<p>With respect to what you term &#8220;size relation,&#8221; a rule of thumb is that at each level the cache should exhibit a 90% or greater &#8220;hit rate.&#8221; That is, L1 cache should fulfill &gt;90% of requests and pass the rest to L2 Cache, which fulfills &gt;90% or more requests, and passes the rest to main memory, which fulfills 90% or more, and passes the remainder to disk-based cache, which fulfills 90% and passes on the rest to non-cached file system/database reads. Overall, what is needed is balance.</p>
<p>As physical capabilities and $ per unit of performance change, you need to rebalance. For example, new PCs and servers typically have bigger L1 and L2 cache than older ones, so you may need to expand memory and disk caches to stay in balance. Also, from a data base performance perspective, some predictable percentage of a given database needs to be cached at the disk level (e.g., 10%), so as a data base gets bigger, caching capability should expand at each leel to maintain balance and throughput.</p>
<p>Therefore what is critical is to have effective performance measurements and diagnosis, and not only of cache utilization. For example, some processes are computationally constrained rather than data constrained, in which case adding more cache is irrelevant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frozenport</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/relation-between-virtual-memory-cache-memory-and-ram/#comment-48834</link>
		<dc:creator>frozenport</dc:creator>
		<pubDate>Wed, 15 Feb 2006 22:59:09 +0000</pubDate>
		<guid isPermaLink="false">#comment-48834</guid>
		<description><![CDATA[Viritual Memory (or a PageFile) is a section of hard disk space that serves like ram

RAM (random access memory) is the physical on your mother board

virtual memory takes most of the load off the physical memory when the physical memory buffer is either busy or overloaded.

i&#039;m not sure what the cache relationship is.]]></description>
		<content:encoded><![CDATA[<p>Viritual Memory (or a PageFile) is a section of hard disk space that serves like ram</p>
<p>RAM (random access memory) is the physical on your mother board</p>
<p>virtual memory takes most of the load off the physical memory when the physical memory buffer is either busy or overloaded.</p>
<p>i&#8217;m not sure what the cache relationship is.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.043 seconds using memcached
Object Caching 393/399 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-25 05:17:05 -->