3GB Switch in Windows boot.ini

3GB Switch in Windows boot.ini

The /3GB or 3GB switch in the boot.ini file lets you tune the use of memory and memory address space in your computer. The /3GB switch specifies the amount of memory for user-mode virtual address space. It is used to allocate more memory to applications and less memory to the operating system.

The /3GB switch increases the size of the user process address space from 2 GB to 3 GB.

This can improve performance of servers that run virtual-memory-intensive applications. That is for example database servers. A larger address space can improve a database server performance.

How does the /3GB switch work?

By default Windows provides applications with a flat 32-bit virtual address space that describes 4 gigabytes of virtual memory. In other words, regardless of the amount of physical memory in your system (RAM), 32-bit versions of Windows only use a virtual address space of 4 GB.

The address space is split so that 2 GB of address space is directly accessible to user-mode processes (applications, for example your Opera Browser and the other 2 GB is only accessible to kernel-mode processes (Windows operating system, drivers, etc.).

The 32-bit versions of Windows were later in their production cycles improved to provide applications with a 3 GB flat virtual address space, with the kernel and executive components using only 1 GB.

This is accomplished by adding the /3GB switch to the boot.ini file. Adding the /3GB switch to the boot.ini file will not increase the amount of physical RAM memory, the 3GB switch just tells the computer to allocate the existing memory space differently.

The 3GB boot.ini switch is often used on Windows Server 2003 which includes support for the 3GB startup switch.

What is the benefit of using the 3GB switch?

Depending on what software you run on your server, it might make sense to optimize the server memory usage. If for example you are running only a few memory extensive large applications that do not interact with the operating system but rather work on their own, you might want to consider implementing this switch.

The additional virtual address space that you give applications with the 3GB switch helps reduce the amount of memory fragmentation in the virtual address space.

What values can the /3GB switch take?

The switch can have any value between 2048 (2 GB) and 3072 (3 GB) megabytes. It needs to be expressed in decimal notation.

With the switch, Windows will use the remaining address space (4 GB minus the specified amount) as its kernel-mode address space. 

How do I find out what boot.ini options my server uses?

You can see this in the boot.ini file, of course. Another more detailed way is to research registry settings. In this case, you would go to the Start menu, click Run, type REGEDIT, and hit ENTER.

Locate the following registry keys section:


How do I set the /3GB switch in Windows Server 2003?

Setting the /3GB switch for your server is very easy. Execute the following steps:

-> right-click My Computer
-> Properties
-> click the Advanced tab
-> click Settings in the Startup and Recovery area
-> click Edit in the System startup area

This will open the Windows boot.ini file in Notepad.  See the following print screen:

3GB setting print screen

Locate the [Operating Systems] section and add the /3GB switch to the end of the startup line that includes the /fastdetect. Now you can save the changes, close Notepad, and click OK to close all the open dialog boxes.

You need to restart the computer for the change to take effect.

Boot.ini file /3GB switch example

This is what your default boot.ini file before you make the change might look like. The timeout and partition and other parameters depend on your setup. Pay attention to the line with the /fastdetect.

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect

And, below you can find what the boot.ini file should look like after making the change.

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise with /3GB" /3GB /fastdetect

Make sure you do not enter a typo in this file as it might result in being unable to start your computer.

Do I need to reboot the server after adding the /3GB switch?

Yes, the /3GB switch entered in the system’s boot.ini file and takes effect after a restart.

Which operating systems support the 3GB switch?

The /3GB switch applies to 32-bit systems only. The following is a list of operating systems that support the 3GB switch:

  • Windows Server 2003 Standard Edition
  • Windows Server 2003 Enterprise Edition
  • Windows Server 2003 Datacenter Edition
  • Windows 2000 Advanced Server
  • Windows 2000 Datacenter Server

This is a list of officially supported operating systems that can handle the 3GB switch. Other systems may or may not handle it well depending on the hardware and software configuration.

Can I use the /3GB switch on Windows XP?

Adding the 3GB switch to the boot.ini file in Windows XP SP1 can cause Windows not to start.

A supported fix is available from Microsoft, but it is only intended to correct the problem resulting from this specific setup. The solution to this problem is upgrade to the latest service pack. You can read more about this problem on the following Microsoft page:

Windows XP SP1 May Not Start with the /3GB or /USERVA Switch

Can I use the /3GB switch on Windows Server 2000?

The 3GB switch is officially supported on the 2000 Advanced Server. The official word is that it should not be used on Windows 2000 Server because it is unsupported and can cause application or operating system to crash.

Important warning

Any time you make a change to the boot.ini file, make sure that you have all your data backed up!

Are there any other boot.ini parameters that I should know about?

Yes, you might be interested in knowing about the /fastdetect switch: Fastdetect boot.ini switch.

The Data Execution Prevention DEP setting can be also implemented in your BOOT.INI file through the NOEXECUTE switch. See the noexecute DEP parameter in boot.ini page for more details.


Discuss this article or this topic in our discussion forum:
(The table bellow shows a list of 8 most recent topics posted in our discussion forum. Visit our discussion forum to see more. It is possible the links below are not related to this page, but you can be certain you will find related posts in the discussion forum. You can post one yourself too.)
Email this article to a friend:
2 + 6 - 3 = 
How can I link to this web page?

It is easy, just include the code provided below into your HTML code.

<a href="http://www.maxi-pedia.com/3GB+switch+Windows+boot.ini+3+GB" title="www.Maxi-Pedia.com: 3GB Switch in Windows boot.ini" target="_blank">3GB Switch in Windows boot.ini</a>