informatica

Download informatica

If you can't read please download the document

Upload: papusaha

Post on 27-Dec-2015

28 views

Category:

Documents


0 download

DESCRIPTION

informatica

TRANSCRIPT

Program Buffer HandlingCreated on: January 19, 1997Revised on: January 19, 1997From R/3 Release: 30C,40A to: 31Z,40BOS Platform: IndependentDB System: IndependentTable of Contents Summary Overviewo Program Buffer During Startup and Shutdowno Program Buffer Structureo Files pxanew and pxastato Monitoringo Parameters Recommendationso Limitations Related Information Copyright SummaryThis article describes the behavior of program buffers when an R/3 instance is started and stopped, and what causes objects to be displaced from the buffer. OverviewWhen you start an R/3 instance, you can influence the performance of the program buffers by using appropriate parameter settings. You can also optimize the time needed by the R/3 System to attain stable operation after start up. The following description is for the program buffer.[ Back to Top ]Program Buffer During Startup and ShutdownStarting the R/3 instance 1. The R/3 instance reads file pxanew and then pxastat from the instance work directory \usr\sap\\\work.2. The second dialog work process (DIA 1) fills the program buffer (PXA) up to a maximum fill level of 60%. See also: parameter abap/pxa_preload in this article. If the fill level is reached, no more data is loaded into the buffer. You can view a message in the trace file of the work process (dev_w1) (as of Release 3.0F).3. File pxanew is renamed pxastat.Normal R/3 operation 1. The system is now up. When further programs are called, these programs are loaded into the program buffer. Each program is assigned a counter, which increases by one for each access.2. Now, further programs are loaded in the buffer, as needed. Programs can now be displaced from the buffer. See also: Physical View in this article.3. Using Transaction ST02, you can display the current program buffer contents. See also Monitoring in this article.Stopping the R/3 instance 1. During shutdown of the R/3 instance, the program buffer contents are written to file pxanew. However, not all buffer entries are selected. See also: Files pxanew and pxastat: Selection criteria in this article[ Back to Top ]Program Buffer StructureLogical ViewFor each program that is loaded, a directory entry is also written, which points to the start address (sector and offset) of the program in the buffer. Physical ViewOne directory entry is reserved for every 8 KB of data in the buffer. Default setting: for each 8KB of data in the buffer one directory entry is reserved. Otherwise the following formula is used:X = abap/buffersize DIV abap/programs (where X=8KB is set, if the formula returns the value X>8KB)The data area of the program buffer is subdivided into 4KB blocks. Therefore, a program always fills N*4KB of freespace in the data area. Sectors in the Program BufferPrograms are allocated according to the size of specific sectors (PX1, PX2, PX3). Prior to Release 3.1H, the length of a program determined its total size. As of Release 3.1H, the size is reduced to the length that is relevant to the runtime object. In the following table, size is used instead of length.Directory Section Number of Entries in the Directory Offset in the Data Area of the Program Buffer(Unit: 4 Byte Word)1st Sector type (PX1)(3 bit for session) Max. 2048 references to programs (11 bit) Contains programs with sizes < 1MB (18 bit)2nd Sector type (PX2)(3 bit for session) Max. 32768 references to programs (15 bit) Contains programs with sizes < 64KB (14 bit)3rd Sector type (PX3) (3 bit for session) (new in Release 3.1H) Max. 8192 references to programs (13 bit) Contains programs with sizes < 256 KB (16 bit)Fragmentation and DisplacementPrograms are displaced according to the LRU algorithm (Last Recently Used).If a program is loaded in the buffer, an LRU list is updated. When a program is accessed, a program is placed at the top of the list. The longer a program is not called, the further it is pushed down the LRU list.If the program buffer is too small, the programs at the end of the list are displaced from the buffer to create space for a new program or a program that is to be reloaded.Since a program at the end of the LRU list may be located in the middle of a buffer, gaps occur during displacement. These gaps can be filled only with programs smaller than or the same size as the gap. The more displacement that occurs, the greater the fragmentation in the program buffer, caused by new gaps.If the program buffer is divided into sections, the buffer may behave differently. In this example, a displacement occurs even though there is enough free space in the buffer program:1. The first 2048 directory entries are all filled, but subsequent directory entries are empty.2. The buffer data area also contains enough free space. 3. Program d, which is greater than 256KB, is called and must now be loaded in the buffer. Due to its size, this program can only be loaded in section PX1. 4. The program is larger than the largest gap in section PX1. 5. Now a large enough gap must be found. The system examines the oldest programs according to the LRU statistics and a maximum of 5 of their (unlocked) successors. 6. In this example, the search was successful and found Program c, a and y. Program d displaces c, a and y from the buffer. The buffer now contains a new gap (Reset) and two directory entries (no. 3 and 4) that can no longer be used. [ Back to Top ]Files pxanew and pxastatThese files contain a list of program names that were present in the program buffer the last time the R/3 instance was shut down. This list consists of two columns:1. Column: x2. Column: Name of an ABAP report that was contained in the program buffer.Selection CriteriaThe R/3 instance contains a used count counter for each program. When a program is called, the counter increases by one. A low used count indicates that a program has not been called very often, or has not been called for a long time. Programs with a high used count were called very often and were probably also called very recently.When the R/3 instance is shut down, files pxanew and pxastat are created. However, not all of the programs in the buffer are written to the files. The following selection and sorting criteria are used:Release 3.0C to 3.1G: Programs with names that do not begin with a % sign Programs with a used count greater than 1 The remaining programs are written to file pxanew, and are sorted in descending order by used count. A maximum of 1024 programs can be written to file pxanew. When the maximum is reached, the file is closed, and the rest is truncated.As of Release 3.1H: Programs with names that do not begin a % sign Programs with a used count greater than 1 The remaining programs are written to file pxanew, and are sorted in descending order by size class (