Jump to content

RAM and VM


JerryM

Recommended Posts

I assume that a lack of RAM slows a system, and have ordered more for my son-in-laws computer.However, I do not understand the relationship between RAM, VM, and cache.Maybe there is none regarding the cache.I am thinking that when the RAM runs low memory is borrowed from somewhere. Obviously I am in the slow group.Can someone help me in understanding these relationships?Thanks,Jerry

Link to comment
Share on other sites

When you run low on RAM (the OS usually determines the "need"), some running files, programs or services will get kicked to the virtual memory or the pagefile. While much slower than RAM, it theoretically should be the lesser used processes that go there, making room for the newer programs or processes. That VM is set up on your hard drive by the OS.For example, when I rip CD's, I rip the whole thing to my to RAM. By doing this, Windows will send lots of what I already have running to VM. Once I'm done with the ripping and go back to other tasks, the computer will run slow for a while until the formerly pagefiled programs get transferred back to the RAM or physical memory.Cache is different. It is usually found on a device, like a processor or a hard drive. It is very high speed memory that speeds the transfer of data from device to device, i.e. from the processor to the bus or the hard drive to memory. Think of it kind of like a hardware prefetching.That's how I learned it. Someone please correct me if I'm wrong. B)

Link to comment
Share on other sites

I assume that a lack of RAM slows a system,...
Hi, JerryM, I think you really mean "Lack of ENOUGH RAM may not allow a system to run as fast as possible"! No, Really >> Let me be brief: *If you are not running memory intensive programs or those programs that are memory hogs, then the answer may not be throwing money at the wrong problem. *Need for additional RAM also depends on present RAM amount, OS, Graphics Card/Memory, HDD, and types of software, etc.*RAM is much much quicker to read from/write to then a properly set PageFile. But only if you don't have enough or it is improperly managed!
Link to comment
Share on other sites

Thanks to you both. I understand better now.The computer in question only has 256 mb of RAM. It was not always so slow, but especially since some Window patches, and IE7 it has slowed to a crawl. I am hoping that additional memory will correct the problem.I do not know how IE7 is doing these days, or whether that may be partially responsible for the slowdown. I do now know of any real memory hogs. The AV has been Avast, but I replaced it with AVG just to see. There seems to be no difference. In addition he is using AVG 7.5 which has also been on the machine, but upgraded from Ewido.Ant-Spyware is Windows Defender, and he is using the Windows XP firewall, plus Win Patrol Plus.Right now Win Patrol shows the machine is using 72% of available memory. That is pretty typical lately.Best,Jerry

Link to comment
Share on other sites

Yeah, 256MB is kind of lacking nowadays.I filled in at a pharmacy that had an XP Dell machine that only came with 256MB. What the?!?!?! That's nuts.I gotta a gig and a half...check out my sig. B)

Link to comment
Share on other sites

Yeah, 256MB is kind of lacking nowadays.I filled in at a pharmacy that had an XP Dell machine that only came with 256MB. What the?!?!?! That's nuts.I gotta a gig and a half...check out my sig. B)
We should have the additional RAM, and install it sometimes Thursday. I guess we'll see if that is the problem.Best,Jerry
Link to comment
Share on other sites

Hello,When talking about a PC's architecture, RAM usually refers to the memory chips on circuit boards that plug into slots on the computer's main board (also known as the motherboard). The most common type of memory used these days is something called Double Data Rate Synchronous Dynamic Random Access Memory, which, fortunately, can be abbreviated as DDR-SDRAM, or even just DDR. Older computers may use Single Data Rate Synchronous Dynamic Random Access Memory memory, which is usually abbreviated as SDR-SDRAM or, more often, just SDRAM.In the earlier days of computing, it was often not possible to build a computer with enough memory capacity to hold the operating system, applications and their associated data due to cost or architectural reasons. Instead of limiting the size of the operating system, applications or their data, operating system developers came up with the idea of creating a file on the computer's hard disk drive (which, although slower, was less expensive than a comparable amount of RAM) and "swapping" applications (and data) which were "in" the computer's RAM but not actively performing any operations to this "virtual memory." Much like the computer's physical RAM, "memory" in the virtual memory file is allocated (used) in pages, and instructions and data are "swapped" in and out of the file as needed by the processor. This, of course, causes some slow down, which is why it is always a good idea to purchase enough RAM for a computer to perform all the tasks you will usually need to do without it having to swap the faster RAM memory to slower "virtual" memory on the computer's hard disk drive.These days, of course, it is possible to build computers relatively inexpensively with very large amounts of memory in them, but applications and data have increased in complexity and size as well, so virtual memory is still employed as a technique to handle them.Cache, when used as a verb when discussing computers, usually means to store frequently-requested information "closer" to the processor so that it may be accessed more quickly. This could mean data which is stored in RAM instead of on a computer's hard disk, or in a small-but-fast block of RAM which may be on the motherboard, a "processor card" which contains the CPU in addition to the high-speed RAM used for caching, or "on-die," i.e., built directly into the CPU's chip. When used as a noun, though, cache typically refers to the actual size, location and/or type of memory used for storing the information. There may also be several successive layers of cache, each of which is larger and slower than the one preceeding it. For example, a CPU might have 64KB of "on-die" cache (which we will refer to as level one (or "L1") cache, 512KB of slower cache on the "processor card" (the second or "L2" cache) and 1MB of yet-even-slower cache in some sockets right by the connector for the CPU on the motherboard, which we will refer to as the third or "L3" cache. Of course, you may have a CPU (or computer) which has no CPU cache, only L1 cache, or L1 and L2 cache. The only computers I can recall seeing recently which have L3 cache are servers, which most people do not buy for home use.RegardsAryeh Goretsky

Link to comment
Share on other sites

That goretsky has always been so thorough and relevant, but in this instance he did forget one small point:The word "Cache" can also be used as a noun, as in the following sentence: "Give me all your Cache". At which point, no matter how much RAM you may have (or you may not have) becomes totally inconsequentail... ;)

Link to comment
Share on other sites

However, I do not understand the relationship between RAM, VM, and cache.Maybe there is none regarding the cache.
There is. What data the operating system will not immediately use is stored/cached in a 'page' (smallest unit in memory allocation) for quick access when needed. Pages stored in RAM is called a 'page cache' while pages stored on the hard disk is what you call 'VM'. This VM could either be a file, called a swap file or pagefile or, in Linux, a swap partition. The swap file/partition supports the page cache so swapping or paging happens when the stored data is accessed by the processor (as has been pointed out, the procesor has its own 'cache', and so does the hard disk, called 'buffer memory'). Edited by b2cm
Link to comment
Share on other sites

There is. What data the operating system will not immediately use is stored/cached in a 'page' (smallest unit in memory allocation) for quick access when needed. Pages stored in RAM is called a 'page cache' while pages stored on the hard disk is what you call 'VM'. This VM could either be a file, called a swap file or pagefile or, in Linux, a swap partition. The swap file/partition supports the page cache so swapping or paging happens when the stored data is accessed by the processor (as has been pointed out, the procesor has its own 'cache', and so does the hard disk, called 'buffer memory').
Thanks, b2cm. That helps also.Jerry
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...