-
How to run SAP transaction ST02 and do performance analysis in
SAPmemory/buffer area
SAP transaction ST02 can be used to view SAP Buffer and memory
configuration for a SAP instance and review SAPmemory quotas for
individual user job or process as well as current SAP buffer
status, SAP memory utilization at SAPinstance or user/transaction
level. This post would cover following areas:
1. How to run SAP memory usage monitor and navigate through
important ST02 screens.
2. How to understand SAP ST02 screens: main/summary screen or
SAP memory Quota screens etc.
3. How to use SAP ST02 to do SAP memory and buffer performance
analysis.
1. How to run SAP Memory/Buffer monitor and navigate through
important screens of the monitor
1.1 How to start SAP Buffer/Memory monitor
To start SAP Buffer/Memory monitor, you can either use menu path
or run sap transaction ST02 directly. This would showbuffer/memory
configuration and usage for the instance where the SAP ST02 is
started. After you execute SAP transactionST02, SAP buffer and
memory overview/status screen would show up:
Figure 1 ST02 memory overview/summary
DocumentsPDFCompleteClick Here & Upgrade
Expanded FeaturesUnlimited Pages
-
You can refresh the screen to show new status, Except Curr. Use
and MaxUse, all other non-configuration data areaccumulated data
since last startup of the SAP instance in question.
1.2 How to navigate through important screens of the SAP ST02
transaction.
Following screen shows menu path and hot key which you can use
to access other SAP st02 screens:
In following sections, I would mention some important screens
which I use most often.
1.2.1 How to review SAP Buffer and Memory for another instance
of the SAP system
If your system has more than one instance, you can display to
another instance via following path from figure-1
screen:Environment -> RFC server or press shift+F4 key until a
popup window shows up with a list of instance, you can click the
oneyou would like to review.
1.2.2 How to navigate to SAP quotas screen SAP memory allocation
for a single work process
SAP ST02 Quota screen shows type of memory and amount allowed
for a single SAP work process as well as memoryallocation sequence.
There are two sequences one is for dialog type tasks like online
transaction executed by a SAP user,the other is for non-dialog
tasks like SAP SM37 jobs.
You can get the memory quota screen for single sap work process
via menu Goto->SAP memory-> Quotas:
Figure 2 ST02 memory quotas for a work process
DocumentsPDFCompleteClick Here & Upgrade
Expanded FeaturesUnlimited Pages
-
1.2.3 How to navigate to mode list screen showing memory usage
at user/transaction level
You can bring up mode list screen from main screen (Figure 1)
via following path: Details analysis menu -> SAP Memory
->Mode list
Figure 3 Memory usage by SAP users
1.2.4 How to navigate to SAP memory history screen
SAP ST02 provide you history memory usage information. You can
access this information via following menu path or hotkeys from the
memory initial screen.
Following is a part of history screen :
Figure 4 ST02 History data
If you are just interested in buffer history for one buffer
type, you can double click the corresponding row in Figure-1 screen
the screen would change, on the new screen click on History Icon,
SAP ST02 would bring up history screen just for theselected buffer
type.
History information can reveal abnormal memory usage as well as
high-water mark namely Maximum Usage since the datewhen instance is
started or restarted. SWAP difference between two dates can show
the growth pattern base on that, youcan see whether action is
needed to correct the situation.
DocumentsPDFCompleteClick Here & Upgrade
Expanded FeaturesUnlimited Pages
-
1.2.5 How to navigate to parameter screen
You can check SAP memory/buffer parameters via Icon or following
the menu path: Goto-> Profile Parameters -> Current.
Following is a part of SAP memory/buffer parameter screen:
You can select a profile parameter and change it. But the change
would only come into effect after the instance is bounced.SAP has a
tool to allow you to change SAP memory parameters(Extended Memory
and Heap memory) dynamically thismeans that your change would
become effect immediately.
2. Explanation on SAP ST02 screens
Here I would choose several frequent referred ST02 screens and
give more information to help you understand the datapresented by
SAP ST02 transaction.
2.1 SAP buffer and memory overview/summary screen
ST02 overview screen show information at instance level and has
several sections:
Top shows instance name, instance startup date and snap-shot of
date time. Buffer section shows different SAP buffer configuration
and current status. SAP Memory section shows SAP memory
configuration and current status. Call Statistics shows database
access information.
I have not encountered a performance case which I need Call
Statistics data to do analysis, It looks like straightforward.From
performance point view, buffer sections and SAP memory section is
more critical that is what I am going to cover infollowing
sections.
2.1.1 Buffer section explanation
Column field explanation
Screen Field ExplanationBuffer Type of buffer like nametab,
Program etc.Hitratio % Namely buffer quality =( total access
physical access)/ total access x 100%.Alloc. KB Configured or
allocated memory space for the buffer type in question.Freesp. KB
Free space = allocated memory space occupied memory space.Dir. Size
Maximum number of buffer object that can be kept in the related
buffer.FreeDirEnt Free Directory Entry = Directory Size used Dir
Entry.% Free Dir = free Directory / Dir. Size X 100%.Swap Number of
buffered objects which has been swapped to page area.DB Access
Number of data transfers from the data base to the related
buffer.
DocumentsPDFCompleteClick Here & Upgrade
Expanded FeaturesUnlimited Pages
-
2.1.2 SAP Memory section explanation
This section shows configured memory/virtual memory for a list
of sap memory type and their memory usage.
Column ExplanationSap Memory Show type of SAP memoryCurr. Use %
= allocated memory/total-memory X 100% for the type of memory in
questionCurrUS[KB] Currently used memory at the instanceMaxUse[KB]
High-water mark since the SAP instance is startedIn Mem[KB]
Configured total memoryOnDisk[KB] Configured disc space(Virtual
memory),only eligible for Page memory and roll memory.SAPCurCache
SAP Cursor CacheHitRatio Applicable for ID and statement
Caches.
2.2 SAP Memory Quotas screen
Column Explanationtexts Sap tasks type like dialog, background
etc
Step Sequence allocation next step only if memory from previous
step can not meet memory requirement for
thetask/workprocessMemorytype 3 possible memory types under current
SAP design: Roll, Extended and Heap
Amount Configured the memory size for the tasks.
The SAP screen quotas screen (see figure 2) answers the question
of what is maximum memory a SAP process can use:
Dialog tasks can use memory up to an amount
-
3.1 SAP Buffer analysis
SAP Buffer analysis is to focus on following items
Hit rate: should not be lower than 98% except program buffer,
single record buffer and export/import bufferwhere low hit rate is
normally considered acceptable.
Swaps: The goal is to avoid swap in all Buffer except program
buffer. Low swaps in single record buffer andexport/import buffer
is not significant.
Enough Free memory and free directory entry: this would help
avoid swap. If there is free space but there isno free directory,
this would cause swap. Vice Versa.
If you saw big swaps, less free directory and/or less free
memory space, it would reduce swap to increase configured
memoryspace and/or max directory entry when free main memory is
available.
SWAP and buffer invalidation is different concept. Buffer
invalidation is due to changes on buffered object which would
involvetransfer from database table. SWAP is due to shortage of
free buffer space/directory. Buffer invalidation is not reflected
inswap column but it would increase database access. SWAP itself
would not increase database access. But next read on aswap buffered
object would trigger systems action to reload the swapped object
from database, this would increasedatabase access.
If database access is high for table space buffer area, you
might need to review table buffering for the instance, this could
bedue to a frequent changed buffered table whose buffering should
be turned off. You can use SAP transaction ST10 to reviewtable
buffering or you can navigate to table buffering from the main
screen.
3.2 SAP Memory analysis
3.2.1 SAP memory analysis at instance level
SAP Extended memory, Heap memory, Roll memory and Page memory
are SAP memory space shared by all SAP workprocesses. SAP memory
analysis is to focus on following items
Free memory: We should have enough free memory in Extended and
Heap memory. Current used memoryshould not exceed 80% to ensure
that free memory is still available for new memory demand.
Maximum memory: Maximum used memory since start of instance
should be lower than 80% of whatconfigured memory for Extended
memory and Heap memory. Otherwise, there might be memory
contentioncausing job/program cancellation. For SAP page memory and
Roll memory, the maximum used memoryshould not exceed the amount
configured in Memory column.
It is important to online transaction performance to have enough
extended memory. If this is no free extended memory, SAPwork
process would get memory from heap area based on SAP allocation
sequence for dialog tasks. Once a Dialog is usingheap memory, the
SAP dialog process would be in a Private mode cannot be shared with
other tasks. If many dialogprocesses are put into private mode,
this would impact dialog response time and RFC task due to shortage
of shared dialogwork processes.
If current usage is high for extended memory/heap memory space,
you can go to mode list screen (Figure 3 screen) to findwhich
program and users are consuming those memory. Base on those
information, you can decide whether we need to tunememory usage for
the programs and jobs, reschedule the jobs/programs or we need to
have more extended memory.
3.2.2 SAP memory analysis at individual job/user level
Figure 2 screen also shows type and amount of memory which can
be used by a single SAP work process and which oneshould be used
first (Allocation sequence). The actual memory allocation for a SAP
work process would depend on memorydemand of the program and
availability of memory of each type. A SAP work process would be
terminated by SAP system ifthere is no memory at last step of
allocation. Based on figure 2, Dialog task can have up to 7M memory
in the extendedmemory space, if an online SAP process needs less
than 7M bytes memory and there is at least 7M bytes free memory
fromExtended Memory, it would not use Roll and heap memory. If the
online process needs more memory than what isavailable in heap
memory after it consumes available memory from extended and roll
memory space, the program/processwould be terminated by system due
to memory resource contention issue. In similar way, a SAP
background job/processwould be terminated by SAP system if the job
needs more memory than what is available at extended memory space
due tothe fact that the job needs more than what allowed by the
quota or running out of extended memory.
DocumentsPDFCompleteClick Here & Upgrade
Expanded FeaturesUnlimited Pages
-
4. Further clarification
SAP ST02 memory monitor is one of SAP resource monitoring tools
together with SAP operating system monitor (ST06) ,SAP database
monitor (DB02 or ST04) and SAP work process monitor (SM50/SM66). In
my view, if there are free CPUpower, free memory and enough free
sap work processes, then a well-tuned SAP system should be healthy
from SAP systemperformance point view. Based on SAP buffer and
memory monitoring, the outcome of review can be one or several
actions:increase SAP memory allocation at instance level, adjust
memory quotas for individual process, tune application
job/programand/or rescheduling job/program. How many memory can be
configured is limited by physical memory and configured swapspace
for the server.
DocumentsPDFCompleteClick Here & Upgrade
Expanded FeaturesUnlimited Pages