Have a Question?
Print

KB – AIX Memory Segmentation

Description:

AIX Memory Segmentation: AIX uses a segmented memory model where the process address space is divided into 256MB segments. By default, AIX allocates only a limited amount of space for heap data, which can be insufficient for Java applications with large heap requirements (your -Xmx settings).

The MAXDATA Parameter:

  • The MAXDATA parameter tells the AIX loader how much address space to reserve for the data/heap segment. For example, MAXDATA=0x200000000 (8GB in hex) would reserve that amount of space for heap allocation.
  • Without sufficient MAXDATA allocation, JVMs may encounter memory allocation limits before reaching their configured maximum heap size (-Xmx values).
  • The actual available memory may differ from the MAXDATA setting due to system configuration limits or architectural constraints, particularly with 32-bit processes where the effective usable space might be considerably less than the configured value.

Why AIX is Different: Most other Unix systems (Linux, Solaris) use flat memory models where heap space allocation is more straightforward. AIX’s segmented approach requires explicit configuration to accommodate large heap applications.

How AIX Memory Segmentation may impact BBj: 

  • Installation:  The installation of BBj itself may terminate with an Out of Memory Error, due to Memory Segmentation.  Temporarily setting the MAXDATA parameter to 2GB in the shell and prior to launching the install will provide the installer enough memory to complete:  export LDR_CNTRL=MAXDATA=0x80000000
  • AIX Memory Segmentation in Production:  In some cases, AIX Memory Segmentation may cause BBjServices to encounter Out of Memory Errors when the BBjServices process is nowhere near the allocated -Xmx configuration.  To resolve this, export the MAXDATA in BBj’s environment configuration file:  .envsetup

This file is found in the <bbjhome>/bin/ directory.  In order for the export setting to be preserved in BBj upgrades, it must be placed between the Start/Stop Custom Definitions lines within the file:

#------ Start Custom Definitions (DO NOT REMOVE THIS LINE) ------
export LDR_CNTRL=MAXDATA=0x200000000  # 8GB
#------ End Custom Definitions (DO NOT REMOVE THIS LINE)---------

Table of Contents
Scroll to Top