Large Memory Support
Large memory support is critical for any database management system because simply put accessing data
in memory is much faster than accessing it from disk storage. DB2 UDB v8.2 for Windows supports several features that allow it to address large amounts of memory. These include:
4 GB Memory Tuning Support
- This memory tuning feature, which can be enabled with the /3GB boot.ini
switch, allows 32-bit applications that are aware of the /3GB switch to increase their virtual address space
by an additional 1 GB of memory for a total of 3 GB of virtual address space. Windows 2000 Advanced
Server and Datacenter Server as well as all Windows Server 2003 editions supported this memory tuning
feature. All 32-bit versions of DB2 UDB v8.2 for Windows including the Personal Edition support the 4 GB
Memory Tuning feature allowing each DB2 instance to address up to 3 GB of physical memory.
Once the /3GB switch has been enabled at the operating system there are no /3G specific configuration
parameters within DB2 UDB that need to be enabled in order for DB2 UDB to leverage the additional memory.
The ability for DB2 UDB v8.2 for Windows Enterprise Server Edition (ESE) to implement the Database
Partitioning Feature (DPF) in a multiple logical partition configuration on a single server with terabytes of
memory allows DB2 UDB to scale beyond the 4 GB memory barrier. This is because the DPF allows several
partitioned database servers, also called nodes and sometimes incorrectly referred to as instances to
address 2 GB of memory address space and up to 3 GB on Windows 2000 Advanced Server and Datacenter Server and all Windows Server 2003 editions as well as Windows XP.
AWE Memory Support
- The Windows operating system supports the Intel Architecture (IA-32) Physical
Address Extension (PAE) feature through the Microsoft Address Windowing Extensions (AWE) Application
Programming Interface (API). This API provides 32-bit Windows applications with the ability to address up to
64 GB of physical non-paged memory. The AWE API has been available on 32-bit versions of Windows 2000
Advanced Server and Datacenter Server as well as Windows XP Professional for some time now and is now
supported on all the 32-bit versions of Windows Server 2003 as well. Although the AWE API is available on
all versions of Windows Server 2003, support is limited to 4 GB of memory with Windows Server 2003
Standard Edition. Its primary purpose on the Standard Edition is for development and testing of applications
that use the AWE API. All 32-bit versions of DB2 UDB v8.2 for Windows including Personal Edition support the AWE API for allocating database buffer pools larger than 2 GB.
Once the /PAE switch is enabled at the operating system the DB2 UDB registry variable DB2_AWE must
be defined in order to enabled AWE buffer pool support.
On 32-bit Windows systems with /3GB and /PAE enabled the practical limit for AWE memory is 16 GB due
to a requirement for a larger Windows kernel address space for memory management. Removing the /3GB
switch allows the Windows kernel to utilize 2 GB of memory address space and this allows Windows to
address up to 64 GB of memory. Removing the /3GB also reduces the DB2 UDB instance working set
memory significantly which in turn provides very little memory space for both the database heap which is
memory used to manage memory and the buffer pool windows which are used by the AWE API to map memory pages in and out of AWE memory.
Note: The implementation of AWE buffer pool support in DB2 UDB has a practical limitation of one database
per instance as the DB2_AWE registry variable defines AWE bufferpools for the instance using the buffer pool ID which is not unique across databases.
NUMA Memory Support
- Windows Server 2003 Enterprise Edition and Datacenter Edition provide support for Non-Uniform Memory Access (NUMA). These editions of Windows Server 2003 provide NUMA awareness
to applications and can manage threads and memory via NUMA application program interfaces, sometimes
referred to in the industry as NUMA nuggets. Since support for NUMA is provided at the operating system
level it does not require applications to directly implement the NUMA API. However, the NUMA API is
available to applications to allow developers to obtain system information about the NUMA architecture and better leverage this technology.
DB2 UDB v8.2 for Windows includes several internal engine enhancements that make it NUMA aware
including both process and memory affinity. Process affinity refers to pinning specific threads to processors.
Memory affinity refers to pinning specific memory allocations in memory address space that is close to the processor utilizing the memory.
64-bit Memory Support
- Both Windows Server 2003 Enterprise Edition and Datacenter Edition are
available in 64-bit versions for the Intel Itanium-based and compatible servers. These highly scalable versions
of the Windows Server 2003 operating systems will provide huge virtual memory address space, up to 64 GB
on Enterprise Edition, and 512 GB on Datacenter Edition with support for 1 TB already in the works. DB2
UDB Enterprise Server Edition v8.2 is already available for these 64-bit versions of Windows and will be able
to leverage large memory support through buffer pools, sort heaps, and other important performance tuning memory caches.