You are on page 1of 6

Memory Management simplifications in ABAP

Kernel 7.4*

Memory Management simplifications in ABAP Kernel 7.4*

TABLE OF CONTENTS
OVERVIEW ....................................................................................................................................................... 3
NEW PARAMETER FORMULAS ..................................................................................................................... 3
TROUBLESHOOTING ...................................................................................................................................... 4
512 GB LIMIT .................................................................................................................................................... 5
CONCLUSION................................................................................................................................................... 5

Memory Management simplifications in ABAP Kernel 7.4*

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

NEW PARAMETER FORMULAS


The formulas may depend on kernel release and operating system. You can get a list of parameters with
formula based default values e.g. with help of sappfpar executable. Below is an example for kernel 7.41
PL22 on Linux:

> sappfpar all | grep "SAP: ("


abap/buffersize
abap/heap_area_total
abap/programs
abap/shared_objects_size_MB
em/blocksize_KB
em/global_area_MB
em/initial_size_MB
em/max_size_MB
rdisp/PG_SHM
rdisp/max_websocket_connections
rdisp/wp_ca_blk_no
rsdb/ntab/entrycount
rsdb/ntab/ftabsize
rsdb/ntab/irbdsize
rsdb/ntab/sntabsize
rsdb/obj/buffersize
rsdb/obj/max_objects
rsts/ccc/cache07
rtbb/buffer_length
rtbb/max_tables
zcsa/db_max_buftab
zcsa/table_buffer_area
ES/SHM_MAX_SHARED_SEGS

= (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 )

Formulas support in the profiles is implemented as of kernel 7.40, described in:


http://help.sap.com/saphelp_nw74/helpdata/en/a7/d631e255594dc19899706a3a7c3fe8/content.htm?frames
et=/en/51/319798cc7a428a896af0bc2a00adc7/frameset.htm

Memory Management simplifications in ABAP Kernel 7.4*

sappfpar can also be used for checking your profile:


>sappfpar pf=<ProfileName> check_formula
***WARNING: formula parameter: abap/buffersize = 350000 found in profile
Errors detected..................: 0
Warnings detected................: 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.

Memory Management simplifications in ABAP Kernel 7.4*

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

which would mean Megabytes in the Example above.

512 GB LIMIT FOR ALL OPERATING SYSTEMS


PHYS_MEMSIZE is not a hard limit for an ABAP instance. This is a guide value to make the instance
aware about the amount of main memory it should use. This limit can be overrunned in heavy load
scenarios.
Kernel 7.4* has been tested up to PHYS_MEMSIZE=512000 settings. It is not recommended to run a
singular ABAP instance with more than 512000 MB.
Warnings in dev traces would give you a hint if you are trying to run an instance with more than that
memory size, e.g.:
* WARNING=>DpCheckParams: invalid value for PHYS_MEMSIZE=600000 [dpInit.c]
* WARNING=>DpCheckParams: check message: Parameter value out of range (16...512000) [dpInit.c]

It is recommended to use default memory management models on every OS:


es/implementation = std (Unix)
es/implementation = view (Windows)
ES/TABLE = UNIX_STD (Unix)
ES/TABLE = SHM_SEGS (AIX only)
The memory management parameter formulas have been optimized for the memory model cases above.
The only platform has been optimized not for default case only is OS/400 which has been tuned for both
UNIX_STD and SHM_SEGS memory models.

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

2014 SAP AG. All rights reserved.


SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP
BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP
products and services mentioned herein as well as their respective
logos are trademarks or registered trademarks of SAP AG in Germany
and other countries.
Business Objects and the Business Objects logo, BusinessObjects,
Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and
other Business Objects products and services mentioned herein as
well as their respective logos are trademarks or registered trademarks
of Business Objects Software Ltd. Business Objects is an SAP
company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL
Anywhere, and other Sybase products and services mentioned herein
as well as their respective logos are trademarks or registered
trademarks of Sybase Inc. Sybase is an SAP company.
Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are
registered trademarks of Crossgate AG in Germany and other
countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of
their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials
are provided by SAP AG and its affiliated companies ("SAP Group")
for informational purposes only, without representation or warranty of
any kind, and SAP Group shall not be liable for errors or omissions
with respect to the materials. The only warranties for SAP Group
products and services are those that are set forth in the express
warranty statements accompanying such products and services, if
any. Nothing herein should be construed as constituting an additional
warranty.

You might also like