Re: RAM
- From: "relic" <bogus.relic2@xxxxxxx>
- Date: Sun, 9 Mar 2008 09:38:56 -0800
Dave Boomhauer wrote:
I want to utilise the most from XP Pro (I know it'll only see 3Gb)
and my PC.......
4GT RAM Tuning
For applications that are I/O-intensive, such as database management systems
(DBMS), the use of a larger virtual address space can provide considerable
performance benefits.
Operating systems based on Microsoft(r) Windows NT(r) provide applications
with a 4 GB virtual address space. The virtual address space is divided such
that 2 GB is available to the application and the other 2 GB is available
only to the system. The 4GT RAM Tuning feature increases the memory
available to the application to 3 GB, and reduces the amount available to
the system to 1 GB. This benefits applications that run on computers with
more than 2 GB of physical memory.
To enable this feature, add the /3GB switch to the Boot.ini file. This
enables applications to use the first 3 GB of the address space on the
following systems:
a.. Windows .NET Server 2003 family
b.. Windows XP Professional Edition
c.. Windows 2000 Datacenter Server
d.. Windows 2000 Advanced Server
e.. Windows NT 4.0 Enterprise Edition
Note: Windows 2000 Server still have the 2 GB Limit!
To enable your application to use the 3 GB 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.
Use the following guidelines when enabling 4GT support within your
applications:
a.. For a DLL that loads near the 2 GB boundary, there is a region of the
2 GB space in which contiguous memory cannot be allocated using the
VirtualAlloc function.
b.. Use the GlobalMemoryStatus function to retrieve the amount of total
user virtual space. Avoid using hard-wired constant definitions such as
"#define HIGHEST_USER_ADDRESS 0xC0000000". Try to detect the real value at
runtime.
c.. Avoid signed comparisons with pointers as they may cause applications
to crash on a 4GT-enabled system. A condition such as "if (pointer >
40000000)" is false for a pointer that is above 2 GB.
d.. Code that uses the highest bit to tag items (data value versus an
address value) will fail. For example, a 32-bit word might be considered a
user- mode address if below 0x80000000 and an error code if above. This is
no longer true with 4GT.
Find below, Some more additional information.
( Note: This still doesn't increase per process memory limit, but increases
Addressable memory space to more than 4 GB)
Physical Address Extension
The Physical Address Extension (PAE) enables applications to address more
than 4 GB of physical memory. It is supported by Intel processors. The
following system can use PAE to take advantage of physical memory beyond 4
GB:
a.. Windows .NET Enterprise Server
b.. Windows .NET Advanced Server
c.. Windows 2000 Datacenter Server
d.. Windows 2000 Advanced Server
To enable PAE, you must use the /PAE switch in the Boot.ini file.
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).
Typically, a process 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 memory manager uses PAE to provide more
physical memory to an application, which reduces the need to swap memory to
the page file and increases performance. The application itself is not aware
of the actual memory size. All of the memory management and allocation of
the PAE memory is handled by the memory manager independently of the
application.
Applications that are 4GT-aware are likely to remain in physical memory
rather than be paged out, which increases their performance. 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.
Therefore, 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 of
the physical memory.
Address Windowing Extensions (AWE) enables applications to address more than
4 GB. AWE enables an application to reserve physical memory as nonpaged
memory, then dynamically map portions of the nonpaged memory to its working
set. This enables memory-intensive programs to reserve large amounts of
physical memory for data without swapping to disk. Instead, the data is
swapped between the working set and reserved memory above the 4 GB range.
The memory above 4 GB is exposed to the memory manager and the AWE functions
by PAE. Without PAE, AWE is unable to reserve memory in excess of 4 GB.
Address Windowing Extensions
Address Windowing Extensions (AWE) is a set of extensions that allows an
application to quickly manipulate physical memory greater than 4GB. Certain
data-intensive applications, such as database management systems and
scientific and engineering software, need access to very large caches of
data. In the case of very large data sets, restricting the cache to fit
within an application's 2GB of user address space is a severe restriction.
In these situations, the cache is too small to properly support the
application.
AWE solves this problem by allowing applications to directly address huge
amounts of memory while continuing to use 32-bit pointers. AWE allows
applications to have data caches larger than 4GB (where sufficient physical
memory is present). AWE uses physical nonpaged memory and window views of
various portions of this physical memory within a 32-bit virtual address
space.
AWE places a few restrictions on how this memory may be used, primarily
because these restrictions allow extremely fast mapping, remapping, and
freeing. Fast memory management is important for these potentially enormous
address spaces.
a.. Virtual address ranges allocated for the AWE are not sharable with
other processes (and therefore not inheritable). In fact, two different AWE
virtual addresses within the same process are not allowed to map the same
physical page. These restrictions provide fast remapping and cleanup when
memory is freed.
b.. The physical pages that can be allocated for an AWE region are limited
by the number of physical pages present in the machine, since this memory is
never paged - it is locked down until the application explicitly frees it or
exits. The physical pages allocated for a given process can be mapped into
any AWE virtual region within the same process. Applications that use AWE
must be careful not to take so much physical memory that they cause other
applications to page excessively or prevent creation of new processes or
threads due to lack of resources. Use the GlobalMemoryStatusEx function to
monitor physical memory use.
c.. AWE virtual addresses are always read/write and cannot be protected
via calls to
d..
.
- Follow-Ups:
- Re: RAM
- From: chrisv
- Re: RAM
- References:
- RAM
- From: Dave Boomhauer
- RAM
- Prev by Date: Re: XP slowdown
- Next by Date: Outlook express
- Previous by thread: Re: RAM
- Next by thread: Re: RAM
- Index(es):
Relevant Pages
|