Powered By Blogger

Thursday, January 27, 2011

Techniques for Accessing more than 4GB of memory in 32 Bit windows 2003 Server.

Windows 2000 or Windows Server 2003 (32 bit) can suuprot upto 4 GB of memory. A user process running under these OS can access up to 2 GB of memory address space (assuming the /3GB switch was not used) with some of the memory being physical memory and some being virtual memory. The more programs (and, therefore, more processes) that run, the more memory you can go is upto 2 GB of user address space. When this situation occurs, the paging process increases dramatically and performance may be negatively impacted. So we need some technique to overcome the 4GB limit.

How to Access more than 4 GB of memory.

The Windows 2000 and Windows Server 2003 memory managers use PAE to provide more physical memory to a program. This reduces the need of swapping the memory of the page file and results in increased performance. The program itself is not aware of the actual memory size. All the memory management and allocation of the PAE memory is handled by the memory manager independently of the programs that run.

PAE : (Physical Address Extension)

It is a function of the Windows 2000 and Windows Server 2003 memory managers that provides more physical memory to a program that requests memory. The program is not aware that any of the memory that it uses resides in the range greater than 4 GB, just as a program is not aware that the memory it has requested is actually in the page file.

Example : (How to use /PAE switch in Boot.ini)

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

AWE : Address Windowing Extensions

It is an API set that enables programs to reserve large chunks of memory. The reserved memory is non-pageable and is only accessible to that program.

What is /3GB switch ?

A 32 bit OS can access maximum 4 GB of the physical memory. Out of which 2 Gb is reserved for OS kernel programs and rest of the 2 GB is used for user applications. If the user application demands more than 2 GB of memory then the /3GB switch can be set in boot.ini to allow the user application to access 3 GB of memory. So the available memory for OS is now reduced to 1 GB.

Example : (How to use /3GB switch in Boot.ini)
[boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect /3GB

The preceding information is valid for programs that run when the /3GB switch is used. A program that requests 3 GB of memory is more likely to be able to have more of its memory remain in physical memory rather than be paged out. This increases the performance of programs that are capable of using the /3GB switch. The exception is when the /3GB switch is used in conjunction with the /PAE switch. In this case, the operating system does not use any memory in excess of 16 GB. This behavior is caused by kernel virtual memory space considerations. Thus, if the system restarts with the /3GB entry in the Boot.ini file, and the system has more than 16 GB of physical memory, the additional physical random access memory (RAM) is not used by the operating system. Restarting the computer without the /3GB switch enables the use of all the physical memory.AWE is a set of application programming interfaces (APIs) to the memory manager functions that enables programs to address more memory than the 4 GB that is available through standard 32-bit addressing. AWE enables programs to reserve physical memory as non-paged memory and then to dynamically map portions of the non-paged memory to the program's working set of memory. This process enables memory-intensive programs, such as large database systems, to reserve large amounts of physical memory for data without having to be paged in and out of a paging file for usage. Instead, the data is swapped in and out of the working set and reserved memory is in excess of the 4 GB range. Additionally, the range of memory in excess of 4 GB is exposed to the memory manager and the AWE functions by PAE. Without PAE, AWE cannot reserve memory in excess of 4 GB.

Note In Windows Server 2003, PAE is automatically enabled only if the server is using hot-add memory devices. In this case, you do not have to use the /PAE switch on a system that is configured to use hot-add memory devices. In all other cases, you must use the /PAE switch in the Boot.ini file to take advantage of memory over 4GB.

The following operating systems can use PAE to take advantage of physical memory beyond 4GB
Microsoft Windows 2000 Advanced Server
Microsoft Windows 2000 Datacenter Server
Microsoft Windows Server 2003, Enterprise Edition
Microsoft Windows Server 2003, Datacenter Edition

No comments:

Post a Comment