Professional Documents
Culture Documents
Memory Management in 7.4 - Kernel - SAP BASIS
Memory Management in 7.4 - Kernel - SAP BASIS
Kernel 7.4*
TABLE OF CONTENTS
OVERVIEW ....................................................................................................................................................... 3
NEW PARAMETER FORMULAS ..................................................................................................................... 3
TROUBLESHOOTING ...................................................................................................................................... 4
512 GB LIMIT .................................................................................................................................................... 5
CONCLUSION................................................................................................................................................... 5
OVERVIEW
This paper describes Memory Management parameterization changes in 7.4* kernel. The main goal of these
changes was simplification: the administrator will be enabled by setting only one profile parameter
PHYS_MEMSIZE to automatically initiate changes of dependent parameters. This is a fast way to scale the
ABAP instance memory consumption. Within the context of this development the old fashioned Zero Admin
MM for Linux and Windows
- was extended to all other operating systems
and
- reimplemented via formula based parameters
More information about the Zero Administration in previous releases can be found in:
http://help.sap.com/saphelp_erp60_sp/helpdata/en/3c/05863c6800924fe10000000a114084/content.htm
http://help.sap.com/saphelp_erp60_sp/helpdata/en/84/7ed384d81f11d188be0000e83539c3/content.htm
= (ceil($(em/initial_size_MB)*1024*0.15/4096) * 4096)
= (max($(PHYS_MEMSIZE)*1024*1024 * 0.1, $(abap/heap_area_dia) * 2 ))
= ($(abap/buffersize)/4)
= (min(20000, $(em/initial_size_MB)*0.02))
= (ceil($(em/initial_size_MB) * 1024 / 100000 / 4096) * 4096)
= (min($(em/initial_size_MB) * 0.05, 32000))
= (min(512000, $(PHYS_MEMSIZE) * 0.7))
= ($(em/initial_size_MB))
= (max(min(1000+40*max(5,floor(($(PHYS_MEMSIZE)-128)*25/128)),16384),1024))
= ( $(rdisp/tm_max_no) / 2 )
= ($(rdisp/elem_per_queue)*3)
= ($(zcsa/db_max_buftab))
= (min(500000, ($(rsdb/ntab/entrycount))))
= ($(rsdb/ntab/ftabsize) * 0.2)
= ($(rsdb/ntab/ftabsize) * 0.1)
= (max(4096,$(PHYS_MEMSIZE)*1024 * 0.01))
= (max(2000,$(rsdb/obj/buffersize) / 4))
= ($(rsts/ccc/cachesize) * 0.1)
= ($(zcsa/table_buffer_area) * 0.1 / 1024)
= ($(zcsa/db_max_buftab) * 0.1)
= (max(20000,$(zcsa/table_buffer_area) / (5 * 1024) ))
= (min(3333333333, (max(30000000,($(em/initial_size_MB) * 1024 * 1024 * 0.1)))))
= ( ($(em/global_area_MB) + $(abap/shared_objects_size_MB) + $(rtbb/buffer_length)/1024 +
$(zcsa/table_buffer_area)/1024/1024 ) / $(ES/SHM_SEG_SIZE) + 1 )
In the example above the parameter abap/buffersize that has been set to a fix value although its default
value is a formula, was found.
TROUBLESHOOTING
In this section we would like to analyze a real life example from an administrators point of view.
A system consisting of 2 ABAP instances is installed on a host with 64GB main memory. Every instance is
running with PHYS_MEMSIZE=30% setting in profile. Customers experience sporadic memory lack issues
- Rabaxes
- EmAlloc failed errors in dev trace
- Extended Memory Dump in dev trace
Examples for memory lack Rabaxes are: TSV_TNEW_PAGE_ALLOC, LOAD_NO_ROLL,
STRING_LENGTH_TOO_LARGE, TSV_TNEW_BLOCKS_NO_ROLL_MEMORY
The administrator is analyzing Extended Memory Dumps in dev traces, they appear as shown below:
...
...
Extended Memory Dump
Act. USER
SUM
IM0
IM1
_________________________________________________________________
SAP_SMDMON(T52_U5144_M0)
[ 0.9] > 0.8< -----0990FUSRABCD(T461_U4228_M0) [ 23.8] > 23.6< -----USER_TEST_12(T461_U4228_M0) [ 23.8] > 23.6< -----...
...
# CHAIN
OWNER
STATE
0 0
1 1
...
2537 1
2538 2538
2539 2539
***free***
EG_GLOBAL_AREA
free
shared
EG_GLOBAL_AREA
SAP_SMDMON(T6_U377_M0)
K8NZDJEQHUR(T558_U15419_M0)
shared
detached
detached
...
The administrator cant identify any particular user which is using too much memory. This means that the
server has been overloaded sporadically, i.e. at peak times when many users are working simultaneously.
Proposed solution: set PHYS_MEMSIZE=45% in the profile to allow every instance to use
64GB * 0.45 = 28,8GB
main memory. This will automatically increase the value of dependent parameters, e.g:
em/initial_size_MB
abap/heap_area_total
PHYS_MEMSIZE=30%
PHYS_MEMSIZE=45%
13653 (MB)
20452265165 (Byte)
20480 (MB)
30678397747 (Byte)
Keep in mind that the instance has to be restarted for activating its new values!
PHYS_MEMSIZE can be also set to absolute values instead of percentage:
PHYS_MEMSIZE=40000
CONCLUSION
Formula based parameters introduced in 7.4* and supported for all operating systems offer a new simplified
way of administration for ABAP instances in an SAP system. They will be used in ABAP server memory
management already.
About the author: Gennady Maly is working at SAP development since 2001.
www.sap.com