Hack #32. Install the RAM Your Operating System Needs

Understand how your operating system and applications use RAM to solve memory dilemmas.

With today's operating systems and applications, the more RAM you can feed them, the better. Yes, Windows 95 only required 4 MB of RAM while Microsoft recommended 8, but trying to run Windows 95 on a system with less than 32 MB of RAM is definitely frustrating. The memory requirements for all versions of Windows are listed in Table 4-1.

Table 4-1. Windows operating system memory requirements and recommendations

Operating system

Minimum amount of memory required

Amount of memory Microsoft recommends

Practical recommendation

Windows 95

4 MB

8 MB

32 MB

Windows NT

64 MB

128 MB

128-256 MB

Windows 98/98SE

16 MB

24 MB

32-64 MB

Windows Me

32 MB

> 32 MB

64-128 MB

Windows XP

64 MB

128 MB

256-512 MB

Windows 2000

128 MB

256 MB

256-512 MB

Windows 2003

128 MB

256 MB

512-1,024 MB

Windows 98 was rumored to go into a memory-addressing performance frenzy with over 128 MB of installed RAM, but after much research this appears to be myth rather than truth. There is, however, a certain truth out there that may have implicated Windows by coincidence.

I've been exposed to several different system board chipsets as well as a variety of CPU choices from AMD, Cyrix, and Intel. It is evident from the sampling of chipset data in Table 4-2 that mass use of these chipsets in PC hardware was coincident with the era of Windows 9x (1995-2000). Keep in mind that these caching limitations in hardware affect Linux and other operating systems as much as they do Windows.

A RAM caching limitation is known to exist within the L2 cache features of some Intel chipsets and early Pentium II CPUs. The L2 cache of pre-dA1 production stepping level Pentium II CPUs is limited to caching up to 512 MB of memory. The Pentium II is not the only culprit in RAM limitations.

Table 4-2. Chipset cacheability limits

Vendor

Chipset

Supported CPU

Cacheable limit

ALi

Aladdin III

P54C

256 MB

AMD

640

P54C, P55C

768 MB

Intel

430 FX

P54C

128 MB

 

430HX

Pentium

512 MB

 

430LX

P5

192 MB

 

430VX, 430TX

Pentium

64, 128, 256 MB

 

440EX

Pentium II, Celeron

256 MB

 

440 FX

Pentium Pro, later

4 GB

 

815, 815e

P II, P III, Celeron

512 MB

OPTi

Python, Cobra

P5, P54C

128 MB

 

Viper

P54C, P55C

512 MB

SiS

501-503

P5, P54C

128 MB

VIA

VP, VP2, VPX

P54C, P55C

512 MB

Cacheability significantly impacts overall system performance. Caching RAM significantly speeds up processing. If the L2 cache cannot, for example, accommodate more than 64 MB of RAM, that leaves any RAM in excess of 64 MB uncached, which means read and write performance is slower for a considerable amount of system memory (but faster than swapping to disk).

With the coincidence between Windows and various chipsets, it is quite possible that chipset and CPU limitations are to blame for the ill-placed rumors of Windows's memory-handling concerns. But I won't let Microsoft completely off the hook yet. According to Microsoft's Knowledge Base article 304943, Windows 98 and Me are specifically not designed to handle more than 1 GB of RAM. Above that amount, Windows may not boot completely, or it can crash. As we'll see in [Hack #33] , there is also another memory handling issue in Windows.

Certainly "huge" sums of RAM are possible with Windows 9x or Me (up to 1 GB), but unless your applications require it or you work with large datafiles, more RAM may not be possible, practical, or efficient for some PCs. In the good old days, 16 MB of RAM was considered a lot and was very expensive—as costly as 64 or 128 MB memory components are today.

The trick is to balance overall system performance with the ability to get your work done. If you have a caching-impaired system that runs acceptably with 64 or 128 MB of RAM but you cannot work with your applications, you may have to sacrifice a bit of system performance because of the caching limitations by adding more RAM to get the job done. In any case, when your applications and data need more RAM than you have installed, Windows will swap out certain portions of itself, programs, and data to the swapfile, but performance will be so degraded that you probably won't be able to tolerate the sluggish behavior.

Large amounts of RAM are typically necessary only for processing graphic-intense programs like video games or drawing/rendering programs, as well as spreadsheet and database programs that process a lot of data. For these kinds of programs, adding more RAM (to 512-1,024 MB) has advantages in productivity, despite the overhead processing time the CPU consumes to address the "excess" RAM if it cannot be cached. More common activities like browsing the Web, reading or sending email, editing a chapter of a book, or figuring out your taxes are not as demanding of RAM and CPU time and will do just as well or better with an amount of RAM that is within the limits of your system's chipset cache and Windows.

The old, basic PC and DOS only needed to address a megabyte of RAM, and 384 KB of that was occupied by I/O device addressing between 640 and 1,024 KB without the addition of LIMS-EMS memory-enhancement software, such as Microsoft's EMM386 or the former Quarterdeck's QEMM driver software. In this regard, you were considered an avant-garde PC user if you had 8-32 MB of RAM and had "hacked" QEMM into your system to allow you to run Windows 3.x or 9.x and assorted applications more efficiently, or even Quarterdeck's DesqView or DesqView/X or IBM's OS/2 to enjoy a higher level of protected multitasking.

Windows NT, 2000, XP, and 2003, and even Windows Me, are significantly different from the legacy DOS+Windows configurations. Windows Me started up with DOS but quickly dismissed 16-bit DOS, loading in 32-bit Windows instead—to give the consumer a taste that DOS was indeed on the way out. Just as corporations skipped over Windows Me and stuck with 98 for the longest time, most consumers never saw anything like Windows NT or 2000 until Windows XP appeared, combining the significantly more stable components of a proven Windows 2000 OS with glitzy graphics taken from 98/Me and enhanced to the next level.

With Windows NT, 2000, XP, and 2003, the old DOS ways and limitations were banished from PCs forever—replaced with a graphical operating system that took over the motherboard and all system resources from the moment the BIOS finished testing the hardware and located a suitable boot-up device and the operating system. Perhaps the most important thing about Windows NT through 2003 is that we don't have to worry about different types of memory—DOS RAM, Extended Memory, Expanded Memory, etc. These operating systems see, address, and use all the memory that is available to them as one large chunk; there are no separate DOS and Windows portions of RAM to be concerned with.

The important message here is to provide an adequate amount of RAM based on your needs and system capacity. DOS alone is fine with 640 KB. For DOS+LIMS-EMS, with or without a memory manager like QEMM, with or without Windows 3.x-9x, 32-64 MB up to 128 MB of RAM is a real treat for select applications but not too practical or applicable for present-day computing applications.

Foraying into Windows based on Microsoft's "New Technology" (as "NT" stands for), you have a long way to go to exceed their memory limitations—4 GB today—though you may still be chipset-limited on memory efficiency. NT—whether in the form of Windows 2000, Windows XP, or Windows Server 2003—handles 4 GB just fine; your applications may never use all of it, but Windows will put it to use. These operating systems completely control memory addressing from bootup through shutdown—no meager 16-bit DOS limitations involved, ever. All of the RAM in the PC is available to the operating system to parcel out for operating system needs or applications. With many applications consuming 16-32 megabytes of memory to simply load and run, this is an important capability.

NT-based systems will make efficient and effective use of as much RAM as you can supply—but you will do fine with 512 MB. If you have an application need for more than 1 GB of RAM, be sure to pick a system board that will handle more than a gigabyte. The majority of system boards in prebuilt, off-the-shelf PCs or available to do-it-yourself geeks handle a generous 1-2 GB of RAM just fine.

If you've been limping along on 64-128 MB of RAM with Windows XP, splurge a little and kick the amount of RAM up a few notches to 256 or 512 MB and you will be amazed at the performance difference. Your system will boot and run significantly faster because the operating system has enough RAM for itself and several applications without ever having to swap inactive or low-priority memory contents off to the hard drive. Remember that RAM is orders of magnitude faster than a disk drive, so the more you can use RAM instead of the swapfile the better.

To judge the "right" amount of RAM and the impact of having more, consider that Windows XP itself needs a bare minimum of 64 MB of RAM to boot up and run. Beyond that you can start adding up the memory requirements of various applications by looking at the list of processes in Windows Task Manager.

A typical Microsoft Office application and document like this chapter will consume 32-64 MB, forcing a lot of memory content to the swapfile, so 128 MB of RAM barely keeps the operating system, your application, and data out of the swapfile. With 256 MB of RAM, most of the operating system and application should stay in RAM with room left over for virus protection, instant messenger applications, and other software programs. At 512 MB, there is more than enough room for the entire operating system, system cache, a typical office application, browser, IM programs, and virus protection with very little swapping of memory to the swapfile.

Get PC Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.