memorymanagement sap nw

23
SAP Memory Management (an Overview)

Upload: anonymous-kvwcw8pr

Post on 24-Feb-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 1/23

SAP Memory Management

(an Overview)

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 2/23

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

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 3/23

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

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 4/23

Reffered :

Data which is generated by transaction process

Variables, Internal table & screen list

New sesion = new user context

Data is stored independently in different memory areas

Stored in SAP roll memory, SAP extended memory, & SAP Heap Memory

User Context

Sesions divide into :

External sesion opened explicitly by user 

Internal sesion Opened implicitly by program

submit, call transaction, call dialog, call screen, call function in update

task, call function in background task, and call function starting new

task .

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 5/23

Pres.

server SAP Application Sever DB Server

   S   A   P

   G   U   I SAP Extended Memory

DispatcherQueue SAP Roll Memory

   d   i  s  p  a   t  c   h  e  r

Table

buffer

Program

buffer

DDICBuffer

Work Process

Work Process

Work Process

DB Process

DB Process

DB Process

Database

buffer

Process Flow

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 6/23

SAP Roll Memory

Local SAP Roll area of work process

- The initial 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

- 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

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 7/23

Roll file

Roll

(local)

Roll Buffer (shared)

Roll In /

Roll Out

rdisp/roll_SHM

rdisp/roll_MAXFS

ztta/roll_first

ztta/roll_area

Roll buffer (shared memory)

Roll area

(local)

Roll file (disk)

Roll area

(local)

Work

Process1

Work

Process2

copy copy

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 8/23

SAP Roll area parameters

- ztta/roll_first : First amount of roll area used in a dialog WP

- ztta/roll_area : size of the local SAP Roll area in the work process

- rdisp/ROLL_SHM : size of SAP roll Buffer 

- rdisp/ROLL_MAXFS : size of entire shared SAP roll area

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 9/23

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 

ztta/roll_extension

em/initial_size_MB

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 10/23

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

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 11/23

SAP Heap Memory

 Area which allocated variably as local memory as required.

Released after a transaction is complete.

SAP Heap Memory main parameters :

abap/heap_area_dia : quotas oh SAP heap memory that a dialog

process can allocated.

abap/heap_area_nondia : quotas oh SAP heap memory that a nondialogprocess 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

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 12/23

Sequence in which memory is allocated (dialog work process) :

User-

IndependentData 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

1 2 3 4

User Context

Copying data

during contextchange

Mapping the data duringcontext change

- Data stays in work process

- No context switch possible

- Work process in private mode

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 13/23

User-

Independent

Data Roll memory to

zttz/roll_extension

Roll memory to

zttz/roll_area

Roll memory to

abap/heap_area_dia

1 2 3

User Context

Copying dataduring 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) :

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 14/23

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 remainingstorage space

configured using em/global_area_MB parameters

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 15/23

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, CAL L TRANSACTION, CAL L DIALOG, CALL SCREEN,

CALL FUNCTION IN UPDATE TASK , CAL L FUNCTION BACKGROUND

TASK , CALL FUNCTION STARTING NEW TASK 

Data extracts created by statement EXTRACT (up to basis 4.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

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 16/23

SAP paging

buffer 

SAP buffers

(contains e.g SAP Programs)

Extended Memory

(User Context)

Server 

SAP roll buffer 

Global Memory (shared memory) Local memory

 Additional local

heap memory (if required)

Local

memory

Local

memory

Local

memory

SAP Roll File

SAP Paging FileWork

Process

Work

Process

Work

Process

1 : n 1 : 1

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 17/23

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

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 18/23

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.

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 19/23

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 20/23

User Independent

WP

Local

SAP

Buffers

(Shared)

User Context

Roll

Memory

(Shared)

SAP Extended Memory

(Shared)

SAP Heap Memory

(local)

em/address_space_MB abap/heap_area_(non_)dia

 Address Space

SAP Work

Process

SAP Extended Memory Total

em/initial_size_MB

Address Space Restriction (Windows)

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 21/23

Assistance With Troubleshooting

Error because of incorect memory area configuration :

Operating System can not start because the operating systemcannot provide the requsted memory area

Session terminations User is logged off 

 ABAP Program termination.

Four error factors :

Program errors (e.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.

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 22/23

ABAP Program Termination :

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 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, 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.

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 (ztta/max_memreq_MB) is set too low

SYSTEM_NO_ROLL

7/25/2019 Memorymanagement SAP NW

http://slidepdf.com/reader/full/memorymanagement-sap-nw 23/23

- End of Presentation -