Cracking SAP Memory Management _Part3
Thanks for the response for first two blogs.SAP SCN is a wonderful place to share thoughts
Let me Jump directly to SAP Extended memory.It is one of the main places where user context is stored.
From the previous blog we know that SAP extended memory is a shared memory. And it can be used to store the User context.
SAP Extended Memory
Since there are roll in roll outs for different sessions it is convenient to store the user context in Extended memory.
The text which is in bold is explained in the previous blog
What is the Size of the SAP Extended Memory?
The size of the SAP extended memory is allocated when SAP Instance is started up and is defined by em/initial_size_MB
Ztta/roll_extension defines the maximum size of a user context in an extended memory. You know why need this kind of a limit.
SAP Heap memory
The third memory Area where user context can be stored is SAP Heap Memory
Abab/heap_area_dia -SAP heap memory a dialog process can allocate
Abap/heap_area_nondia- SAP Heap memory a non dialogue process can allocate
Abap/heap_area_total-Total SAP Heap memory that can be allocated by all work processes.
Lets do a refresher course and see if all the terms makes sense
We want to look at how memory is allocated during a transaction step.
1.When a transaction starts ztta/roll_first is allocated which is normally kept to 1 (byte) to reduce the usage of SAP Roll memory.
2.ztta/roll_extension – The remaining part of the user context is stored in Extended Memory up to the limit of this parameter
3.If the extension limit is exceeded the remainder is stored in ztta/roll_area
4.If the Context Continue to grow the work process will go to SAP Heap memory abap/heap_area_dia or non_dia is used depending upon the type of work process .This status is called PRIV mode.
This is a general approach and will vary upon the architecture and the type of operating system. For example in Unix non
Dialog work process uses more of heap memory than shared memory.
SAP EG Memory
As previously noted user context are stored in extended ,roll and heap memory.
However memory areas are required to hold data globally between user contexts.
It is defined by Parameter em/global_area_MB approximately equivalent to 10% of Extended Memory
SAP Paging Memory
It is completely different from Operating system Paging memory
A new user context is created when an ABAP Program calls another program or transaction. The variables are transferred when a new Program is called and is stored in Paging memory. Refer to part1 we have a similar situation like below.
My intention is to introduce some basic terms which is used on a daily basis and explain it in a simple way. Hope it was useful .you can step on basics and try to read and understand the memory management .
It will be nice to conclude this way
1.Available memory =Physical memory + Swap Space
2.Virtual memory Required
1. ST02 ->Select Detailed Analysis ->Storage
3.100MB for OS
4.Any Other Program running (memory Occupied)
The Virtual memory Required MUST less than Available memory. This will be your starting point for memory tuning.
If this blog was useful and interesting please let me know.
The link to previous blogs