Calendar
January 2010
M T W T F S S
« Dec   Dec »
 123
45678910
11121314151617
18192021222324
25262728293031
Archives
Sponsored Links

Topics covered:
Memory and Memory Optimization
Virtual Memory, PageFile
Basic Binary

Software Tools covered:
Computer Properties/Advanced System Settings

In the 1st part of this series we ended with a short discussion of Hard Drives.  In this article we will be discussing memory and memory optimization.  Student in my A+ Classes at this point would get a 90 minute exercise in the Binary, Octal, and Hexadecimal numbering system, but we will dispense with that for now, just remember computers are just machines that manipulate numbers. They have become very fast but are really kind of dumb as at their basic level they only work with 2 numbers 0 and 1.  This is called the binary system.  We humans are accustomed to the base 10 or decimal system.  Hexadecimal and Octal systems were created for computers to easily express large numbers rather than their binary system.  Why do you need to know this?  It will help your understanding of how the different areas of your PC function.  You will begin to see what a 32bit operating system can only address 4Gigs of ram basically because that is all the higher it can count.  “Oversimplified but true”

(Q)What is a bit?
(A) A bit is the basic unit of information in computing and telecommunications; it is the maximum amount of information that can be stored by a device or other physical system that can normally exist in only two distinct states.  These two states are 0 and 1

(Q) Then what is a byte?
(A) A Byte is a unit of digital information in computing and telecommunications. It is an ordered collection of bits, in which each bit denotes the binary value of 1 or 0. Typically it is 8 bits long.
With 32 bits the largest number we can represent is a little over 4 Billion 4,294,967,295 to be exact.
How can we add more than 4G memory to a computer that only runs a 32 bit operating system…lt can’t even count that high!

Now that did not take 90 minutes and it wasn’t that painful was it?

All these bits and bytes is what is stored in RAM.  When most of us think of memory and PC’s we think of RAM (R)andom (A)ccess (M)emory.  There are many components and chips that have memory that can be addressed by your processor but most of these we have little control over as they cannot be easily replaced. Ram however can be easily expanded on most systems, within limitations.  Ram has become one of the easiest and most cost effective ways to increase the speed of your computer.

In part one of this series we discussed the recommended size of RAM for XP, VISTA, and Windows7. RAM has gotten so inexpensive that if you are running a 32bit operating system you may as well purchase 4Gig of Ram and be done with it, assuming your mother board supports 4G, most systems less than 3 years old, unless it be a notebook more than likely support 4G.  Refer to your system documentation to be sure.
Do you need 4G of Ram?  That depends on what you do with your PC.  Very few games even require more than 2G of Ram.  I use dual monitors and am normally running multiple applications most of the time.  Each one of those applications has a memory requirement and they can add up quickly.

Not having enough ram usually does not keep you from running a program or performing an operation. When your PC performs a process that requires more physical memory than what you have installed Windows Virtual Memory Manager comes to the rescue.  It does this by allocating an area on your hard drive by creating a special file called Pagefile.sys to simulate the physical memory you do not have but the operation requires.  It’s called a page file because memory is stored and addressed by a memory location (like a row and column in excel) and the VMM, (V)irtual  (M)emory (M)anager), moves inactive data from physical memory to the pagefile in a process called paging or swapping.   It tries to keep in physical memory what it thinks the processor is going to need next and swap out what it won’t need for a while to the hard drive.  It is constantly doing this for you behind the scenes, and does a pretty good job of it. The disadvantage is that your hard drive is an extremely slow memory replacement.  Even though VMM does a good job of trying to keep up with requests from the processor, any time the processor needs to access information stored in memory locations that point to the pagefile.sys it must wait while the information is retrieved through that painfully slow hard drive.

Have you ever gotten the error “Your system is low on virtual memory. To ensure that Windows runs properly, increase the size of your virtual memory paging file. For more information, see Help”?  When you clicked ok you probably got the following:

“Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied. For more information, see Help.”

While your memory was being resized, more than likely a program or two also stopped responding.
What can we do?  The most obvious is increase the RAM installed.  It’s a pretty cheap upgrade and if you’re operating system is only 32bit we are only talking 4G memory anyway.   But what if this only happens occasionally or you do not want to purchase additional RAM, in some cases you may not be able to purchase ram.  (Some  older RAM such as RAMBUS memory is now extremely expensive as it is no longer being manufactured).

The following screen captures are from Windows7.  Vista and XP are very similar and the procedure is the same.

Vista 7 Information


1. Open the Start menu - Right Click on Computer and click Properties
 – note how much installed memory you have installed







Advanced System Properties
2. Click on Advanced system settings tab and then Settings in the Performance Area





















change virtual memory settings



3. Click on the Advanced tab again
4. Under Virtual memory, click on the Change button



















manage virtual paging file
5. Uncheck the automatically manage paging file size for all drives.



















6. You can now manually change the drive and size.

There are several thing we can now do, depending on how our current PC is set.

By Default, XP, VISTA and WINDOWS 7 store the paging file on the same drive as the operating system.
Usually this is the c: drive. If you have another physical drive listed, (not a partition on the same physical drive), and want to use it.  Make sure the drive it at least as fast or faster than the drive your operating system is on.

Click on the drive letter you want to change or add a paging file to
Note: the radio buttons

System managed size – allows the operating system to automatically manage this for you
Custom Size – allows you to enter Initial size and Maximum size
No paging file – allows you to remove the paging file from the drive selected.
You would only do this if you have more than one drive that has a paging file.  If you remove all paging files your system will slow down drastically! Even if you have plenty of RAM, some programs must have virtual memory to run!

We discussed fragmentation in part one of this series, but did you know that your paging can also become fragmented?  Most defragment programs will not be able to defrag this file normally because it is always in use.  One way to defrag it is to remove the paging file completely, reboot the PC, then defrag the drive and then recreate it.  When you do recreate it, you can take some steps that will not only improve the performance of your system but reduce the future fragmenting of the paging file.  Pick Custom Size and set the initial size and maximum size to the same value.  In that way you eliminate the system from ever having to resize the paging file, which not only takes time, but fragments the file.

For 32bit Systems: We need to allow for 4096MB of memory usage, as this is all that can be addressed by 32bit operating systems.

We can use the following formula:  Size to enter in initial and maximum boxes = 4096 minus (-) the amount of physical ram installed.  Example:  if you had 768M ram you would set initial and maximum to 3328.

adjusting virtual memory settings

Select set to complete the operation

To move the paging file to another drive

Step 1: Select the drive where you want the new paging file located then select custom size and enter the size we calculated in the steps above, or you can pick system managed size, but remember when we let windows manage it, as it shrinks and grows it will become fragmented. When done click Set.

 Step2: Select the original drive location, and then click no paging file. When you do you will get a warning similar to this: “If the pagefile on volume C: has an initial size of less than 126 megabytes, then the system may not be able to create a debugging information file if a STOP error occurs.
Continue anyway?”   By selecting yes, if you ever get the Blue Screen of Death, the memory dump file will not be created”.  I personally have never used the memory dump file for troubleshooting BSOD, (B)lue (S)creen (O)f (D)eath errors,  however if this is a concern see below:

NOTICE: The optimal solution is to create one paging file that is stored on the boot partition, and then create one paging file on another partition that is less frequently accessed on a different physical hard disk if a different physical hard disk is available. Additionally, it is optimal to create the second paging file so that it exists on its own partition, with no data or operating-system-specific files. By design, Windows uses the paging file on the less frequently accessed partition over the paging file on the more heavily accessed boot partition. An internal algorithm is used to determine which paging file to use for virtual memory management. The above notice re Microsoft: KB314482

64Bit WindowsI have given you some recommendations for optimizing 32bit systems and the same basic rules apply for 64bit systems such as moving the pagefile and the setting of the initial and maximum pagefile sizes the same to prevent fragmentation.  However there are some differences to take into consideration.  The first is the fact that theoretically a 64 bit system can support up to 18 Exabytes of memory.  How big is 18 Exabytes – Well let’s just say Bill Gates couldn’t afford it.  One Exabyte = 50,000 years of DVD quality video.  This is a theoretical limit.  Current Limits for Windows Operating systems as follows:

XP- 128G

Vista Home Basic – 8G
Vista Home Premium – 16G
Vista Business and up – 128G

Windows 7 Home Basic – 8G
Windows 7 Home Premium – 16G
Windows 7Professional and up – 192G

If you are running a 64bit system I recommend 4G of memory to start with.  Because most applications and games currently are written for 32 bit systems they will not take advantage of 64-bit processing.  As 64bit systems become more common place this will more than likely change.

Note: Currently, most hi-end PC motherboards do not support more than 24G or 6 slots.

This concludes part two of the series.  In Part two of Speed up my PC, we examined the memory requirements of  XP through Windows 7, very basic Binary numbering overview, looked at Virtual Memory Manager and the page file,  and ways of optimizing the pagefile.  In Part three we will physically install the Memory.

Watch for Part 3 the 3rd week of January 2010.  Until then, God Bless
Be sure to bookmark this site or subscribe to our RSS feed to keep up with the latest posts.

Leave a Reply

You must be logged in to post a comment.