Você está na página 1de 24

SAP

Memory Management an overview


asfan.amin@gmail.com

asfan.amin@gmail.com

SAP Memory Management


SAP Memory areas overview : SAP Buer SAP Roll Memory SAP Extended Memory SAP Heap Memory SAP Paging Memory Fixed Local Memory of the SAP work Process Main factors in conguring SAP Memory : u Physical Main Memory (RAM) give aIenJon to raJo between physical and virtual memory u OperaJng system opJons and restricJons compare between 32 and 64 bit system architecture
asfan.amin@gmail.com

Memory Management Fundamental


The word memory virtual memory physical main memory + swap space local memory + shared memory The maximum amount of virtual memory that can be allocated is limited by two variable : Result of physical hardware restricJon Maximum address space permited by operaJng system The OperaJng System manages two type of memory : u Local memory allocated precisely to one operaJng system process u Shared memory accessible to mulJple operaJng system process
asfan.amin@gmail.com

User Context
Reered : Data which is generated by transacJon process Variables, Internal table & screen list New sesion = new user context Data is stored independently in dierent memory areas Stored in SAP roll memory, SAP extended memory, & SAP Heap Memory Sesions divide into : q External sesion opened explicitly by user q Internal sesion opened implicitly by program submit, call transac.on, call dialog, call screen, call func.on in update task, call func.on in background task, and call func.on star.ng new task
asfan.amin@gmail.com

Process Flow
Pres. server SAP ApplicaJon Sever DB Server

Table buer Program buer DDIC Buer

SAP Extended Memory

SAP GUI

Database buer

Dispatcher Queue

SAP Roll Memory


Work Process DB Process DB Process DB Process

dispatcher

Work Process Work Process

asfan.amin@gmail.com

SAP Roll Memory


Local SAP Roll area of work process The iniJal part of user context stored Each SAP work process can only access its own roll area Shared SAP Roll Area Accessible to all of instance work processes Buer to temporary keep user context when a user is assigned to new work process

Roll in copying user context from shared roll area to local roll area Roll Out copying user context from local roll area to shared roll area

asfan.amin@gmail.com

Roll buffer (shared memory) Roll area (local)


copy copy

Roll area (local) Work Process2

Work Process1

Roll file (disk)

ztta/roll_first

Roll Buffer (shared) Roll (local) Roll In / Roll Out Roll file

rdisp/roll_SHM

ztta/roll_area

rdisp/roll_MAXFS

asfan.amin@gmail.com

SAP Roll Area Parameters


zIa/roll_rst rst amount of roll area used in a dialog work process zIa/roll_area size of the local SAP Roll area in the work process rdisp/ROLL_SHM size of SAP roll Buer rdisp/ROLL_MAXFS size of enJre shared SAP roll area

asfan.amin@gmail.com

SAP Extended Memory


o o o o

Shared memory which mostly of user context stored All SAP work process can edit stored user context directly Roll in rather only copied the address (pointer) of where a user context located on the SAP extended memory Makes roll process much faster

em/initial_size_MB

ztta/roll_extension
asfan.amin@gmail.com

SAP Extended Memory Main Parameters


em/iniJal_size_MB size of SAP extended memory allocated when the SAP instance starts up em/blocksize_KB size block which split SAP Extended Memory zIa/roll_extension maximum size of a user context in the SAP Extended memory

asfan.amin@gmail.com

SAP Heap Memory


Area which allocated variably as local memory as required. Released ager a transacJon is complete.

asfan.amin@gmail.com

SAP Heap Memory Main Parameters


abap/heap_area_dia quotas of SAP heap memory that a dialog process can allocated. abap/heap_area_nondia quotas of SAP heap memory that a nondialog process can allocated. abap/heap_area_total size that can be allocated in total by all work process. abap/heaplimit workprocess restart limit of heap memory.

Heap Memory (local)

abap/heap_area_(non)dia abap/heap_area_total

asfan.amin@gmail.com

Sequence in which memory is allocated (dialog work process)


UserIndependent Data
1 2

User Context
Roll memory to

Roll memory to zttz/roll_first

Roll memory to zttz/roll_area

Roll memory to abap/heap_area_dia

zttz/roll_extension

Copying data during context change

Mapping the data during context change

- Data stays in work process - No context switch possible - Work process in private mode

asfan.amin@gmail.com

Sequence in which memory is allocated (non-dialog work process)


UserIndependent Data
1 2

User Context
Roll memory to

Roll memory to zttz/roll_area

Roll memory to zttz/roll_extension

abap/heap_area_dia

Copying data during context change

Mapping the data during context change - Data stays in work process - No context switch possible - Work process in private mode

asfan.amin@gmail.com

SAP Extended Global Memory


q Data can be stored globally between user context q Used to store data across user context q Allows fast & copy-free switching based on mapping.

q Substracted from SAP Extended Memory to calculate the remaining storage

space q Congured using em/global_area_MB parameters

asfan.amin@gmail.com

SAP Paging Memory


Object that stored in the SAP Paging Memory : ABAP data cluster stored temporarily with ABAP statement

SAP Paging Memory Main Parameters : o rdisp/PG_MAXFS size of SAP Paging Memory o rdisp/PG_SHM size of SAP Paging Buer (shared memory) Error caused by SAP Paging Memory : u TSV_TNEW_PG_CREATE_FAILED u SYSTEM_NO_MORE_PAGING
asfan.amin@gmail.com

Parameter transferred when programs and transacJon called SUBMIT REPORT, CALL TRANSACTION, CALL DIALOG, CALL SCREEN, CALL FUNCTION IN UPDATE TASK, CALL FUNCTION BACKGROUND TASK, CALL FUNCTION STARTING NEW TASK Data extracts created by statement EXTRACT (up to basis 4.5)

IMPORT/EXPORT FROM/TO MEMORY

Global vs Local Memory


Server Global Memory (shared memory)
SAP buffers (contains e.g SAP Programs) SAP roll buffer Extended Memory SAP paging buffer (User Context)

Local memory
Additional local heap memory (if required)

Local memory

Local memory

Local memory

1:n
SAP Roll File SAP Paging File
asfan.amin@gmail.com

1:1
Work Process Work Process Work Process

Conguring & Monitoring SAP Memory Areas


Main ObjecJve : Performance Stability Main Factors to be considered : Physical Main Memory (RAM) Swap space or paging le of the operaJng system OperaJng system restricJon

asfan.amin@gmail.com

Next Point to be Considered


q Total Main Memory Requirement q Number of Computer q Several SAP instances per computer q Memory for SAP work process q Database Instance

q SAP extended memory and roll buer

Zero administraJon memory magement : PHYS_MEMSIZE parameter denes how much of a computers total physical memory should be used for the SAP instance.
asfan.amin@gmail.com

Address Space RestricJon (UNIX)


em/initial_size_MB User Independent WP Local SAP Buffers (Shared) Roll Memory (Shared) User Context SAP Extended Memory (Shared) SAP Heap Memory (local) abap/heap_area_(non_)dia

Address Space
SAP Work Process

asfan.amin@gmail.com

Address Space RestricJon (Windows)


em/initial_size_MB SAP Extended Memory Total

em/address_space_MB User Independent WP Local SAP Buffers (Shared) Roll Memory (Shared) User Context SAP Extended Memory (Shared)

abap/heap_area_(non_)dia

SAP Heap Memory (local)

Address Space
SAP Work Process
asfan.amin@gmail.com

Assistance With TroubleshooJng


Error because of incorect memory area conguraJon : OperaJng System can not start because the operaJng system cannot provide the requsted memory area Session terminaJons user is logged o ABAP Program terminaJon. Four error factors : Program errors (e.g endless loop) SAP Prole parameters are set incorectly The Swap Space on the operaJng system is not large enough ConguraJon parameters of the operaJng system are set incorectly or OS limits have been reached.
asfan.amin@gmail.com

ABAP Program TerminaJon


The memory of user context is used up STORAGE_PARAMETERS_WRONG_SET, SYSTEM_ROLL_IN_ERROR, TSV_TNEW_BLOCKS_NO_ROLL_MEMORY, TSV_TNEW_PAGE_PAGE_ALLOC_FAILED, TSV_TNEW_INDEX_NO_ROLL_MEMORY System can not create the program buer because there is not not sucient shared memory at that Jme PXA_NO_SHARED_MEMORY The Program encounters a memory boIleneck during an operaJon in the database interface DBIF_RTAB_NO_MEMORY, DBIF_RSQL_NO_MEMORY The Program encounters a memory boIleneck during sorJng. EXSORT_NOT_ENOUGH_MEMORY AIemp to create error log fails ager a terminated program due to lack of memory. RABAX_CALLING_RABAX The SAP paging memory is used up SYSTEM_NO_MORE_PAGING, TSV_TNEW_PAGE_ALLOC_FAILED The memory for SET/GET parameter (SPA/GPA memory) is used up. SET_PARAMETER_MEMORY_OVERFLOW Volume limit of memoy allocated to single call (zIa/max_memreq_MB) is set too low SYSTEM_NO_ROLL

asfan.amin@gmail.com

asfan.amin@gmail.com

Você também pode gostar