Friday, April 27, 2012

How to Set the /3GB Startup Switch in Windows

/3GB is a boot.ini switch that restricts memory usage of kernel mode to 1 GB.

Windows Server 2003 includes support for a startup switch that lets you tune the allocation of use of memory and memory address space.
Regardless of the amount of physical memory in your system, Windows uses a virtual address space of 4 GB, with 2 GB allocated to applications and 2 GB allocated to the operating system and kernel-mode drivers.
On systems that have 1 GB or more of physical memory, these two startup switches can be used to allocate more memory to applications (3 GB) and less memory to the operating system (1 GB).
This additional virtual address space helps reduce the amount of memory fragmentation in the virtual address space of the Exchange information store process.

The /3GB switch is used to effect this allocation change. The switch is entered in the system’s boot.ini file and takes effect after a restart.

The /3GB switch is supported only on the following operating systems:

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

Note:- Windows 2000 Server does not support /GB and may cause OS or application crashes. 

To Set the /3GB Startup Switch in Windows Server 2003:

1.Right-click My Computer and select Properties. The System Properties dialog box will appear.
2.Click the Advanced tab.
3.In the Startup and Recovery area, click Settings. The Startup and Recovery dialog box will appear.
4.In the System startup area, click Edit. This will open the Windows boot.ini file in Notepad.
5.In the [Operating Systems] section, add the following switches to the end of the startup line that includes the /fastdetect switch: /3GB
6.Save the changes and close Notepad.
7.Click OK two times to close the open dialog boxes, and then restart the computer for the change to take effect.

Recomendations:

Less than or equal to 3 GB​ --> Do nothing. The OS and SQL will determine what's best.​
4 GB​ ​ --> Use /3GB in the boot.ini. AWE is not needed and will be ignored if enabled.​
5 to 16 GB​ ​--> Use /PAE in the boot.ini and AWE in SQL. The /3GB and /USERVA=2500 switches are optional.​
More than 16 GB -->​ ​ Use only /PAE in the boot.ini and AWE in SQL. The /3GB and /USERVA switches cannot be used.​