SlideShare a Scribd company logo
1 of 8
SAP Memory Management
Functions of the SAP Memory Management System
An application runs in an SAP work process where an ABAP program is normally executed.
The process requires memory to do this, which are allocated to it by the memory management
system. The order in which the work process is assigned the memory type depends on the
work process type, either dialog or non-dialog (see SAP Memory Types), and the underlying
operating system. This is described in more detail in the documentation on the operating
system.
The area of a user context that is directly accessible is now extended as needed, if the user
context has expanded. For dialog work processes, the data of the user context, including
internal tables is located in this expanded area. You can therefore access all the data in the
user context. Only data of the types "extract" and "export to memory" stay in SAP Paging.
The SAP Roll Area is used for the initial memory assigned to a user context, and (if available)
for additional memory if the expanded memory is full.
The following diagram displays the memory types that can be assigned to work processes on
the SAP and operating system level. Here are the most important system profile parameters
that control the availability of the memory types.
SAP Roll Area
The roll area is a memory area with a set (configurable) size that belongs to a work process. It
1
is located in the heap of the virtual address space of the work process. When the context of a
work process changes, the data is copied from the roll area to a common resource called the
roll file. To prevent repeated copying, another roll buffer is located in between that is part of
the shared memory. The roll area consists of 2 segments. The first segment, which can be set
with the parameter ztta/roll_first, is assigned to the work process first as memory. If this is
used up, the work process has more memory assigned to it. The amount of memory is
determined by the difference between the parameters ztta/roll_area and ztta/roll_first.
SAP Extended Memory
SAP extended memory is the core of the SAP memory management system. Each SAP work
process has a part reserved in its virtual address space for extended memory (see Virtual
Address Space in a Work Process). You can set the size of extended memory using the profile
parameter em/initial_size_MB: Extended Memory Pool Size. Under Windows NT, further
memory is assigned dynamically as needed, and you can also set this amount. You can map
the extended memory from the common resource onto any work process, and after onto
another process (see graphic) on the same address in the virtual address space. This is
important if you work with pointers in the ABAP program. Depending on the operating
system, how you implement the extended memory is different. The SAP system builds a layer
on to the operating system functions for the page management of this memory. This extended
memory is implemented as an unnamed mapped file. This means the address space uses the
paging file or uses the swap space of the operating system as background memory.
Private Memory
Other processes cannot use private (heap) memory. After releasing the assigned memory, the
operating system still considers the (virtual) memory as being occupied by the allocating
process. These characteristics of heap memory require that:
1. The work process can be run in PRIV mode (private) when the local memory is
assigned. This means that the work process is reserved for processing the current user
context until the context releases the work process again when the request has ended.
2. The work process, if it has used a lot of private memory, is restarted when the user
context is terminated and the local memory is returned. The restart makes the local
memory available again for other processes. A restart occurs if a work process uses
more local memory than is defined in the parameter abap/heaplimit. The mechanism is
displayed again there.
If a dialog work process has used up the roll area assigned to it and the extended memory,
2
private memory is assigned to the work process. The work process goes into PRIV mode
(private). In the parameter settings, ensure that not too many dialog work processes are
simultaneously in the PRIV mode, since this lowers system performance. The other Work
Process types (background, update, enqueue and spool work processes) are assigned heap
memory after the roll area is used up. Allocating Extended Memory is not useful since no
context change occurs for these processes.

source: http://help.sap.com
3
B.3 Memory Management
Memory management determines for a particular system activity when, and what
type and size of memory is allocated. Figure B.4 shows the components involved in
SAP memory management.
Figure B.4. SAP MEMORY MANAGEMENT
In the figure, Shared Memory represents memory space accessible by all work
processes. Roll Buffer memory is used to queue user dialog requests. When the Roll
Buffer becomes full, user dialog requests are swapped to the Roll File. Extended
Memory stores user context (i.e., user data), such as the authorization and session
context for each SAP session. Page Buffer memory holds large lists and long internal
tables. When the Page Buffer becomes full, data are swapped to the Page File.
Shared Buffer memory stores business objects and data. A dialog work process
checks the Shared Buffer first for required business objects and data before
searching the BW database. We will discuss the Shared Buffer later.
When a dialog work process becomes available to process the first user dialog
request in Roll Buffer, it allocates memory in the following order:
1. The user dialog request, including the initial user context, is moved from the
Roll Buffer into Roll Area 1. There the dialog work process can access the
required data directly.
2. If Roll Area 1 is insufficient, more memory is allocated from the Extended
4
Memory.
3. If the Extended Memory is also insufficient, more memory is allocated from
Roll Area 2.
4. If Roll Area 2 is still insufficient, more memory is allocated from the Private
Memory. Once this allocation takes place, the current dialog work process will
no longer be available to process other user dialog requests.
To make Private Memory available again to process other user dialog
requests, the operating system must restart the dialog work process.
5. If the Private Memory is still insufficient, the dialog work process is restarted,
and the user dialog request is terminated.
After the user dialog request has been processed, the user context rolls into the
Extended Memory and is ready for use by the next dialog request. In addition, the
Roll Area and Private Memory allocated for the current dialog work process are
released.
This procedure is repeated for each user dialog request in an SAP transaction. At the
end of the SAP transaction, the last dialog work process copies the modified user
dialog request back to the Roll Area, and eventually back to the end user.
B.3.1 SAP Buffer
The SAP Buffer stores frequently used business objects and data. With the SAP
Buffer, work processes don't need to access the database if the buffer already
contains the required information. This strategy helps to reduce database access, the
load on the database server, and network traffic, thereby improving overall system
performance. If the required information is not available in the buffer, it must be
paged into the buffer before it can be used, resulting in slower performance.
If the SAP Buffer is too small, it cannot hold all of the required information. This
shortage of space results in the information being swapped out of the buffers.
If the SAP Buffer is too large, the native operating system will start paging because
too much memory is taken away and given to SAP, database, or other applications.
Ten types of buffers exist:
• The Repository Buffer, also called the nametab (NTAB) buffer, contains the
table and field definitions
5
• The Program Buffer contains the compiled executable versions of ABAP
programs
• The CUA Buffer contains the GUI objects, such as menus and push buttons
• The Screen Buffer contains the generated ABAP screens
• The Calendar Buffer contains all defined factory and public holiday calendars
• The Generic Key Table Buffer contains a range of table entries; it can also
hold all the entries in a table
• The Single Record Table Buffer contains the single table entries.
• The Import/Export Buffers contain data that must be available to several work
processes.
• The Roll and Paging Buffers were discussed earlier in this section.
• The Cursor Cache contains parsed SQL statements.
For Further Information
• Book: SAP R/3 Administrator's Handbook, by Jose Antonio Hernandez (ed.). McGraw-Hill
Professional Publishing, 1999. ISBN: 0071354131.
• Book: SAP R/3 System: A Client/Server Technology, by Rudiger Buck-Emden, Jurgen Galimow,
SAP AG. Addison-Wesley, 1996. ISBN: 0201403501.
• OSS Note 0039412, " How Many Work Processes to Configure."
• OSS Note 0021636, " RAM Extension: Which Changes to Profile?"
• OSS Note 0016223, " Problems with Roll Memory."
6
Virtual Address Space of a Work Process
With 32-bit systems, 4 GB of memory can theoretically be addressed; depending on the operating
system, there are approximately 2 GB of virtual address space available to a process.
This consists of a text and a data segment, a dynamically extendible heap and a dynamically
extendible stack. The heap increases in size from the bottom and the stack increases from the top;
this enables the entire virtual address space to be used.
With an SAP work process, there are special areas reserved on the heap. The size of these special
areas can be set using a profile parameter. These areas are:
• Roll area
• SAP paging area
• Private memory
The largest reserved area is located between the heap and stack of the SAP extended memory.
7
Integration
The graphic below shows the relationship with the parameters abap/heap_area_dia,
abap/heap_area_nondia, and ztta/roll_extension.
8

More Related Content

What's hot

Sap abap tutorials
Sap abap tutorialsSap abap tutorials
Sap abap tutorialsHarshul Phadke
 
SAP An Introduction
SAP An IntroductionSAP An Introduction
SAP An Introductionsh_neha252
 
SAP HANA Overview
SAP HANA OverviewSAP HANA Overview
SAP HANA OverviewSitaram Kotnis
 
Sap Security Workshop
Sap Security WorkshopSap Security Workshop
Sap Security Workshoplarrymcc
 
Sap basis administrator user guide
Sap basis administrator   user guideSap basis administrator   user guide
Sap basis administrator user guidePoguttuezhiniVP
 
Authorisation Concept In SAP | http://sapdocs.info
Authorisation Concept In SAP | http://sapdocs.infoAuthorisation Concept In SAP | http://sapdocs.info
Authorisation Concept In SAP | http://sapdocs.infosapdocs. info
 
Study of SAP R3 architecture
Study of SAP R3 architecture Study of SAP R3 architecture
Study of SAP R3 architecture SapFico Training
 
Sap fiori tutorial
Sap fiori tutorialSap fiori tutorial
Sap fiori tutorialNagendra Babu
 
SAP data archiving
SAP data archivingSAP data archiving
SAP data archivingMohammed Azhad
 
SAP Overview and Architecture
SAP Overview and ArchitectureSAP Overview and Architecture
SAP Overview and Architecture Ankit Sharma
 
Creating new users and roles in sap guide
Creating new users and roles in sap guideCreating new users and roles in sap guide
Creating new users and roles in sap guidemehboobhafz
 
Sap Overview pdf
Sap Overview pdfSap Overview pdf
Sap Overview pdfpimporn
 
Azure for SAP Solutions - Use Cases and Migration Options
Azure for SAP Solutions - Use Cases and Migration OptionsAzure for SAP Solutions - Use Cases and Migration Options
Azure for SAP Solutions - Use Cases and Migration OptionsmyCloudDoor
 

What's hot (20)

SAP Basic Introduction
SAP Basic IntroductionSAP Basic Introduction
SAP Basic Introduction
 
Sap abap tutorials
Sap abap tutorialsSap abap tutorials
Sap abap tutorials
 
SAP An Introduction
SAP An IntroductionSAP An Introduction
SAP An Introduction
 
Sap archiving process
Sap archiving processSap archiving process
Sap archiving process
 
Sap Presentation
Sap PresentationSap Presentation
Sap Presentation
 
SAP HANA Overview
SAP HANA OverviewSAP HANA Overview
SAP HANA Overview
 
Sap Security Workshop
Sap Security WorkshopSap Security Workshop
Sap Security Workshop
 
SAP Fiori ppt
SAP Fiori pptSAP Fiori ppt
SAP Fiori ppt
 
Sap basis administrator user guide
Sap basis administrator   user guideSap basis administrator   user guide
Sap basis administrator user guide
 
Authorisation Concept In SAP | http://sapdocs.info
Authorisation Concept In SAP | http://sapdocs.infoAuthorisation Concept In SAP | http://sapdocs.info
Authorisation Concept In SAP | http://sapdocs.info
 
Study of SAP R3 architecture
Study of SAP R3 architecture Study of SAP R3 architecture
Study of SAP R3 architecture
 
Sap fiori tutorial
Sap fiori tutorialSap fiori tutorial
Sap fiori tutorial
 
SAP HANA - Understanding the Basics
SAP HANA - Understanding the Basics SAP HANA - Understanding the Basics
SAP HANA - Understanding the Basics
 
SAP data archiving
SAP data archivingSAP data archiving
SAP data archiving
 
Sap overview
Sap overviewSap overview
Sap overview
 
Chapter 02 sap client overview
Chapter 02 sap client overviewChapter 02 sap client overview
Chapter 02 sap client overview
 
SAP Overview and Architecture
SAP Overview and ArchitectureSAP Overview and Architecture
SAP Overview and Architecture
 
Creating new users and roles in sap guide
Creating new users and roles in sap guideCreating new users and roles in sap guide
Creating new users and roles in sap guide
 
Sap Overview pdf
Sap Overview pdfSap Overview pdf
Sap Overview pdf
 
Azure for SAP Solutions - Use Cases and Migration Options
Azure for SAP Solutions - Use Cases and Migration OptionsAzure for SAP Solutions - Use Cases and Migration Options
Azure for SAP Solutions - Use Cases and Migration Options
 

Similar to Sap memory managerment

Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management Shashank Asthana
 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementkazim Hussain
 
Unit iiios Storage Management
Unit iiios Storage ManagementUnit iiios Storage Management
Unit iiios Storage Managementdonny101
 
UNIT-2 OS.pptx
UNIT-2 OS.pptxUNIT-2 OS.pptx
UNIT-2 OS.pptxssusera387fd1
 
Memory Management
Memory ManagementMemory Management
Memory ManagementShipra Swati
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory managementJohan Granados Montero
 
Operating System
Operating SystemOperating System
Operating SystemSubhasis Dash
 
Sap basis made_easy321761331053730
Sap basis made_easy321761331053730Sap basis made_easy321761331053730
Sap basis made_easy321761331053730K Hari Shankar
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architectureSoumya Das
 
St22 abap programming
St22 abap programming St22 abap programming
St22 abap programming nanda nanda
 
programming errors
programming errorsprogramming errors
programming errorsnanda nanda
 
virtual memory
virtual memoryvirtual memory
virtual memoryAbeer Naskar
 
Bab 4
Bab 4Bab 4
Bab 4n k
 
Operating system
Operating systemOperating system
Operating systemHussain Ahmady
 
08 Operating System Support
08  Operating  System  Support08  Operating  System  Support
08 Operating System SupportJeanie Delos Arcos
 

Similar to Sap memory managerment (20)

Open sap cst1_week_2_all_slides
Open sap cst1_week_2_all_slidesOpen sap cst1_week_2_all_slides
Open sap cst1_week_2_all_slides
 
Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management
 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory management
 
Unit iiios Storage Management
Unit iiios Storage ManagementUnit iiios Storage Management
Unit iiios Storage Management
 
UNIT-2 OS.pptx
UNIT-2 OS.pptxUNIT-2 OS.pptx
UNIT-2 OS.pptx
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
 
Memory comp
Memory compMemory comp
Memory comp
 
Operating System
Operating SystemOperating System
Operating System
 
Dynamic loading
Dynamic loadingDynamic loading
Dynamic loading
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
 
Sap basis made_easy321761331053730
Sap basis made_easy321761331053730Sap basis made_easy321761331053730
Sap basis made_easy321761331053730
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architecture
 
St22 abap programming
St22 abap programming St22 abap programming
St22 abap programming
 
programming errors
programming errorsprogramming errors
programming errors
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
Bab 4
Bab 4Bab 4
Bab 4
 
Operating system
Operating systemOperating system
Operating system
 
08 Operating System Support
08  Operating  System  Support08  Operating  System  Support
08 Operating System Support
 
Module 4 memory management
Module 4 memory managementModule 4 memory management
Module 4 memory management
 

More from Raj p

Business roles
Business rolesBusiness roles
Business rolesRaj p
 
Sap plant connectivity (p co)
Sap plant connectivity (p co)Sap plant connectivity (p co)
Sap plant connectivity (p co)Raj p
 
Solution manager 7.2 details
Solution manager 7.2   detailsSolution manager 7.2   details
Solution manager 7.2 detailsRaj p
 
Sap system copy
Sap system copySap system copy
Sap system copyRaj p
 
stms
stmsstms
stmsRaj p
 
How to guide configure ssl in abap system
How to guide   configure ssl in abap systemHow to guide   configure ssl in abap system
How to guide configure ssl in abap systemRaj p
 
T pn r3trans
T pn r3transT pn r3trans
T pn r3transRaj p
 
Sap overview
Sap overviewSap overview
Sap overviewRaj p
 
Oracle upgrade
Oracle upgradeOracle upgrade
Oracle upgradeRaj p
 
Sap transaction-codes-list
Sap transaction-codes-listSap transaction-codes-list
Sap transaction-codes-listRaj p
 
Sap basis-training-material
Sap basis-training-materialSap basis-training-material
Sap basis-training-materialRaj p
 
Ap ar questions
Ap ar questionsAp ar questions
Ap ar questionsRaj p
 
Ap ar questions
Ap ar questionsAp ar questions
Ap ar questionsRaj p
 
Order to cash
Order to cashOrder to cash
Order to cashRaj p
 

More from Raj p (14)

Business roles
Business rolesBusiness roles
Business roles
 
Sap plant connectivity (p co)
Sap plant connectivity (p co)Sap plant connectivity (p co)
Sap plant connectivity (p co)
 
Solution manager 7.2 details
Solution manager 7.2   detailsSolution manager 7.2   details
Solution manager 7.2 details
 
Sap system copy
Sap system copySap system copy
Sap system copy
 
stms
stmsstms
stms
 
How to guide configure ssl in abap system
How to guide   configure ssl in abap systemHow to guide   configure ssl in abap system
How to guide configure ssl in abap system
 
T pn r3trans
T pn r3transT pn r3trans
T pn r3trans
 
Sap overview
Sap overviewSap overview
Sap overview
 
Oracle upgrade
Oracle upgradeOracle upgrade
Oracle upgrade
 
Sap transaction-codes-list
Sap transaction-codes-listSap transaction-codes-list
Sap transaction-codes-list
 
Sap basis-training-material
Sap basis-training-materialSap basis-training-material
Sap basis-training-material
 
Ap ar questions
Ap ar questionsAp ar questions
Ap ar questions
 
Ap ar questions
Ap ar questionsAp ar questions
Ap ar questions
 
Order to cash
Order to cashOrder to cash
Order to cash
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

Sap memory managerment

  • 1. SAP Memory Management Functions of the SAP Memory Management System An application runs in an SAP work process where an ABAP program is normally executed. The process requires memory to do this, which are allocated to it by the memory management system. The order in which the work process is assigned the memory type depends on the work process type, either dialog or non-dialog (see SAP Memory Types), and the underlying operating system. This is described in more detail in the documentation on the operating system. The area of a user context that is directly accessible is now extended as needed, if the user context has expanded. For dialog work processes, the data of the user context, including internal tables is located in this expanded area. You can therefore access all the data in the user context. Only data of the types "extract" and "export to memory" stay in SAP Paging. The SAP Roll Area is used for the initial memory assigned to a user context, and (if available) for additional memory if the expanded memory is full. The following diagram displays the memory types that can be assigned to work processes on the SAP and operating system level. Here are the most important system profile parameters that control the availability of the memory types. SAP Roll Area The roll area is a memory area with a set (configurable) size that belongs to a work process. It 1
  • 2. is located in the heap of the virtual address space of the work process. When the context of a work process changes, the data is copied from the roll area to a common resource called the roll file. To prevent repeated copying, another roll buffer is located in between that is part of the shared memory. The roll area consists of 2 segments. The first segment, which can be set with the parameter ztta/roll_first, is assigned to the work process first as memory. If this is used up, the work process has more memory assigned to it. The amount of memory is determined by the difference between the parameters ztta/roll_area and ztta/roll_first. SAP Extended Memory SAP extended memory is the core of the SAP memory management system. Each SAP work process has a part reserved in its virtual address space for extended memory (see Virtual Address Space in a Work Process). You can set the size of extended memory using the profile parameter em/initial_size_MB: Extended Memory Pool Size. Under Windows NT, further memory is assigned dynamically as needed, and you can also set this amount. You can map the extended memory from the common resource onto any work process, and after onto another process (see graphic) on the same address in the virtual address space. This is important if you work with pointers in the ABAP program. Depending on the operating system, how you implement the extended memory is different. The SAP system builds a layer on to the operating system functions for the page management of this memory. This extended memory is implemented as an unnamed mapped file. This means the address space uses the paging file or uses the swap space of the operating system as background memory. Private Memory Other processes cannot use private (heap) memory. After releasing the assigned memory, the operating system still considers the (virtual) memory as being occupied by the allocating process. These characteristics of heap memory require that: 1. The work process can be run in PRIV mode (private) when the local memory is assigned. This means that the work process is reserved for processing the current user context until the context releases the work process again when the request has ended. 2. The work process, if it has used a lot of private memory, is restarted when the user context is terminated and the local memory is returned. The restart makes the local memory available again for other processes. A restart occurs if a work process uses more local memory than is defined in the parameter abap/heaplimit. The mechanism is displayed again there. If a dialog work process has used up the roll area assigned to it and the extended memory, 2
  • 3. private memory is assigned to the work process. The work process goes into PRIV mode (private). In the parameter settings, ensure that not too many dialog work processes are simultaneously in the PRIV mode, since this lowers system performance. The other Work Process types (background, update, enqueue and spool work processes) are assigned heap memory after the roll area is used up. Allocating Extended Memory is not useful since no context change occurs for these processes.  source: http://help.sap.com 3
  • 4. B.3 Memory Management Memory management determines for a particular system activity when, and what type and size of memory is allocated. Figure B.4 shows the components involved in SAP memory management. Figure B.4. SAP MEMORY MANAGEMENT In the figure, Shared Memory represents memory space accessible by all work processes. Roll Buffer memory is used to queue user dialog requests. When the Roll Buffer becomes full, user dialog requests are swapped to the Roll File. Extended Memory stores user context (i.e., user data), such as the authorization and session context for each SAP session. Page Buffer memory holds large lists and long internal tables. When the Page Buffer becomes full, data are swapped to the Page File. Shared Buffer memory stores business objects and data. A dialog work process checks the Shared Buffer first for required business objects and data before searching the BW database. We will discuss the Shared Buffer later. When a dialog work process becomes available to process the first user dialog request in Roll Buffer, it allocates memory in the following order: 1. The user dialog request, including the initial user context, is moved from the Roll Buffer into Roll Area 1. There the dialog work process can access the required data directly. 2. If Roll Area 1 is insufficient, more memory is allocated from the Extended 4
  • 5. Memory. 3. If the Extended Memory is also insufficient, more memory is allocated from Roll Area 2. 4. If Roll Area 2 is still insufficient, more memory is allocated from the Private Memory. Once this allocation takes place, the current dialog work process will no longer be available to process other user dialog requests. To make Private Memory available again to process other user dialog requests, the operating system must restart the dialog work process. 5. If the Private Memory is still insufficient, the dialog work process is restarted, and the user dialog request is terminated. After the user dialog request has been processed, the user context rolls into the Extended Memory and is ready for use by the next dialog request. In addition, the Roll Area and Private Memory allocated for the current dialog work process are released. This procedure is repeated for each user dialog request in an SAP transaction. At the end of the SAP transaction, the last dialog work process copies the modified user dialog request back to the Roll Area, and eventually back to the end user. B.3.1 SAP Buffer The SAP Buffer stores frequently used business objects and data. With the SAP Buffer, work processes don't need to access the database if the buffer already contains the required information. This strategy helps to reduce database access, the load on the database server, and network traffic, thereby improving overall system performance. If the required information is not available in the buffer, it must be paged into the buffer before it can be used, resulting in slower performance. If the SAP Buffer is too small, it cannot hold all of the required information. This shortage of space results in the information being swapped out of the buffers. If the SAP Buffer is too large, the native operating system will start paging because too much memory is taken away and given to SAP, database, or other applications. Ten types of buffers exist: • The Repository Buffer, also called the nametab (NTAB) buffer, contains the table and field definitions 5
  • 6. • The Program Buffer contains the compiled executable versions of ABAP programs • The CUA Buffer contains the GUI objects, such as menus and push buttons • The Screen Buffer contains the generated ABAP screens • The Calendar Buffer contains all defined factory and public holiday calendars • The Generic Key Table Buffer contains a range of table entries; it can also hold all the entries in a table • The Single Record Table Buffer contains the single table entries. • The Import/Export Buffers contain data that must be available to several work processes. • The Roll and Paging Buffers were discussed earlier in this section. • The Cursor Cache contains parsed SQL statements. For Further Information • Book: SAP R/3 Administrator's Handbook, by Jose Antonio Hernandez (ed.). McGraw-Hill Professional Publishing, 1999. ISBN: 0071354131. • Book: SAP R/3 System: A Client/Server Technology, by Rudiger Buck-Emden, Jurgen Galimow, SAP AG. Addison-Wesley, 1996. ISBN: 0201403501. • OSS Note 0039412, " How Many Work Processes to Configure." • OSS Note 0021636, " RAM Extension: Which Changes to Profile?" • OSS Note 0016223, " Problems with Roll Memory." 6
  • 7. Virtual Address Space of a Work Process With 32-bit systems, 4 GB of memory can theoretically be addressed; depending on the operating system, there are approximately 2 GB of virtual address space available to a process. This consists of a text and a data segment, a dynamically extendible heap and a dynamically extendible stack. The heap increases in size from the bottom and the stack increases from the top; this enables the entire virtual address space to be used. With an SAP work process, there are special areas reserved on the heap. The size of these special areas can be set using a profile parameter. These areas are: • Roll area • SAP paging area • Private memory The largest reserved area is located between the heap and stack of the SAP extended memory. 7
  • 8. Integration The graphic below shows the relationship with the parameters abap/heap_area_dia, abap/heap_area_nondia, and ztta/roll_extension. 8