Tuesday, April 17, 2012

/3GB switch for window xp to tune the use of memory

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.

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.

Adding the 3GB switch is very simple. You first need to locate your machines Boot.ini file which should be located in the root of your main system drive. (Be aware that this file may be hidden and marked as read-only initially.) You will want to open this file in a program such as Notepad to edit it properly.

Alternatively, you can edit the boot.ini settings through the System Properties:
  1. Right-click on My Computer
  2. Choose Properties
  3. Click the Advanced tab
  4. Click Startup and Recovery Settings
  5. Click System Startup Edit
You will now see and be able to edit the contents of the boot.ini file. Click OK when done to save your edits.

Note: Before adding the 3GB switch, it is important to note that the switch is very picky, and requires that every device and driver on your system be fully WinXP compatible in order to work at all. If anything in the system is not compatible, Windows will not load at all when restarting with the 3GB switch activated. The only way to then remove the switch from the Boot.ini file so that Windows can load is to either mount the drive in another system and manually change the boot.ini file, or reformat the drive and re-install Windows. Both solutions are far from ideal.

To safely add the 3GB switch we strongly recommend adding a second instance of the OS in the boot.ini, and add the /3GB switch to that second version.

----- default boot.ini without 3GB Switch -----
This is what a default boot.ini file will look like. (This may differ from system to system.)

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Pro"

----- updated boot.ini with 3GB Switch -----
This is what the updated version should look like. Notice the /3GB that has been added to the second instance of the OS line.

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Pro"
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Pro with /3GB" /3GB

Once you have updated your boot.ini file accordingly and have saved the changes, simply restart your system for the changes to take affect. When your system reboots you will be given the option to choose either the standard Windows XP version or the 3GB switch enabled Windows XP version. If you choose the 3GB version and it fails to allow Windows to properly load, just restart your system and you will be given the two options once again, where you can then choose the standard Windows XP version to load. Either way, if it works or doesn't, you can then remove whatever line you don't need in the boot.ini file. Alternately, you may wish to leave both settings so that you can choose to boot without the 3GB switch should you ever have problems with drivers installed in the future. The boot loader will default to the first option listed in the file. So you may want to put the /3GB option first. You may also wish to lower the timeout value to something quicker so that you don't have to wait for 30 seconds or press Enter with each boot.

Note: The 3GB switch is only compatible with the following versions of Microsoft Windows.

  • Windows XP Professional (and greater)
  • Windows Server 2003
  • Windows Server 2003, Enterprise Edition
  • Windows Server 2003, Datacenter Edition
  • Windows 2000 Advanced Server
  • Windows 2000 Datacenter Server
  • Windows NT Server 4.0, Enterprise Edition

No comments:

Post a Comment