Purpose The MEMLIMIT parameter specifies the maximum amount of virtual storage above the 2GB bar that a job can use. This parameter is crucial for 64-bit applications that need to address memory beyond the traditional 2GB limit of 31-bit addressing. MEMLIMIT controls the allocation of 64-bit addressable virtual storage, allowing applications to work with large in-memory datasets, caches, or other memory-intensive operations.
Syntax JOB Statement Format //jobname JOB parameters,MEMLIMIT=value
EXEC Statement Format //stepname EXEC PGM=program,MEMLIMIT=value
Parameter Values value Value Description nnnnnM Specifies the limit in megabytes (1048576 bytes) nnnnnG Specifies the limit in gigabytes (1073741824 bytes) nnnnnT Specifies the limit in terabytes (1099511627776 bytes) nnnnnP Specifies the limit in petabytes (1125899906842624 bytes) 0 No 64-bit virtual storage can be used NOLIMIT No limit on 64-bit virtual storage usage
Note:
If you omit the MEMLIMIT parameter, the system uses the default value specified in the SMFPRMxx member of SYS1.PARMLIB, or the MEMLIMIT value in the user's RACF profile. Typically, this default is either 2G or NOLIMIT, but it varies by installation.
Usage Examples Basic JOB Level Specification //TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A,
// MSGCLASS=X,MEMLIMIT=4G
This job can use up to 4 gigabytes of virtual storage above the 2GB bar.
Step Level Specification //STEP1 EXEC PGM=BIGMEM,MEMLIMIT=16G
This step can use up to 16 gigabytes of virtual storage above the 2GB bar.
Unlimited Memory Usage //TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A,
// MSGCLASS=X,MEMLIMIT=NOLIMIT
This job has no limit on the amount of 64-bit virtual storage it can use.
No 64-bit Memory Usage //TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A,
// MSGCLASS=X,MEMLIMIT=0
This job cannot use any 64-bit virtual storage.
Virtual Storage Concepts z/OS Memory Architecture Understanding the MEMLIMIT parameter requires knowledge of z/OS memory architecture:
User Private Area (Below the Line)
0 - 16MB
Extended User Private Area
16MB - 2GB
64-bit Common Area
2GB - 2TB+ (MEMLIMIT applies here)
Simplified z/OS memory architecture showing where MEMLIMIT applies How 64-bit Memory Is Used 64-bit addressable memory is allocated through specific interfaces:
IARV64 service : System service that programs use to request 64-bit memoryLanguage constructs : Programming languages like C/C++ or Java provide constructs to allocate large memory objectsMemory objects : Contiguous virtual storage areas in 64-bit address spaceMEMLIMIT : Controls the maximum size of all memory objects a single address space can allocateParameter Hierarchy When determining the actual MEMLIMIT for a job step, the system uses the following hierarchy (highest priority first):
MEMLIMIT specified on the EXEC statement for the step MEMLIMIT specified on the JOB statement MEMLIMIT specified in the JES exit (installation-specific) MEMLIMIT specified in the RACF user profile (if SMF is active) MEMLIMIT specified in the SMFPRMxx member of SYS1.PARMLIB System default (usually 2G) Practical Applications Types of Applications That Need Large MEMLIMIT Database Management Systems : DB2, Oracle, and other database systems use 64-bit addressability for buffer pools and cachesAnalytics Applications : Data mining, statistical analysis, and business intelligence applications that process large datasetsJava Applications : Enterprise Java applications with large heap sizesIn-Memory Computing : Applications that maintain large data structures in memory for performanceScientific Computing : Weather modeling, genomics, and other scientific applications that work with large datasetsDetermining Appropriate MEMLIMIT Values Consider these factors when setting MEMLIMIT:
Application documentation and requirements Size of datasets being processed Available real and auxiliary storage in the system Other workloads running concurrently in the system Performance requirements and response time objectives Monitoring and Troubleshooting Monitoring 64-bit Memory Usage Several tools and commands can help monitor 64-bit memory usage:
DISPLAY M command : Shows system-wide memory usageRMF (Resource Management Facility) : Provides detailed reports on memory utilizationSMF Type 30 records : Contain memory usage statistics for each job stepSDSF (System Display and Search Facility) : Shows job memory usage in the job summary panelCommon Issues Issue Possible Solution Job fails with S878 abend Increase MEMLIMIT value or optimize application memory usage Poor system performance due to excessive paging Reduce MEMLIMIT to constrain memory usage or increase real/auxiliary storage 64-bit application cannot allocate memory despite sufficient MEMLIMIT Check system-wide memory constraints or auxiliary storage limitations MEMLIMIT parameter appears to have no effect Verify that the application is actually using 64-bit addressing
Common Error Messages IEF233A M TESTJOB,STEP1 - WAITING FOR REAL STORAGE
- System is waiting for real storage to back virtual storage pagesIEF374I STEP/STEP1 - JOB/TESTJOB ENDED BY S878 ABEND
- Job exceeded MEMLIMIT and was terminatedSystem Management Considerations Impact on System Resources Setting MEMLIMIT values has broader system implications:
Real storage utilization : 64-bit virtual memory requires real storage backingAuxiliary storage : Paging space needed for virtual memorySystem responsiveness : Excessive memory usage can cause increased paging and reduced performanceOther workloads : Large memory consumers can impact other jobs in the systemSetting System-Wide Defaults System administrators can control default MEMLIMIT settings through:
SMFPRMxx parmlib member : MEMLIMIT parameter sets the system-wide defaultRACF user profiles : Set default MEMLIMIT values for specific usersJES exit routines : Dynamically adjust MEMLIMIT based on job attributesWorkload management policies : Assign different resource limits based on workload importanceBest Practices Set appropriate MEMLIMIT values based on application requirements and system capacityUse step-level MEMLIMIT rather than job-level to provide more granular controlAvoid using MEMLIMIT=NOLIMIT except for well-understood applicationsMonitor memory usage patterns to refine MEMLIMIT settings over timeEstablish guidelines for different application types and their MEMLIMIT requirementsConsider time-of-day variations in memory requirements and system loadDocument MEMLIMIT requirements for critical applicationsRelated Concepts JOB Statement - Where the MEMLIMIT parameter can be specified at the job levelEXEC Statement - Where the MEMLIMIT parameter can be specified at the step levelREGION Parameter - Controls virtual storage below the 2GB bar