Question: What is all this 4 GB limit on Windows 32-bit system?
Answer: Ok, a lot of people still don’t understand and get about this memory addressing business that happens in correlation to their hardware and the software interaction. I’ll attempt to answer these questions by trying demystifying this conundrum.
So, let’s start out with the basic fact that 32-bit is basically 2^32 bits which translate to 4 GB. From this basic math, we can figure out that if an address is 32-bit wide, its capacity will be 4 GB wide. This is a mathematical limit which has been imposed on all 32-bit systems in use worldwide.
Now I know you guys will be wondering … “ok, I get the math and see where this 4 GB limit is, but why doesn’t it show 4 GB of RAM on my system?”. This is where things get interesting.
The root problem lies in how the x86 architecture was designed in the first place. The x86 architecture was designed by Intel in the 1970s as a 16-bit processor. With the popular 80386 (also known as the i386), 32-bit was introduced into the x86 architecture. One reason why the x86 architecture have become so successful is the fact that it’s one of the few architecture that emphasize on backwards compatibility than radical architectural changes for each generational change. One of the components that have been kept since the original x86 architecture is the way the processor maps the memory addressing. In the original x86 memory addressing, all additional memory from other devices are actually mapped into the main memory address space.
Not only does this affect the physical memory address space, but include all virtual memory address spaces. The virtual memory address space is not “virtual memory” (which in fact is called “pagefile” not “virtual memory”). The virtual memory address space is the virtualization of the physical address space in order to allow each application “think” that they have 4 GB to play with. On top of that you have to take out 2 GB for kernel space applications. This only leaves 2 GB for your typical userland applications like all the applications that you see up front. To make matters worse, your VRAM’s allocation also affects your virtual memory addressing. That means in theory your applications have 2 GB to use, it really doesn’t. In the example, it’ll have only 1.5 GB. This is an issue in large games. Fortunately for UNIX users, this isn’t much a problem since each application gets its own 4 GB virtual memory addressing, including the kernelspace. The virtual memory address space is not shared by anyone. However, it comes at another price, the flush time required to scrub the memory address after it’s done.
People will start asking, “how about this PAE thing we heard about or the /3GB switch?” PAE stands for “Physical Address Extension”. As the name suggests, it extends the physical address space. I’m not going into details about PAE, but basically, it will not affect the fact that you’re still limited by your VRAM in the virtual memory space. You can use 4 GB or more, but your software will be unaffected by it. It is usually used as a temporary solution as there are a slight performance impact due to the fact it uses the pagefile to make PAE work. The /3GB switch poses a different issue. The 3GB switch was designed to partition the virtual memory address differently where the userland applications get 3 GB of virtual memory addressing while the system only gets 1 GB. By doing this, you have to make sure that your system doesn’t get starved of memory addressing and collapse. It’s a nightmare for people that are running a lot of services or a lot of kernel-space drivers. So you should only use the 3 GB switch if you REALLY KNOW WHAT YOU’RE DOING!
So what’s the best way to fix this issue? Go 64-bit. Answer is simple and transitioning to it is simple as well. Most drivers for devices that were manufactured since 2007 should have 64-bit support already. Also, brand name manufacturers have basically guaranteed most of their devices are supported in a 64-bit environment. All AMD processors from the K8 architecture, which is since 2004 and all Intel Core 2 including some Pentium 4 and Pentium D processors are 64-bit processors. You can check this by making sure it has EM64T support. You can obtain Windows Vista x64 just by entering in any Windows Vista license key (excluding Starter Edition). The Windows Vista license works interchangeably between 32-bit and 64-bit Windows.
Question: What is SuperFetch and what does it do?
Answer: Microsoft describes SuperFetch as an
intelligent caching routine [that] is designed to overcome performance problems caused by the biggest bottleneck on most PCs today, the disk I/O subsystem, whcich works at a relative snail’s pace compared to CPU and memory speeds. SuperFetch observes your computer usage patterns over extended stretches of time (noting the programs you run and the days and times you typically run them) and adjusts caching behavior to optimize perfromance of the programs and data fils you use most frequently.
Windows Vista Inside Out, p. 886
SuperFetch is automatically turned on but if you turned it off or you’re using Windows Server, all you have to do to turn it on is to follow this guide.
Question: Should I ever turn off my pagefile? I heard that it’s better to turn off the pagefile if I have enough memory installed on my system because the memory runs faster than the hard drive.
Answer: Using basic computer theory, that should be true. The memory does run infinitely faster than the hard drive. Unfortunately, turning off the pagefile is never recommended because it may cause Windows to behave weirdly. Microsoft recommends against running without a pagefile as it is explained on Windows Vista Inside Out:
If your computer has a large memory installed, you should eliminate your pagefile completely. This is incorrect. Although you can configure Windows so that it does not set aside any virtual memory, no reputable source has ever published benchmarks establishing any performance gains from doing so, and Windows simply wasn’t designed to run without a pagefile. If the goal is to conserve disk space, a more sensible strategy is to configure Windows to create a pagefile with a relatively small minimum size and monitor its usage over time to see how much virtual memory the operating system actually uses in daily operation.
Windows Vista Inside Out, p. 891
So next time if people suggest you to turn off your pagefile, it’s best not to heed their advice. The best way is to let Windows manage your pagefile or set double the amount of memory installed on your hard drive. The latter option is very popular among UNIX users as that has been found to be the best setting for both Windows and UNIX systems.