Kudzu World

"Programming is an art form that fights back"

Kudzu World  »  Blogspace  »  Kudzu's Tech Blog
English - Română - Русский - عربي

RSS Feed

If you want to more easily stay informed of updates etc you can subscribe to the RSS feed. Just point your RSS reader at this page, auto discovery is enabled.




Windows - When 4 = 3

8/12/2006

I just built a new machine and loaded it up with RAM to 4 GB. Little did I know that I would need a 64 bit version of Windows to use it all. After all 32 bits allows for 4 GB of address space, and the Microsoft web site says Windows 32 bit can handle up to 4 GB. But in most cases, if you want to use more than 3 GB of RAM, you will need to use a 64 bit version of Windows, and even then you may still be stuck at around 3 GB depending on your hardware (Even if it says it supports up to 4 GB).

No this is not new math. And its not some attempt to define a "Gig" to mean a lower numerical value as hard drive manufacturers did by declaring a "Meg" different from a Megabyte. Windows XP and 2003 can see up to 4 GB of RAM, but in most cases they can actually only use a little over 3 GB. This can leave you with about 1 GB of unused RAM. To use more, you need to use 64 bit editions of XP or 2003, but there are some more gotchas as well.

Driver Space

Devices in your computer such as PCI, RAID, and SCSI cards require memory space. This is not the same as actual RAM, but they require addresses in the address space. Different hardware consumes different amounts, and video cards even with dedicated RAM still need memory space. This is different than video cards with shared memory. In this case the memory space is used by the drivers to communicate with the devices. The amount of address space that is required depends on your system. But for every address that needs reserved for a driver, this is space that Windows cannot use to access your real memory. So if drivers consume 512 MB, that is 512 MB of address space that cannot be used to access memory. If you have 2 GB, it is no problem because 2 GB is used for memory and there is still 2 GB that can be used for drivers. But if you install 4 GB, then Windows can only use 3.5 GB of address space for memory as 512 MB (0.5 GB) is in use by a driver. This leaves you with 512 MB of unused RAM.

In my case my drivers were using 1 GB of address space which is a little higher than normal but not unusual. From some basic surveys it seems that the average system has between 0.5 and 1 GB of reserved space for drivers. To see the full 4 GB, you need 4 GB + driver space of address space. In my case I needed 5 GB of address space, which is beyond the limits of a 32 bit operating system.

Enter and Exit PAE

Many processors support a feature called PAE which allows more than 4 GB to be accessed while still retaining a 32 bit address space. In Windows an option could be specified in the configuration to enable this on systems with large amounts of memory to push the driver space out above 4 GB. Unfortunately this had side effects and many drivers are poorly written by hardware vendors. It was found that many of these drivers made assumptions and caused crashes when running with PAE. Since most drivers run in a less restricted mode (for necessary reasons) when they crash it can and often does brings down the whole system. Vista and Longhorn improve on this by creating more levels, but this is a major change and not something to be done in a service pack. Because of these issues, in XP Service Pack 2 this behavior was disabled and the drivers were forced to use address space within the 32 bit range. Systems with large amounts of RAM after XP Service Pack 2 may show less RAM because of this.

Motherboard Support

Many motherboards only support 4 GB of address space. And in such cases the hardware is the limitation. Even though they say they support up to 4 GB of RAM, they really support up to 4 GB of address space. You can only use that 4 GB of RAM in theory. That is if you have no hardware that requires address space, which is unlikely. If you wish to use 4 GB of RAM you should also have hardware that supports 6 GB of RAM or more (5 is an odd number, I have never seen a motherboard that supports 5 GB, but maybe one exists).

64 bits and Drivers

Upgrading to a 64 bit Windows may not be painless either. Most of your applications will run just fine. However you will need 64 bit drivers for your hardware. If you have old, odd, or cheap hardware the vendor may not provide 64 bit drivers.

I now see 4 GB

Under XP 32 bit, XP was only able to use 3 GB of my RAM even though i had 4 GB installed. My motherboard supports 8, so I had plenty of room for drivers as well. With XP 64 bit version, XP can now see the full 4GB. In the future I plan to upgrade, but now I know that 6 GB may be a better choice for me than 8 GB since my motherboard only supports 8. However it could be that when they said 8 GB of RAM, they really meant RAM and not address space. Unfortunately you just have to test it out with each motherboard. But for now 4 GB is very nice, and the 2 GB DIMM's are just too expensive for me anyways.

Vista 32 bit

32 bit Vista can better access 4 GB and beyond than XP using better PAE support. However enabling PAE in Vista also causes Vista to run slightly slower. Enable 4GB of memory on Vista

<< Previous Entry    Next Entry >>

Comments:

1C0N on 6/11/2009 wrote: WOW
gmat on 6/11/2009 wrote: why is it so easy to be made it

Post a comment

Use my contact form to contact me directly.