Вы находитесь на странице: 1из 7

Click Here & Upgrade

Expanded Features
Unlimited Pages

PDF
How to run SAP transaction ST02 and do performance analysis in SAP
Complete
memory/buffer area

Documents

SAP transaction ST02 can be used to view SAP Buffer and memory configuration for a SAP instance and review SAP
memory quotas for individual user job or process as well as current SAP buffer status, SAP memory utilization at SAP
instance 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 show
buffer/memory configuration and usage for the instance where the SAP ST02 is started. After you execute SAP transaction
ST02, SAP buffer and memory overview/status screen would show up:

Figure 1
ST02 memory overview/summary

Click Here & Upgrade

Expanded Features
Unlimited Pages

PDF
You
can refresh the screen to show new status, Except Curr. Use and MaxUse, all other non-configuration data are
Complete
accumulated data since last startup of the SAP instance in question.

Documents

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 one
you 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 memory
allocation 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

Click Here & Upgrade

Expanded Features
Unlimited Pages

PDFHow to navigate to mode list screen showing memory usage at user/transaction level
1.2.3
Complete

Documents

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 hot
keys 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 the
selected buffer type.
History information can reveal abnormal memory usage as well as high-water mark namely Maximum Usage since the date
when instance is started or restarted. SWAP difference between two dates can show the growth pattern base on that, you
can see whether action is needed to correct the situation.

Click Here & Upgrade

Expanded Features
Unlimited Pages

PDFHow to navigate to parameter screen


1.2.5
Complete

Documents

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 this
means 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 data
presented 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 in
following sections.

2.1.1 Buffer section explanation


Column field explanation
Screen Field
Buffer
Hitratio %
Alloc. KB
Freesp. KB
Dir. Size
FreeDirEnt
% Free Dir
Swap
DB Access

Explanation
Type of buffer like nametab, Program etc.
Namely buffer quality =( total access physical access)/ total access x 100%.
Configured or allocated memory space for the buffer type in question.
Free space = allocated memory space occupied memory space.
Maximum number of buffer object that can be kept in the related buffer.
Free Directory Entry = Directory Size used Dir Entry.
= free Directory / Dir. Size X 100%.
Number of buffered objects which has been swapped to page area.
Number of data transfers from the data base to the related buffer.

Click Here & Upgrade

Expanded Features
Unlimited Pages

PDFSAP Memory section explanation


2.1.2
Complete

Documents

This section shows configured memory/virtual memory for a list of sap memory type and their memory usage.
Column
Sap Memory
Curr. Use %
CurrUS[KB]
MaxUse[KB]
In Mem[KB]
OnDisk[KB]
SAPCurCache
HitRatio

Explanation
Show type of SAP memory
= allocated memory/total-memory X 100% for the type of memory in question
Currently used memory at the instance
High-water mark since the SAP instance is started
Configured total memory
Configured disc space(Virtual memory),only eligible for Page memory and roll memory.
SAP Cursor Cache
Applicable for ID and statement Caches.

2.2 SAP Memory Quotas screen


Column
texts

Explanation
Sap tasks type like dialog, background etc
Sequence allocation next step only if memory from previous step can not meet memory requirement for the
task/workprocess

Step
Memory
type
Amount

3 possible memory types under current SAP design: Roll, Extended and Heap
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 <=Roll + Extended + Roll + Heap. Transaction executed online by
SAP user is a dialog tasks.
Non-dialog tasks can use memory up to an amount <=Roll + Heap + Extended. SM37 background job is a non-dialog
task.

Dialog tasks are executed in SAP Dialog work process. RFC calls and online transactions are executed in dialog work
processes. Job, update and spool are non-dialog tasks. Jobs are executed BGD SAP work processes. Update tasks are
executed in SAP UPD work processes. SAP transaction SM50/SM66 is a work process monitor. Click how to run SAP
SM50/SM66 transaction to know more about SAP work process and monitor.

2.3 SAP mode list screen


Figure 3 screen shows SAP Memory usage for every external session by every logon user who is in the instance.
Column
user
EM used
Heap
Other columns like I-mode G1 etc

Explanation
Sap user same user might have more than one entries
Extended Memory used by a user session in KB
Heap memory used by a user session in KB
I have not found the need to use those columns for SAP memory analysis.

Mode list has two sections the upper section show current status, the lower section shows history information.
3. SAP ST02 transaction and memory analysis
Here I would focus on SAP Buffer and SAP memory.

Click Here & Upgrade

Expanded Features
Unlimited Pages

PDF
3.1
SAP Buffer analysis
Complete

Documents
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 buffer
where 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 and
export/import buffer is not significant.
Enough Free memory and free directory entry: this would help avoid swap. If there is free space but there is
no 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 memory
space 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 involve
transfer from database table. SWAP is due to shortage of free buffer space/directory. Buffer invalidation is not reflected in
swap column but it would increase database access. SWAP itself would not increase database access. But next read on a
swap buffered object would trigger systems action to reload the swapped object from database, this would increase
database access.
If database access is high for table space buffer area, you might need to review table buffering for the instance, this could be
due to a frequent changed buffered table whose buffering should be turned off. You can use SAP transaction ST10 to review
table 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 work
processes. SAP memory analysis is to focus on following items

Free memory: We should have enough free memory in Extended and Heap memory. Current used memory
should 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 what
configured memory for Extended memory and Heap memory. Otherwise, there might be memory contention
causing job/program cancellation. For SAP page memory and Roll memory, the maximum used memory
should 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, SAP
work process would get memory from heap area based on SAP allocation sequence for dialog tasks. Once a Dialog is using
heap memory, the SAP dialog process would be in a Private mode cannot be shared with other tasks. If many dialog
processes are put into private mode, this would impact dialog response time and RFC task due to shortage of shared dialog
work processes.
If current usage is high for extended memory/heap memory space, you can go to mode list screen (Figure 3 screen) to find
which program and users are consuming those memory. Base on those information, you can decide whether we need to tune
memory 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 one
should be used first (Allocation sequence). The actual memory allocation for a SAP work process would depend on memory
demand of the program and availability of memory of each type. A SAP work process would be terminated by SAP system if
there is no memory at last step of allocation. Based on figure 2, Dialog task can have up to 7M memory in the extended
memory space, if an online SAP process needs less than 7M bytes memory and there is at least 7M bytes free memory from
Extended Memory, it would not use Roll and heap memory. If the online process needs more memory than what is
available in heap memory after it consumes available memory from extended and roll memory space, the program/process
would be terminated by system due to memory resource contention issue. In similar way, a SAP background job/process
would be terminated by SAP system if the job needs more memory than what is available at extended memory space due to
the fact that the job needs more than what allowed by the quota or running out of extended memory.

Click Here & Upgrade

Expanded Features
Unlimited Pages

PDF
4.
Further clarification
Complete

Documents
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 CPU
power, free memory and enough free sap work processes, then a well-tuned SAP system should be healthy from SAP system
performance 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/program
and/or rescheduling job/program. How many memory can be configured is limited by physical memory and configured swap
space for the server.

Вам также может понравиться