SAP memorymanagement | Operating System | Computer Data Storage

SAP Memory Management (an Overview

)

SAP Memory Management
SAP Memory areas overview : -SAP Buffer -SAP Roll Memory -SAP Extended Memory -SAP Heap Memory -SAP Paging Memory -Fixed Local Memory of the SAP work Process

Main factors in configuring SAP Memory : - Physical Main Memory (RAM)  give attention to ratio between physical and virtual memory - Operating system options and restrictions  compare between 32 and 64 bit system architecture

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 restriction -Maximum address space permited by operating system The Operating System manages two type of memory : -Local memory  allocated precisely to one operating system process -Shared memory  accessible to multiple operating system process .

User Context Reffered : èData which is generated by transaction process èVariables. & SAP Heap Memory Sesions divide into : èExternal sesion  opened explicitly by user èInternal sesion  Opened implicitly by program submit. call screen. call transaction. call function in update task. Internal table & screen list èNew sesion = new user context èData is stored independently in different memory areas èStored in SAP roll memory. . call function in background task. call dialog. SAP extended memory. and call function starting new task.

Process Flow Pres. server SAP Application Sever Table buffer SAP Extended Memory Program buffer DDIC Buffer DB Server Database buffer SAP GUI Dispatcher Queue SAP Roll Memory Work Process Work Process Work Process DB Process DB Process DB Process dispatcher .

Accessible to all of instance work processes .SAP Roll Memory èLocal SAP Roll area of work process .Each SAP work process can only access its own roll area èShared SAP Roll Area .Buffer 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 .The initial part of user context stored .

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 .

ztta/roll_area -rdisp/ROLL_SHM -rdisp/ROLL_MAXFS : First amount of roll area used in a dialog WP : size of the local SAP Roll area in the work process : size of SAP roll Buffer : size of entire shared SAP roll area .SAP Roll area parameters .ztta/roll_first .

SAP Extended Memory è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 .

SAP Extended Memory main parameters : èem/initial_size_MB : size of SAP extended memory allocated when the SAP instance starts up èem/blocksize_KB : size block which split SAP Extended Memory èztta/roll_extension : maximum size of a user context in the SAP Extended memory .

èabap/heaplimit : Workprocess restart limit of heap memory Heap Memory (local) abap/heap_area_(non)dia abap/heap_area_total .SAP Heap Memory èArea which allocated variably as local memory as required. SAP Heap Memory main parameters : èabap/heap_area_dia : quotas oh SAP heap memory that a dialog process can allocated. èabap/heap_area_total : size that can be allocated in total by all work process. èabap/heap_area_nondia : quotas oh SAP heap memory that a nondialog process can allocated. èReleased after a transaction is complete.

Sequence in which memory is allocated (dialog work process) : User Context UserIndependent Data 1 2 3 4 Roll memory to zttz/roll_first Roll memory to zttz/roll_extension Roll memory to zttz/roll_area Roll memory to 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 .

Sequence in which memory is allocated (non-dialog work process) : User Context UserIndependent Data 1 2 3 Roll memory to zttz/roll_area Roll memory to abap/heap_area_dia Roll memory to 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 .

SAP EG Memory and SAP Paging Memory  Data can be stored globally between user context SAP Extended Global Memory èUsed to store data across user context èAllows fast & copy-free switching based on mapping. èSubstracted from SAP Extended Memory to calculate the remaining storage space èconfigured using em/global_area_MB parameters .

CALL FUNCTION STARTING NEW TASK  Data extracts created by statement EXTRACT (up to basis 4. CALL SCREEN. CALL TRANSACTION.5) SAP Paging Memory Main Parameters : èrdisp/PG_MAXFS : Size of SAP Paging Memory èrdisp/PG_SHM : Size of SAP Paging Buffer (shared memory) Error caused by SAP Paging Memory : èTSV_TNEW_PG_CREATE_FAILED èSYSTEM_NO_MORE_PAGING . CALL FUNCTION BACKGROUND TASK. CALL DIALOG.SAP Paging Memory Object that stored in the SAP Paging Memory : èABAP data cluster stored temporarily with ABAP statement IMPORT/EXPORT FROM/TO MEMORY èParameter transferred when programs and transaction called SUBMIT REPORT. CALL FUNCTION IN UPDATE TASK.

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 Work Process Work Process 1:1 Work Process .Server Global Memory (shared memory) SAP buffers (contains e.

Configuring & Monitoring SAP Memory Areas Main Objective :  Performance  Stability Main Factors to be considered : èPhysical Main Memory (RAM) èSwap space or paging file of the operating system èOperating system restriction .

Next points to be considered : •Total Main Memory Requirement •Number of Computer •Several SAP instances per computer •SAP extended memory and roll buffer •Memory for SAP work process •Database Instance Zero administration memory magement : èPHYS_MEMSIZE parameter defines how much of a computer’s total physical memory should be used for the SAP instance. .

Address Space Restriction (Unix) em/initial_size_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 .

Address Space Restriction (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 .

.g endless loop) èSAP Profile parameters are set incorectly èThe Swap Space on the operating system is not large enough è Configuration parameters of the operating system are set incorectly or OS limits have been reached. Four error factors : èProgram errors (e.Assistance With Troubleshooting Error because of incorect memory area configuration : èOperating System can not start because the operating system cannot provide the requsted memory area èSession terminations  User is logged off èABAP Program termination.

SET_PARAMETER_MEMORY_OVERFLOW èVolume limit of memoy allocated to single call (ztta/max_memreq_MB) is set too low SYSTEM_NO_ROLL . DBIF_RSQL_NO_MEMORY èThe Program encounters a memory bottleneck during sorting. EXSORT_NOT_ENOUGH_MEMORY èAttemp to create error log fails after a terminated program due to lack of memory. TSV_TNEW_PAGE_ALLOC_FAILED èThe memory for SET/GET parameter (SPA/GPA memory) is used up. TSV_TNEW_BLOCKS_NO_ROLL_MEMORY. RABAX_CALLING_RABAX èThe SAP paging memory is used up SYSTEM_NO_MORE_PAGING. TSV_TNEW_PAGE_PAGE_ALLOC_FAILED.ABAP Program Termination : èThe memory of user context is used up : STORAGE_PARAMETERS_WRONG_SET. TSV_TNEW_INDEX_NO_ROLL_MEMORY èSystem can not create the program buffer because there is not not sufficient shared memory at that time PXA_NO_SHARED_MEMORY èThe Program encounters a memory bottleneck during an operation in the database interface DBIF_RTAB_NO_MEMORY. SYSTEM_ROLL_IN_ERROR.

.End of Presentation - .

Sign up to vote on this title
UsefulNot useful