Beruflich Dokumente
Kultur Dokumente
User Contexts: The user context contains a user-specific area containing user and authorization data, and a session context for each external session (technical term: emode). Each external session can
administrate from its side multiple internal sessions (technical term imode). You can configure the maximum number of external sessions with parameter rdisp/max_alt_modes, but we recommend that you do not change the default setting of six sessions.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/49/328da7e8955719e10000000a42189b/content .htm
SAP Work Process: An SAP application server has to process SAP requests from multiple front ends. The application server has the use of a dispatcher, which gathers the requests and transfers them for processing to the work processes. The work processes then execute the desired requests (for example, an ABAP program). Work Process Types are Dialog, Enqueue, Update, Background & Spool. The dispatcher is the central process of the application server. After it has been started, it generates the work process. You can configure the number of different types of work process that run on an application server.
Virtual Memory: All operating systems (supported by SAP) support virtual memory technology. A
process allocates virtual memory using logical (virtual) addresses. Each process has its own virtual address space. (This also applies to SAP work processes; see Virtual Address Space of a Work Process.) Virtual memory is fully independent of the physical main memory. Address Space: On 32 bit platforms a virtual address can have values between 0 and 2^32-1, which restricts the sizes to 4GB. As areas of the virtual address space are reserved, this leaves about 2GB available on most platforms. This is not a problem for large SAP systems. Memory Allocation: Allocating memory for a process consists of the following steps: 1. Reservation of a segment in the physical memory. 2. Linking the physical memory segment to the virtual address space of the process, this means reserving a segment of the same size in the virtual address space and mapping the virtual addresses to physical addresses. Local Process Memory: The operating system differentiates between local process memory and shared memory. For local process memory the operating system keeps the two allocation steps transparent. Using an API virtual memory only is requested; the operating system does the other tasks, such as reserving physical memory, loading and unloading virtual memory into and out of the main memory. Shared Memory: If several processes are to access the same memory area, the two allocation steps are not transparent. One object is created that represents the physical memory and can be used by various processes. The processes can map the object fully or partially into the address space. The way this is done varies from platform to platform. Memory mapped files, unnamed mapped files, and shared memory are used. For more information see Platform-Specific Description of Memory Management.
SAP Paging:
Memory Management (BC-CST-MM): Allocation of memory for the current internal session by transferring pages out of memory, similarly to operating system paging. SAP Paging enables the roll area to be extended at ABAP runtime when a large dataset, internal tables, for example, is handled.
SAP's memory management concept currently limits SAP Paging to cases where the ABAP commands EXTRACT and EXPORT... TO MEMORY... are used.
This unit serves as a guide for setting the SAP Memory Management on Windows. By using this guide, the system administrator for a Windows application server should be better able to evaluate the performance of the system and to tune the system accordingly. Implementing the memory management system on Windows is described in Implementation on Windows. For guidelines on how to configure memory management on Windows, refer to Rules for Memory Management on Windows. For a quick overview of all important parameters, refer to Parameter Overview for Windows.
Overview of Parameters for Windows All relevant memory management parameters are set with an optimal default value so that all manual configurations are unnecessary. The following table gives you an overview of these values. Profile Parameter abap/heap_area_dia abap/heap_area_nondia abap/heap_area_total em/initial_size_MB em/max_size_MB em/address_space_MB rdisp/ROLL_MAXFS rdisp/ROLL_SHM rdisp/PG_MAXFS rdisp/PG_SHM ztta/roll_first ztta/roll_area ztta/roll_extension Default Value 2000000000 2000000000 (0 on 64 bit) 2000000000 ([PM] on 64 bit) [PM] 20000 (100000 on 64 bit) 512 (4096 on 64 bit) [BE] * 100 [BE] * 100 32768 [BE] * 50 1 2000000 (3000000 on 64 bit) 2000000000 Unit Byte Byte Byte Megabyte Megabyte Megabyte 8 KB block 8KB block 8 KB block 8 KB block Byte Byte Byte
Where: [MM] = size of the physical main memory [PM] = value of the profile parameter PHYS_MEMSIZE (default value=[MM]) [BE] = maximum possible number of users (calculated from [PM]) The zero administration memory management on Windows tries to reduce the number of relevant profile parameters so that maintenance and configuration of the application server is simplified, and the available resources are optimally used.
The basis for the Zero Administration Memory Management on Windows is the dynamic extended memory. The technique provides you with a nearly unlimited memory resource. Initially, the extended memory is set to the size of the profile parameter PHYS_MEMSIZE [PM]. If the user requires more memory, extended memory extends itself in steps from "[PM] / 2" up to the set limits in the profile parameter em/max_size_MB, or until the address space in the Windows page file is used up. By setting the default value for em/max_size_MB to 20000 MB, the size of the Windows page file represents the actual limit for extending the extended memory. The profile parameter PHYS_MEMSIZE determines how much of the total main memory is used by the SAP system. The parameter is entered according to the input at installation. The default value for PHYS_MEMSIZE is the size of the main memory [MM]. The memory allocation strategy for a non-dialog work process was changed as of Release 4.0B. Through the previous allocation sequence, the extended memory was protected to the benefit of the heap memory. This is no longer necessary when using the dynamic extended memory, and the allocation sequence of the batch work processes is identical to the sequence of the dialog work processe). Another beneficial side effect is that you can avoid the PRIV mode (see Private Memory) for background work processes and thereby starting the work processes. Sequence of allocating memory for non-dialog work processes: Roll memory until the limit ztta/roll_first Extended memory until the limit min {em/address_space_MB, ztta/roll_extension} Roll memory until the limit ztta/roll_area Heap memory until the limit abap/heap_area_nondia The basis for zero administration memory management is a sufficiently large Windows page file. The previous recommendation still remains: Windows page file = 3 to 4 times the main memory size All relevant memory management parameters are set with an optimal default value so that all manual configurations are unnecessary.
For Processor scheduling: Adjust for best performance of, select Background services. For Memory usage: Adjust for best performance of, select Programs. 9. Confirm your entries with OK. Windows Server 2008 1. Choose Start Control Panel System Advanced system settings . 2. In the System Properties screen, choose the Advanced tab. 3. For Performance, choose Settings.... 4. In the Performance Options window, choose the Advanced tab. 5. For Processor scheduling: Adjust for best performance of, select Background services. 6. Confirm your entries with OK.
ztta/roll_area: Roll Area em/blocksize_KB: Segment Size for the Extended Memory em/stat_log_size_MB: Statistics - User Context Size em/stat_log_timeout: Statistics Period es/disclaim_threshold_MB es/disclaim_coasting_time_alloc es/disclaim_coasting_time_free es/blockdisclaimsize_KB es/freelist_compactor
Features The value of the parameter should be between 10000000 (10 MB) and 2000000000 (2GB), the recommended default setting is 40000000 (40 MB). The objective is to have the least number of work process restarts as possible, without a swap space bottleneck occurring. The heap memory allocated by the work processes has to be released again. As shown in the graphic, the value of abap/heaplimit should be smaller than abap/heap_area_dia or abap/heap_area_nondia, so that the dialog step that is running can still be executed. This prevents the work process from working against the operating systems swap space limit if there is a programmed termination of the work process. Activities To determine how many work processes are restarted, use the Computing Center Management System (CCMS) (transaction RZ20). Note that the column Err in the Work Process Overview (transaction SM50) does not refer to work processes that are restarted.
If the value is exceeded, heap memory is allocated. The work process is assigned only to this user context and is no longer available for other user contexts, since it is switched to the PRIV mode (in the Work Process Monitor, transaction SM50). For more information, see Private Memory If the value is too high, then a large user context may cause a shortage of extended memory. If a large user context fills the SAP extended memory, it can switch other smaller work processes used for user contexts into PRIV mode before their SAP extended memory limit has been used up. Activities The default value is platform-specific and is determined dynamically. This is the default value specified in transaction RZ11. This value should not normally be changed. NOTE If you have problems with the default value, SAP recommends that you test your system with a high value (at least 500 MB). If the PRIV mode is switched on prematurely, you can decrease the size. To minimize the number of dialog work processes in the PRIV mode, keep in mind the following tips: NOTE em/initial_size_MB: should be significantly larger than ztta/roll_extension. rdisp/ROLL_SHM, rdisp/ROLL_MAXFS: If you increase the value of ztta/roll_area, you must adjust these parameters.
If the value of abap/heaplimit has been reached, the work process is restarted after the dialog step has ended. If the consumption of heap memory exceeds the quota abap/heaparea_(non)dia, the user context being executed at this time is cancelled before it can be completed. You can use this quota to prevent one single dialog work process (user context) from filling the entire heap memory of the application server. The work processes of an application server can allocate only so much heap memory as specified in parameterabap/heap_area_total. The limit specified in the parameter refers to the combined heap memory usage of all work processes for an application server. Activities The value is specified in bytes. The default value is platform-specific and is determined dynamically. This is the Defaultwert specified in transaction RZ11. This value should not normally be changed. NOTE Ensure that the value is high enough to fulfill all the regualr memory requirements, but is not so high that the work process runs up against the swap space limit of the operating system. See the graphic in abap/heaplimit: Work Process Restart..
If the value of abap/heaplimit has been reached, the work process is restarted after the dialog step has ended. If the consumption of heap memory exceeds the quota abap/heaparea_(non)dia, the user context being executed at this time is cancelled before it can be completed. You can use this quota to prevent one single non-dialog work process (user context) from filling the entire heap memory of the application server. The work processes of an application server can allocate only so much heap memory as specified in parameterabap/heap_area_total. The limit specified in the parameter refers to the combined heap memory usage of all work processes for an application server. Activities The value is specified in bytes. The default value is platform-specific and is determined dynamically. This is the default value specified in transaction RZ11. This value should not normally be changed. NOTE The value should be high enough for the largest possible background processing context in your SAP system. If the value is too small, SAP Extended Memory is assigned to the background process. This extended memory is not available for dialog work processes. See Allocating Memory for User Contexts.
Activities The value is specified in bytes. The default value is platform-specific and is determined dynamically. This is the default value specified in transaction RZ11. This value should not normally be changed. NOTE This value ensures that even at maximum swap space usage of the SAP system and during normal operation, at least 100 MB swap space (or approximately 10-15%) remains free. See also Swap Space Requirements.
Activities The default value is platform-specific and is determined dynamically. This is the Defaultwert specified in transaction RZ11. This value should not normally be changed. CAUTION For technical reasons, the roll buffer size must be at least 10% of the roll file size (parameter rdisp/ROLL_MAXFS: Maximum roll file size).
Integration You can find more information under: Allocating Memory for User Contexts (UNIX) SAP Roll Area Activities The default value is platform-specific and is determined dynamically. This is the default value specified in transaction RZ11. This value should not normally be changed. On 64 bit platforms, where there is sufficient extended memory, the default value of this parameter is 1, the work process therefore is allocated extended memory straight away.
A part of this area (in the graphic, roll area 1) is allocated a user context at the beginning. Its size is defined in ztta/roll_first. The partial area is for the data that must be contained in the roll area. When a user context is changed, this data is rolled (copied) into and out of a work process. If ztta/roll_area is larger than ztta/roll_first, the additional space makes a second part available (Roll area 2). If the user context cannot be allocated more extended memory, this second part of the roll area is available for the dialog processes (see Allocating Memory for User Contexts). Integration By specifying a higher value for ztta/roll_area than for ztta/roll_first, you avoid allocating local private memory as soon as the set limits of the SAP extended memory are reached. The remaining roll memory therefore serves as the last buffer before a user context has to allocate heap memory. This pushes back the point in time at which a work process is switched to PRIV mode (see Private Memory). Although there are advantages with this procedure, there are also some disadvantages: The copying procedure is much slower for storing data in the roll area for changing work process contexts. The copy procedure necessary for the roll area with context changes is slower than the allocation procedure used for context changes with SAP extended memory. Therefore, increasing the roll area memory slows down the context change. Activities The roll area is not important with 64 bit platforms where sufficient extended memory is available. The default value is platform-specific and is determined dynamically. This is the default value specified in transaction RZ11. This value should not normally be changed. If you still have to make changes on your platform, keep in mind the following dependencies: CAUTION rdisp/ROLL_SHM should be adjusted if you change ztta/roll_area. rdisp/ROLL_MAXFS should be adjusted if you change ztta/roll_area.
es/disclaim_threshold_MB
This parameter is used to control the release of SAP Extended Memory for the operating system. For more information see Release of SAP Memory for the Operating System. Features This parameter determines the threshold value in MB. If memory blocks are requested above this threshold, for instance when there is a high load, these blocks are released for the operating system at the same time as they are released for the SAP system. A value of 0 means that this parameter is inactive. This is also the default setting. More Information es/blockdisclaimsize_KB es/disclaim_coasting_time_alloc es/disclaim_coasting_time_free
es/disclaim_coasting_time_alloc
This parameter is used to control the release of SAP Extended Memory for the operating system. For more information see Release of SAP Memory for the Operating System.
Features The parameter specifies in seconds how long after the threshold specified in es/disclaim_threshold_MB has been exceeded when a block held in the swap space was allocated, that this block is to be released for the OS. A value of 0 means that this parameter is inactive. This is also the default setting. NOTE Free blocks held in the swap space should be first read from the hard disk. But as the content is obsolete it is better for system performance to release this block for the OS and to request a new block from the main memory.
es/disclaim_coasting_time_free
This parameter is used to control the release of SAP Extended Memory for the operating system. For more information see Release of SAP Memory for the Operating System. Features Similar to the es/disclaim_coasting_time_alloc parameter, this parameter determines how long after the threshold specified byes/disclaim_threshold_MB has been exceeded when releasing a block, that this block is to be released for the operating system. The value is specified in seconds. A value of 0 means that this parameter is inactive. This is also the default setting. RECOMMENDATION With high system loads a block released for the SAP system is probably written to the swap space, that is, to the hard drive. But as the content is obsolete, system performance is better to release this block for the operating system.
es/blockdisclaimsize_KB
This parameter is used to control the release of SAP Extended Memory for the operating system. For more information see Release of SAP Memory for the Operating System. Features This parameter specifies in kilobytes the size of the upper part of an EM block that is also released for the operating system. It combines the benefit of smaller EM blocks (em/blocksize_KB) with regard to the main memory requirement, with the benefit of larger EM blocks with regard to performance. The size of EM blocks is determined by the em/blocksize_KB parameter. A value of 0 means that this parameter is inactive. This is also the default setting. More Information es/disclaim_threshold_MB es/disclaim_coasting_time_alloc es/disclaim_coasting_time_free
es/freelist_compactor
You can use this parameter to make better use of the EM blocks when activating and deactivating loads. You can reduce fragmentation in the extended memory by using this parameter. The procedure is active in the default setting and SAP recommends that you do not change this value (1).
This is a snapshot of the current (percentage and absolute values in kilobytes) and the maximum memory usage of the various SAP Memory Types. The table also indicates whether, and to what extent, the requirement is satisfied from the main memory and from the disk. Procedure You can determine from the Extended Memory row that the SAP Extended Memory is sufficiently large. The value [Max. use] is, in this example, noticeably smaller than the created memory area [In memory]. If both values are identical, you must increase the extended memory (profile parameter: em/initial_size_MB).
These memory classes are assigned the following values, which are also displayed in the initial screen of the rsmemory report. Number 0 1 2 Memory Class Roll Area Extended Memory (EM) Private memory (heap)
The screen comprises three parts: Quota Dialog The allocation strategy for dialog work processes is defined here. You can specify the steps in which each class is allocated memory, and how much memory is allocated. CAUTION No entry in the memory class field corresponds to class 0 (roll memory). The entry here does not have to match the defined memory parameters. If you enter a value for the heap memory in the 4th step that is different from the abap/heaparea_dia parameter, the value entered here takes precedence. NOTE In this case, 1 byte of roll area is first allocated by a dialog work process (due to technical reasons), and then a maximum of 2 GB of extended memory is available. This does not mean that the work process is assigned too much memory, since the resource is shared by all work processes. If the work process is not assigned any more extended memory, it can allocate another 6.5 MB of roll memory. Then it goes into PRIV mode and allocates heap memory (maximum 2 GB). Quota Batch/VB/Spool As with Quota Dialog the allocation strategy here is specified for non-dialog work processes. More information: Allocting Memory for User Contexts (UNIX)
Other parameters You can change the following memory parameters here for test purposes (these changes only apply until the next server restart): abap/heap_area_dia abap/heap_area_nondia abap/heap_area_total em/stat_log_timeout em/stat_log_size_MB
Displaying the Memory Areas You can display a list of all the users on the application server, with their respective memory requirements, by choosing Goto EM/HEAP Areas . The used heap memory and extended memory of the user are displayed first, followed by the EM usage according to internal sessions. This is followed by a history of users who have used more than the MB limit specified by em/stat_log_size_MB. The available HEAP and EM memory is displayed at the end of the list. EG Overview The two pushbuttons EG Overview and EG Dump are used for analysing the extended global memory. This is part of the extended memory available for internal SAP requests. Its size is specified in the em/global_area_MB parameter. Activities On the initial screen of transaction SE38, enter report rsmemory and choose (Execute) or F8.
NOTE If you use Windows Server 2003, apply SAP Note 1009297 (Microsoft patch for Windows to improve the page-out algorithm for SAP systems).
Slow Response Times for Some Users, Very Good Response Times for Other Users
Prerequisites The SAP extended memory is completely filled; dialog work processes are switched to PRIV mode. Procedure Use transaction SM50 to determine the work processes in the PRIV mode.
In this example, work processes 5 and 6 cannot allocate any more extended memory because the pool is used up, although its limit for ztta/roll_extension would still allow extended memory. They switch into PRIV mode prematurely (see Allocating Memory for User Contexts) Action: Increase the SAP extended memory pool (em/initial_size_MB: Size of Extended Memory Pool), to prevent work processes from being switched to the PRIV mode. The limit for the extended memory is too low for most user contexts (set with parameter ztta/roll_extension). Many contexts allocate heap memory and switch to PRIV Mode.
Action: Increase the limit for the extended memory using ztta/roll_extension.
The limit for the extended memory is too high. A few user contexts can completely fill the entire extended memory, whereby other processes are switched into PRIV mode before the limit is reached.
Reduce the limit on the extended memory (defined in ztta/roll_extension), or increase the extended memory (seeem/initial_size_MB). COLLECTED FROM:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/49/325d4ee93934ffe10000000a421937/fram eset.htm