Showing posts with label SAP Buffers. Show all posts
Showing posts with label SAP Buffers. Show all posts

Roll and Paging Buffers, Extended Memory

Definition

The roll and paging buffers are the preferred working area of the roll and paging areas for an instance (application server). The remaining area is located on disk as roll and paging files. The user context is stored in the extended memory and the roll area (when the job is "rolled out" of a work process). The paging area stores special data for the ABAP processor, while the extended memory stores a large portion of the internal tables of a program.

You set the roll and paging buffers, as well as the extended memory using the parameters in the instance profile.

Repository Buffers (Nametab Buffers)

Definition

The name table (nametab) contains the table and field definitions that are activated in the SAP System. An entry is made in the Repository buffer when a mass activator or a user (using the ABAP Dictionary, Transaction SE11) requests to activate a table. The corresponding name table is then generated from the information that is managed in the Repository.


The Repository buffer is mainly known as the nametab buffer (NTAB), but it is also known as the ABAP Dictionary buffer.

The description of a table in the Repository is distributed among several tables (for field definition, data element definition and domain definition). This information is summarized in the name table. The name table is saved in the following database tables:

  • DDNTT (table definitions)
  • DDNTF (field descriptions)

The Repository buffer consists of four buffers in shared memory, one for each of the following:

Table definitions

TTAB buffer

Table DDNTT

Field descriptions

FTAB buffer

Table DDNTF

Initial record layouts

IREC buffer

Contains the record layout initialized depending on the field type

Short Nametab

SNTAB buffer

A short summary of TTAB and FTAB buffers

The Short nametab and Initial record layouts are not saved in the database. Instead, they are derived from the contents of tables DDNTT and DDNTF.

When access to a table is requested, the database access agent embedded in each work process first reads the Short nametab buffer for information about the table. If the information is insufficient (for example, the SELECT statement uses a non-primary key) it accesses the Table definitions buffer and then the Field descriptions buffer. By reading the Repository buffers, the database access agent knows whether the table is buffered or not. Using this information, it accesses the table buffers (partial buffer or generic buffer) or the database.

The IREC buffer is read:

  • When a
  • REFRESH command is executed in an ABAP program
  • At an
  • INSERT command, when a record is created in the buffers before the data is inserted and the fields are initialized with the values found in IREC buffer

Buffer Types

finition

There are seven main groups of buffers found in the shared memory. For more information on each buffer type, see :

Repository Buffers

Table Buffers

Program Buffer

SAPgui Buffers

Roll and Paging Buffers

SAP Calendar Buffer

SAP Cursor Cache

End of Content Area

Displaying Table Buffers

Procedure

  1. From the SAP initial screen, choose Administration
  2. ® System administration ® Monitor ® Performance ® Setup/Buffers ® Buffers ® Goto ® Current local data ® Table buffers ® Single record or Generic key.


You should only buffer tables that you change infrequently. You specify whether or not a table should be buffered in Transaction SE13.

Changes to buffered information must be updated in the buffers of other application servers that are sharing that information. These updates can adversely affect performance. The more servers that need updating, the more expensive the update process.

If all operations are performed on a central server, you can deactivate the buffer update messaging service.

There are two profile parameters that control the behavior of synchronization for the application server:

Parameter name

Recommended value

rdisp/bufrefmode

sendoff, exeoff (central system)

rdisp/bufrefmode

sendon, exeauto (client/server)

rdisp/bufreftime

60

Displaying Parameter Settings for the Current Instance

You define current parameters in the SAP instance profile. Restart the instance to activate any changes. To display the parameter settings:

  1. From the SAP initial screen, choose Administration
  2. ® System administration ® Monitor ® Performance ® Setup/Buffers ® Buffers ® Goto ® Profile parameters ® Current.

SAP Calendar Buffer

Definition

The SAP calendar buffer stores all defined factory and public holiday calendars.

Calendars are stored in the database tables TFACS and THOCS.

The buffer has a directory structure. This means that if the shared memory is configured too small, only the required data is loaded; there is no LRU displacement of the contents of the buffer.

You can change the calendar buffer by editing the parameter in the instance profile.

Repository Buffers (Nametab Buffers)

Definition

The name table (nametab) contains the table and field definitions that are activated in the SAP System. An entry is made in the Repository buffer when a mass activator or a user (using the ABAP Dictionary, Transaction SE11) requests to activate a table. The corresponding name table is then generated from the information that is managed in the Repository.


The Repository buffer is mainly known as the nametab buffer (NTAB), but it is also known as the ABAP Dictionary buffer.

The description of a table in the Repository is distributed among several tables (for field definition, data element definition and domain definition). This information is summarized in the name table. The name table is saved in the following database tables:

  • DDNTT (table definitions)
  • DDNTF (field descriptions)

The Repository buffer consists of four buffers in shared memory, one for each of the following:

Table definitions

TTAB buffer

Table DDNTT

Field descriptions

FTAB buffer

Table DDNTF

Initial record layouts

IREC buffer

Contains the record layout initialized depending on the field type

Short Nametab

SNTAB buffer

A short summary of TTAB and FTAB buffers

The Short nametab and Initial record layouts are not saved in the database. Instead, they are derived from the contents of tables DDNTT and DDNTF.

When access to a table is requested, the database access agent embedded in each work process first reads the Short nametab buffer for information about the table. If the information is insufficient (for example, the SELECT statement uses a non-primary key) it accesses the Table definitions buffer and then the Field descriptions buffer. By reading the Repository buffers, the database access agent knows whether the table is buffered or not. Using this information, it accesses the table buffers (partial buffer or generic buffer) or the database.

The IREC buffer is read:

  • When a
  • REFRESH command is executed in an ABAP program
  • At an
  • INSERT command, when a record is created in the buffers before the data is inserted and the fields are initialized with the values found in IREC buffer

Reasons for Poor Buffer Quality

Definition

Poor buffer quality may be caused by any of the following:

Transports

Every time you transport new developed source into the system that is running the tp , you invalidate all entries in the program buffer and clear all other buffers (command $SYNC ). Unlike the other buffers, the program buffer does not start empty, but is filled with invalid programs. It is very important to execute as few transports as possible and to collect data for collective transports.

Buffer resets

Setting up a buffer requires a large number of database and network accesses, and places a considerable load on the system. Therefore, only reset the buffers if inconsistencies occurred between the buffer and the database. This might happen, for example, if you update a buffered table with native SQL, that is, the database table is updated directly by bypassing the buffer. To reset the table buffers, enter $TAB in the command field. Use the command $SYNC to reset all the SAP buffers on the application server. These commands only affect the buffers of the application server on which the commands are entered. The buffers of the other application servers in the network are not affected.

Using the commands $TAB and $SYNC places an extremely large load on the system. In large systems, it could take up to one hour (depending on the access profile) for the buffer load to return to its original state. System performance is greatly impeded during this time.

Offline backups, SAP System reboots

Both of these actions require the SAP System to be shut down, and then started up again. All buffers of all servers are reset. Again, this takes a considerable amount of time.

Program development

Software development should not be done in a productive system, as development systems require a very large program buffer.

Tuning SAP Buffers

Definiton

It is beneficial to keep as much data buffered as possible. This helps avoid repetitive database accesses, for example from the network and Interprocess Communication (IPC), and maximize system performance.

Reduced performance is caused by

  • Buffers set too small.

The required data cannot be stored in the buffers. Instead, objects have to be swapped out of the buffers. This causes expensive database accesses.

  • Buffers set too large

Memory is wasted. Paging may occur if too much memory is taken from the operating system and allocated to the SAP buffers and database.

You should check regularly whether the buffer size is suited to your system requirements. Since buffers are crucial for the performance of the SAP System, all buffers (except the SAP cursor cache) should be adjusted to their optimal value.

The optimum size for each buffer depends largely on the specific configuration of the server, that is, the applications, the number of users working in each module, and so on. Therefore, it is difficult to specify values suitable for all configurations. The most important criterion for the correct buffer size is the buffer quality.


You should not adjust buffers in cases where poor buffer quality is due to special circumstances, for example, object swaps in the program buffer in a system with a high level of development activity.

Buffer Tuning Checklist

If there is insufficient memory to set the appropriate buffer sizes, you should consider adding physical memory. However, since this could take some time, you may have to decide which buffers are most important and should be adjusted first using the existing memory.

As a guideline, the most important buffers are those that:

  • Are responsible for good dialog performance
  • Are used most frequently
  • Require relatively few memory resources

These criteria give you the following priority list:


  1. Repository buffers (nametab buffers)

  2. Table buffers

  3. Program buffers

  4. Roll and page file buffers

  5. SAPgui buffers