cancel
Showing results for 
Search instead for 
Did you mean: 

Swaps

Former Member
0 Kudos

Hi All,

May I know what is

1)Swaps

2)How does it happen in our SAP system ?

3)How to prevent it. (there is alot of swaps in my system t-code st02)

Regards

Lauran

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

When the buffer cannot hold an incoming request (data) then least frequently used objects that are existing in the buffer are swapped in to the hard disk and thereby making room for the new requested object to enter the memory - buffer.

As you might be aware of the fact that accessing data from the buffer is faster than accessing it from the database every time and this also reduces the load on the database.

It is often not possible to set the size of a buffer so that it never becomes full. Above a certain size, which is greatly dependent on the hardware and the operating system, the performance advantage of the buffer is canceled out by increased operating system paging. A buffer that occupies too much main memory forces the operating system to perform expensive paging.

The goal of buffer management is to assign the buffers enough memory so that they achieve a high hit rate with low swap rates, without causing much operating system paging. After each change of the buffer size, you should monitor paging and memory usage to ensure that the new buffer size does not cause any other performance problems.

As a rule of thumb, we recommend that you assign space to the SAP buffers rather than the database buffers, if main memory becomes limited. In SAP systems, every application server has its own buffer. These buffers should not be confused with the buffers of the SAP database system.

More over when the swaps occur more than the recommended rate then it might be due to various reasons. it might be due to lesser buffer space, that is related to the memory allocation or your programming efficiency etc.,

For more information please refer help.sap.com.

There is a separate concept of tuning and buffer statistics evaluation which needs to be understood for this.

Plz award points if useful.

Regards,

Sree

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Swapping occurs when the buffer is full, and the SAP System has to load additional objects into the buffer. Objects in the buffer that were used the least recently are removed. In this context, the term "swap" means the objects removed from the buffer are lost and cannot be replaced until a new database access is performed (replacing what was lost).

There are two possible reasons for swapping

  • There is no space left in the buffer data area

The buffer is too small. You should increase the buffer size.

  • There are no directory entries left

Although there is enough space left in the buffer, no further objects can be loaded because the number of directory entries is limited.

For the Repository buffers (nametab buffers), the number of directory entries is determined by the number of entry counts, all other buffers have there own parameter for entries.

Caution

The parameter abap/programs is no longer used. You do not have to change it if you want to increase the program buffer. For all other buffers you have to change the number of directory entries accordingly to the change in buffer size.

You can find much more in blow link.

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/c4/3a74b2505211d189550000e829fbbd/frameset.htm">http://help.sap.com/saphelp_47x200/helpdata/en/c4/3a74b2505211d189550000e829fbbd/frameset.htm</a>

Message was edited by:

Regards,

SurajKumar

Former Member
0 Kudos

Hi

Swaps



Swapping occurs when the buffer is full, and the SAP System has to load additional objects into the buffer. Objects in the buffer that were used the least recently are removed. In this context, the term "swap" means the objects removed from the buffer are lost and cannot be replaced until a new database access is performed (replacing what was lost).

There are two possible reasons for swapping



- There is no space left in the buffer data area
- The buffer is too small. You should increase the buffer size .
- There are no directory entries left

Although there is enough space left in the buffer, no further objects can be loaded because the number of directory entries is limited.

Procedure if Buffer Is Full or Swap Rate Is too High

SAP buffers use intelligent procedures to replace old buffered data with new requested data. Allocating too much space to a buffer can also lead to other problems (operating system paging) without significantly increasing the hit rate (buffer quality).

The goal of the buffer setting is therefore to have a sufficiently large buffer to maintain a high rate, and to do so with a low swap rate and a minimal effect on operating system paging.

Here are a few guidelines about when certain SAP buffers must be increased in size:

· Increase the size of the buffer if the swap rate (the replacing of buffer objects) is very high, or if the hit rate is below the target threshold value.

· Increase the size of the buffer if alerts are frequently triggered in the associated node. Frequent alerts indicate that the buffer exchange mechanism cannot create enough free space for effective buffer operation.

· As far as possible, you should always increase the amount of space available for the GenericKey buffer if it becomes full.

· Increase the size of the program buffer if the hit rate becomes too low, or the swaps become too frequent. Development systems require a larger program buffer than normal systems. It is, however, almost impossible to avoid swapping in a development system.

· If undesired side effects occur after increasing the size of the SAP buffer, monitor the operating system paging for significant increase and the SAP Memory Management subtree (in the Entire Systemmonitor) for new alerts.

Regards

Sumit

Former Member
0 Kudos

Hello Lauran,

Buffer is initial memory needed to store temporary data when its not sufficient then system will look for additional memory. The system uses additional physical memory which is called SWAP in other terms paging.

Kindly go through this link it provides complete information on SAP memory management.

http://help.sap.com/saphelp_nw70/helpdata/en/02/96267f538111d1891b0000e8322f96/frameset.htm

For sure this link will help you to unuderstand complete memory management of SAP.

Thanks & Regards

Vivek

Vivek