Debe estar conectado para participar
Buscar en los foros:


Uso de Comodín:
*    coincide cualquier número de caracteres
%    coincide exactamente un caracter

4-Gigabyte Tuning

No hay Etiquetas



entradas: 15626

16:53 21/03/2008


On 32-bit editions of Windows, applications have 4 gigabyte (GB) of virtual address space available. The virtual address space is divided so that 2 GB is available to the application and the other 2 GB is available only to the system.

The 4-gigabyte tuning (4GT) feature, formerly called 4GT RAM Tuning, increases the virtual address space that is available to the application up to 3 GB, and reduces the amount available to the system to between 1 and 2 GB.

For applications that are memory-intensive, such as database management systems (DBMS), the use of a larger virtual address space can provide considerable performance and scalability benefits. However, the file cache, paged pool, and nonpaged pool are smaller, which can adversely affect applications with heavy networking or I/O. Therefore, you might want to test your application under load, and examine the performance counters to determine whether your application benefits from the larger address space.

To enable 4GT, use the BCDEdit /set command to set the increaseuserva boot entry option to a value between 2048 (2 GB) and 3072 (3 GB).

Windows Server 2003 and earlier: To enable 4GT, add the /3GB switch to the Boot.ini file. The /3GB switch is supported on the following systems:

* Windows Server 2003
* Windows XP Professional
* Windows 2000 Datacenter Server
* Windows 2000 Advanced Server

The /3GB switch makes a full 3 GB of virtual address space available to applications and reduces the amount available to the system to 1 GB. On Windows Server 2003, the amount of address space available to applications can be adjusted by setting the /USERVA switch in Boot.ini to a value between 2048 and 3072, which increases the amount of address space available to the system. This can help maintain overall system performance when the application requires more than 2 GB but less than 3 GB of address space.

To enable an application to use the larger address space, set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag in the image header. The linker included with Microsoft Visual C++ supports the /LARGEADDRESSAWARE switch to set this flag. Setting this flag and then running the application on a system that does not have 4GT support should not affect the application.

On 64-bit editions of Windows, 32-bit applications marked with the IMAGE_FILE_LARGE_ADDRESS_AWARE flag have 4 GB of address space available.

Itanium editions of Windows Server 2003: Prior to SP1, 32-bit processes have only 2 GB of address space available.

Itanium editions of Windows 2000: 32-bit processes have only 2 GB of address space available.

Use the following guidelines to support 4GT in applications:

* Addresses near the 2-GB boundary are typically used by various system DLLs. Therefore, a 32-bit process cannot allocate more than 2 GB of contiguous memory, even if the entire 4-GB address space is available.
* To retrieve the amount of total user virtual space, use the GlobalMemoryStatusEx function. To retrieve the highest possible user address, use the GetSystemInfo function. Always detect the real value at runtime, and avoid using hard-wired constant definitions such as: #define HIGHEST_USER_ADDRESS 0xC0000000.
* Avoid signed comparisons with pointers, because they might cause applications to crash on a 4GT-enabled system. A condition such as the following is false for a pointer that is above 2 GB: if (pointer > 40000000).
* Code that uses the highest bit of a pointer for an application-defined purpose will fail when 4GT is enabled. For example, a 32-bit word might be considered a user-mode address if it is below 0x80000000, and an error code if above. This is not true with 4GT.

VirtualAlloc usually returns low addresses before high addresses. Therefore, your process may not use very high addresses unless it allocates a lot of memory or has a fragmented virtual address space. To force allocations to allocate from higher addresses before lower addresses for testing purposes, specify MEM_TOP_DOWN when calling VirtualAlloc or set the following registry value to 0x100000:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\
Session Manager\Memory Management\AllocationPreference
See Also

Memory Limits for Windows Releases
Physical Address Extension
4GT Technical Reference

Send comments about this topic to Microsoft

Build date: 3/13/2008
………………………………………….. ………………………………………..

Physical Address Extension

The Physical Address Extension (PAE) allows 32-bit Windows systems to use more than 4 GB of physical memory. PAE also enables several advanced system and processor features so it can also be used on computers that have less than 4 GB of memory. Features enabled by PAE include hardware-enabled Data Execution Prevention (DEP), non-uniform memory access (NUMA), and the ability to add memory to a system while it is running (hot-add memory).

PAE is supported only on 32-bit versions of Windows; 64-bit versions of Windows do not support PAE. The following 32-bit Windows releases support PAE:

* Windows Server 2008
* Windows Vista
* Windows Server 2003
* Windows XP
* Windows 2000 Datacenter Server
* Windows 2000 Advanced Server

On most computers, PAE is disabled by default. (PAE is enabled by default only if DEP is enabled on a computer that supports hardware-enabled DEP, or if the computer is configured for hot-add memory devices in memory ranges beyond 4 GB.) PAE must be explicitly enabled for Windows to run in NUMA mode on a NUMA-capable computer.

To enable PAE, use the BCDEdit /set command to set the pae boot entry option.

Windows Server 2003 and Windows XP/2000: To enable PAE, use the /PAE switch in the Boot.ini file. To disable PAE, use the /NOPAE switch.

With PAE enabled, the operating system moves from two-level linear address translation to three-level address translation. The extra layer of translation provides access to physical memory beyond 4 GB. Instead of a linear address being split into three separate fields for indexing into memory tables, it is split into four separate fields: a 2-bit field, two 9-bit fields, and a 12-bit field that corresponds to the page size implemented by Intel Architecture (4 KB).

PAE, 4-gigabyte tuning (4GT), and Address Windowing Extensions (AWE) serve different purposes and can be used independently of each other:

* PAE allows the operating system to access and use more than 4 GB of physical memory.
* 4GT extends the 32-bit user virtual address space from 2 GB to up to 3 GB.
* AWE is a set of APIs that allows a process to allocate nonpaged physical memory and then dynamically map portions of this memory into the virtual address space of the process.

When neither 4GT nor AWE are being used, the amount of physical memory that a single 32-bit process can use is limited by the size of its address space (2 GB). In this case, a PAE-enabled system can still make use of more than 4 GB of RAM to run multiple processes at the same time or to cache file data in memory.

4GT can be used with or without PAE. However, some versions of Windows limit the maximum amount of physical memory that can be supported when 4GT is used. On such systems, booting with 4GT enabled causes the operating system to ignore any memory in excess of the limit. For details, see Memory Limits for Windows Releases.

AWE does not require PAE or 4GT but is often used together with PAE to allocate more than 4 GB of physical memory from a single 32-bit process.
See Also

PAE X86 Technical Reference

Send comments about this topic to Microsoft

Build date: 3/13/2008  Patres _ Semper  immoti  et  digni -   




entradas: 5191

17:48 21/03/2008


Ehh, lo voy a copiar y leer detenidamente querido Legion, ya que al estar en ingles, si se me pasa algo, terrible quilombo se puede llegar a armar. Gracias por los trucos. Saludos.

Extreme Level


entradas: 2730

18:52 21/03/2008


Jajajaja, no es mas facil migrar a 64 bits??? :P

Buena info…


Pasa y enterate lo que podemos hacer juntos para ganarle a las enfermedades.