sap performance tuning simple steps

12
7/31/2019 SAP Performance Tuning Simple Steps http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 1/12 1/12  TOP 10 TIPS FOR PERFORMANCE TUNING OF SAP SYSTEM For performance tuning of SAP system the following standard tools included in the NetWeaver platform are those I have chosen as my list, and they are: Let’s start with a short description and brief functionality overview one by one: In the picture above you can see the main screen of the workload monitor. In general, the Workload Overview (right panel) is mostly used as a starting point when carrying out the root cause analysis process of a bottleneck in the system. In this part of the tool, the different Task Types are explained in detail, such as the Number of Steps, Avg. Response Time, Avg. CPU Time, Avg. Database Time, Avg. Wait Time and more. The goal here is to try spot a particular task, the overall and if the current value for a particular period of time exceeds the allowed threshold (as a rule of thumb, for task type the Avg. Response Time should stand below 1000ms). Deeper investigation is needed in order to understand where the performance spike is located. Is it located in the database? Is it in the CPU? Is the Network affecting your response times? Sometimes you may also be asking other questions such as: - Is the program performing poorly? - Do we need to add more memory? - Do we need to add more work processes? If so, how many? - Do we need to change a parameter? If so, which one? These are only a few questions that we need to address and the Workload Monitor will help us drive them out! 98112545.doc

Upload: ofrq

Post on 05-Apr-2018

255 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 1/12

1/12

  TOP 10 TIPS FOR PERFORMANCE TUNING OF SAP SYSTEM

For performance tuning of SAP system the following standard tools included in the NetWeaver platform are those I havechosen as my list, and they are:

Let’s start with a short description and brief functionality overview one by one:

In the picture above you can see the main screen of the workload monitor. In general, the Workload Overview (rightpanel) is mostly used as a starting point when carrying out the root cause analysis process of a bottleneck in thesystem. In this part of the tool, the different Task Types are explained in detail, such as the Number of Steps, Avg.Response Time, Avg. CPU Time, Avg. Database Time, Avg. Wait Time and more. The goal here is to try spot a particulartask, the overall and if the current value for a particular period of time exceeds the allowed threshold(as a rule of thumb, for task type the Avg. Response Time should stand below 1000ms). Deeper investigation isneeded in order to understand where the performance spike is located. Is it located in the database? Is it in the CPU? Isthe Network affecting your response times?

Sometimes you may also be asking other questions such as:

- Is the program performing poorly?- Do we need to add more memory?

- Do we need to add more work processes? If so, how many?- Do we need to change a parameter? If so, which one?

These are only a few questions that we need to address and the Workload Monitor will help us drive them out!

98112545.doc

Page 2: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 2/12

2/12

 A buffer is a memory segment in which the data is temporarily stored. The buffer allows the information to bemanipulated by processes more quickly and the main goal is to avoid that data be read from a slow medium like a disk drive. Instead, the information already located in the buffer is accessed much faster.In NetWeaver, there are several different buffers. Each one of them allows a specific type of data to be stored and theobjective is to reduce the number of database accesses to a minimum. These buffers are individually placed locally inevery Application Server and are implemented as shared memory segments in one or more shared memory poolsdepending on the operating system. These buffers are:

This buffer stores the compiled executable version of the ABAP programs, also known as programloads.

This buffer stores menu data, buttons and related SAPGui functionality.

This buffer stores the screens that are already generated.

This buffer stores the factory and user defined holiday calendars.

This buffer stores table entries and can also store the entire table, which is then calledfull table buffering.

This buffer stores only a single entry for a particular table with its corresponding fields.

This buffer is used to store data that needs to be available to several processes usingthe ABAP sentence EXPORT/IMPORT TO/FROM MEMORY in the ABAP program code.

Others are the buffers which contain fields and table definitions that are active in the Data Dictionary. Thename table is implemented in two different database tables; DDNTT for table definition entries and DDNTF for filedescription entries. The associated buffers are:

Memory segment for table DDNTT.Memory segment for table DDNTF.This is a summary for Table and Field description buffers.

Depending on the field type it stores the layout.

98112545.doc

Page 3: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 3/12

3/12

With the help of this monitoring tool, you will be able to tune all memory buffer parameters individually. Every singlebuffer is divided into two parts, the and

This is actually the size of the memory segment. By using the correct profile parameter, you will have theoption to change this value for every buffer. This is also divided into allocated space and free space.

The number of buffer entries controls how many objects can be stored in the buffer. You can have

sufficient free space but if you run out of directory entries, new objects will not be placed in the buffer and the freespace will not be used.

The quality of a buffer and how often it is accessed is measured by the . This value will indicate if theinformation stored in the buffers, such as table entries, programs and screens, is being hit directly from the buffer itself or, on the other hand, if the system needs to bring that data from the database since it was not found in the buffer.

The can have several values. For instance, when you start the system the %Hit Ratio will be below therecommended value until you have some activity in the system and the buffer starts to fill up with data. A good

performing buffer will have a (99%-100% is excellent). Keep in mind though that avalue lower to 95% not always shows that you have a problem. This can lead you to pinpoint and start performing ananalysis. However, other factors can also affect buffer quality decreasing %Hit Ratio values.

 Another important piece is . This is a completely different story. When high swapping in a bufferoccurs, performance is degraded. Since the information needed by a work process is read from the database and then

put into the buffer, the old information that was previously in the buffer needs to be removed (swapped out) allowingthe new information to come into it.There are two different factors that will play here, and (well-known as Directory Entries).If one of them runs out of space, swapping occurs. We also need to keep in mind that some sort of swapping issometimes normal and doesn’t hurt the system. As a rule of thumb, you don’t need to worry below 1000 swaps in aparticular buffer. But also always check the and . Good values

98112545.doc

Page 4: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 4/12

4/12

1 3. Statistical Records – STAD

The statistical records collect information individually for each transaction step such as response times, database times,network times, wait times, front-end times and more, and store that data in a flat file at the operating system levelknow as the statistical file.This tool will help understand in detail where the performance spike is located by analyzing the transaction activity stepby step. Information like how many database records were selected, updated or inserted and in which database tables(if activated), what program name was executed, what screen name and screen number was called and so forth.

With the Statistical Records you will be able to understand when the problem is being observed for an averaged, highresponse time transaction. You will then know how to address that specific performance issue.

98112545.doc

Page 5: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 5/12

5/12

2 4. SQL Trace Analysis - ST05

My next tool in the top 10 list is the greatest This is like magical medicine. Did you ever seethousands of programs indefinitely doing sequential reads in database tables over and over? I’m almost sure the answeris yes! Well, with ST05, those long-running queries hitting the database and selecting millions and millions of uselessrecords are nowadays…an old story.

 You can trace all the activity for a user and for every program. The output will show the SQL statement, how manyrecords it selects and is bringing from the database, the DECLARE, PREPARE, OPEN, REOPEN, CLOSE and FETCHoperations that will be recorded during the trace so that later on when performing the analysis it will be of great help,the execution plans, index advising, sorting of similar statements or duplicated ones, sorting per tables and much more.

 

98112545.doc

Page 6: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 6/12

6/12

3 5. Workprocess Overview - SM50

 And now, let’s discuss the I think this is the one top tool every administrator, developerand consultant needs to be familiar with and surely you are already familiar with. If this is not the case, let me introduceit a little bit. is the main process monitor. From this screen you will be able to see almost everything that iscurrently running in your NetWeaver system. You can also see detailed information on a particular running process, thedeveloper trace and dispatcher trace and you can change trace level and component to perform a trace on. When you

are working in a performance issue or even if you are analyzing something, SM50 will help. I will show you practicalexamples on the next trip. As a preview, from this screen you can see if the process is doing a Sequential or Direct readover a database table, what user is currently running what report, for how long it is running, etc. In the details screen,you can see information such as how many records were written, read, inserted or deleted, and the current SQL

statement or procedure.

98112545.doc

Page 7: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 7/12

7/12

4 6. Operating System Monitor - ST06

 Another piece in the list is the This application is responsible for providing all the operating system valuesrelated with CPU utilization, Disk drive information, Network, OS Swapping and others by means of the OSCollector(saposcol) service.With this tool, you can observe if for a particular drive the response time is excessively high or, on the other hand, if disk drives are performing well. I used to work with this tool in order to understand if a performance issue needed to betackled from a hardware bottleneck perspective.

There is a rule of thumb. Paging will not be critical if, for instance, less than a 20%-30% of the main memory is being paged out. You can see the history for memory utilization and draw your ownconclusions.

If you are analyzing the database server, keep in mind that every request from other application servers will be handledby the database server hardware. In this case, if the system is performing poorly, this will cause poor response time inthe whole system. For this reason it is a good practice to have CCMS alerts configured to monitor CPU utilization, Disk 

response times, and Memory paging. With the help of these three monitoring objects, you can have a real-time pictureof what is going on at the hardware level in the system.

The Disk monitor is also an important part of the OS Monitor. From the Disk monitor you can check every Disk or LogicalDrive response times. This is particularly important in the database server since every database operation will impact onthose response times. As a rule, if you have more than 50%-60% Disk drive utilization, start with a more in-depthanalysis since overall system performance will be affected because of these slow drives.

98112545.doc

Page 8: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 8/12

8/12

5 7. Table Call Statistics - ST10

With this transaction, you will be able to see detailed information regarding the table and thetable buffer status.In NetWeaver, there are several different buffers. In this application will work directly with the As youshould already know, when a table is buffered its contents are located in a memory segment in the shared memory poollocally under the application server and that table information is read much faster from the buffer. The overall goal is to

reduce database accesses and disk times as much as possible. Read operation over a buffered table is around 80 timesfaster than accessing the table directly from the database.

Do you remember we had already been talking about buffers before in this blog? Well, the tables that have bufferingenabled are store in the buffer and in the buffer. In the standarddelivery of every NetWeaver component there are several tables that are already buffering enabled, but for a particulartable, You can also define the buffer settings and whether or not you want to allow buffering.

There is also a rule of thumb. You should enable buffering for a particular table if that table has more read operations

than write operations. Otherwise, the table buffer will be invalidated because the write operation and thewill be below the recommended value since the system needs to flush the buffer contents to the disk after the

insert, delete or update operation and then it will need to populate the buffer again. From a performance perspectivethis is not quite feasible.

98112545.doc

Page 9: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 9/12

9/12

6 8. Database Activity - ST04

The shows specific information related to the current performance in the database interface. Almost everything going on in the database will be presented here. Data buffer allocation, Hit Ratio, DB Connections,CPU Times, Index utilization, Database files status and utilization and more.This tool is another key piece in the performance world. When analyzing database accesses, a good approach is to takea closer look at this transaction. Detailed table analysis can be performed through this. For a particular table, you can

see the fragmentation level and if that table needs reorganization.

98112545.doc

Page 10: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 10/12

10/12

From the screen we will be able to change the system parameters. In our current case, we will

change the related performance and I will show you how to do so with specific recommendations.

The following is a list of the most common parameters we will work with during our journey:

abap/buffersize

 rsdb/cua/buffersize

 zcsa/presentation_buffer_areasap/bufdir_entries

zcsa/table_buffer_areazcsa/db_max_buftab

rtbb/buffer_lengthrtbb/max_tables

rsdb/obj/buffersizersdb/obj/max_objectsrsdb/obj/large_object_size

rsdb/otr/buffersize_kbrsdb/otr/max_objects

 rsdb/esm/buffersize_kbrsdb/esm/max_objectsrsdb/esm/large_object_size

 rsdb/ntab/entrycount

 rsdb/ntab/ftabsizersdb/ntab/entrycount

 rsdb/ntab/irbdsizersdb/ntab/entrycount

98112545.doc

Page 11: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 11/12

11/12

 rsdb/ntab/sntabsizersdb/ntab/entrycount

 zcsa/calendar_areazcsa/calendar_ids

 ztta/roll_areaztta/roll_firstrdisp/ROLL_SHMrdisp/PG_SHMrdisp/PG_LOCALem/initial_size_MBem/blocksize_KB

em/address_space_MBztta/roll_extensionabap/heap_area_diaabap/heap_area_nondiaabap/heap_area_totalabap/heaplimit

rdisp/wp_no_diardisp/wp_no_btcrdisp/wp_no_vbrdisp/wp_no_vb2

The will enable us to understand what is going on almost in real-time in a system for a monitored

object. There are, as you can see in the picture above, several factory defined monitors that you can use. The monitorset is a good one since when you activate it (double click on it) it willshow you the entire monitoring context within the local application server. You also have the possibility to assign Auto-Reactions methods and own analysis methods to every monitored object.Go to RZ20 and play with it!

98112545.doc

Page 12: SAP Performance Tuning Simple Steps

7/31/2019 SAP Performance Tuning Simple Steps

http://slidepdf.com/reader/full/sap-performance-tuning-simple-steps 12/12

12/12

 As a brief description, to configure the CCMS agents and Email alerts to be sent from a Central System (CEN) it’snecessary to complete the following tasks:Configure SMTP in the Central system (CEN) by enabling the built-in SMTP plug-in (as of BASIS release 6.x). Pleaserefer to OSS Note 455140 for installation instructions and additional information. You will need to install the CCMSagents in each monitored system to enable the alerts and emails. This is necessary because CEN alerts are handled bythe remote CCMS agents locally in every satellite system. You should then configure the alerts in the CEN system byenabling the emails selecting the correct monitoring object and configuring email destinations properly.