Professional Documents
Culture Documents
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.
Roll Area: The roll area is used for additional memory (if available) when the extended memory becomes
full, as well as for the initial memory assigned to a user context. The limits are set using parameters.
Extended Memory: The large part of the user context is stored in the extended memory (EM). Page
management of this memory stack is performed directly by the SAP system, and not by the operating
system. This extended memory is implemented as an unnamed mapped file (on AIX and optionally on
HP-UX as shared memory). This means the address space uses the paging file or uses the swap space
of the operating system as background memory. For more information, please see the platform-specific
documentation.
When the context is changed, the user context, which is in the extended memory, is not copied as with
the roll area. Instead it is allocated to alternating work processes by mapping operations. The roll area
can be decreased, which results in a faster context change because less data is copied and
mapping an extended area is not work-intensive.
All internal tables and ABAP variables are located completely in the area of a user context that can be
directly addressed. Copying and input/output operations when accessing internal tables and lists is no
longer needed. The result is low CPU usage and shorter access times.
Private Memory: If the extended memory is fully occupied, or the limit for the work process has been
exceeded, the work process allocates heap memory. This is known as private memory because it is
specific to the process, and the user context can no longer be processed by a different work process
(PRIV mode).
The advantages of the memory management system require increased swap space and main memory.
The need for swap space increases because full-sized internal tables and lists are in the address space
and take up swap space. The main memory requirements may increase to prevent excessive operating
system paging due to the increased swap space requirements.
For more information, see Swap Space Requirements
ztta/roll_first 1 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.
The basis for zero administration memory management is a sufficiently large Windows page file. The
previous recommendation still remains:
All relevant memory management parameters are set with an optimal default value so that all manual
configurations are unnecessary.
1 5-7
2 10-13
4 20-25
Processes
This parameter specifies the maximum SAP Extended Memory that can be used for dialog work
processes.
Integration
Previously, both non-dialog processes (BTC, UPD, UP2, SPO, etc.) and dialog processes were handled
the same regarding the allocation of extended memory. You could not allocate separate EM quotas for
dialog users and batch users. The quota was determined by ztta/roll_extension and was valid for all work
process types.
Only the heap memory had a separate quota
(compare abap/heap_area_dia and abap/heap_area_nondia).
To ensure compatibility with the earlier implementation, the following rules apply:
If ztta/roll_extension_dia or ztta/roll_extension_nondia are not set (DEFAULT.PFL
or instance profile), the value in ztta/roll_extension (old procedure) applies for ALL work
process types.
If, on the other hand, ztta/roll_extension_(non)dia is set, the value
inztta/roll_extension is overwritten for the work process type in question.
Activities
The value is specified in bytes.
The minimum is 20000000 (20 MB); the maximum is 64000000000 (64GB, for 64 bit platforms).
The default setting is the value of ztta/roll_extension.
ztta/roll_extension_nondia: EM Quota for Non-Dialog Work Processes
This parameter specifies the maximum SAP Extended Memory that can be used for non-dialog work
processes.
Integration
Previously, both non-dialog processes (BTC, UPD, UP2, SPO, etc.) and dialog processes were handled
the same regarding the allocation of extended memory. You could not allocate separate EM quotas for
dialog users and batch users. The quota was determined by ztta/roll_extension and was valid for all work
process types.
Only the heap memory had a separate quota
(compare abap/heap_area_dia and abap/heap_area_nondia).
To ensure compatibility with the earlier implementation, the following rules apply:
If ztta/roll_extension_dia or ztta/roll_extension_nondia are not set (DEFAULT.PFL or instance
profile), the value in ztta/roll_extension (old procedure) applies for ALL work process types.
If, on the other hand, ztta/roll_extension_(non)dia is set, the value in ztta/roll_extension is
overwritten for the work process type in question.
Activities
The value is specified in bytes.
The minimum is 20000000 (20 MB); the maximum is 64000000000 (64GB, for 64 bit platforms).
The default setting is the value of ztta/roll_extension.
RECOMMENDATION
This allows you to allocate more extended memory for memory-intensive batch work processes than for
dialog work processes.
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..
abap/heap_area_nondia: Heap Memory Limit for Non-Dialog Work Processes
This parameter restricts the amount of heap memory (Private Memory) that an SAP non-dialog work
process can allocate. This value refers to spool, update, and background processes. This value ensures
that enough swap space is available in the system.
NOTE
Local memory is hardly needed any more with modern 64 bit platforms, as the memory requirement can
be satisfied by the SAP Extended Memory.
Integration
The graphic below shows the relationship with abap/heaplimit.
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.
abap/heap_area_total: Total Quota for Heap Memory
This parameter determines the upper limit of heap memory in bytes available to all work processes of an
SAP application server. You can use this upper limit to restrict the swap space usage of an SAP
application server to a specific amount. You can find more details on this topic under Functionality of the
SAP Memory Management System.
Integration
The graphic below shows the relationship with the
parameters abap/heap_area_dia, abap/heap_area_nondia, andztta/roll_extension.
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.
em/initial_size_MB: Extended Memory Pool Size
This value specifies the extended memory pool size that the SAP system manages for the SAP Extended
Memory.
The value is stated in megabytes.
Integration
Ideally, this pool is large enough to contain the sum of all the user contexts. The pool must always be
larger than the size of the parameter ztta/roll_extension. This parameter specifies how much extended
memory can be allocated from the pool to one user context.
If the pool is used up, heap memory is allocated (see Private Memory and Allocating Memory for User
Contexts). The work process switches to the PRIV mode and is reserved exclusively for the current user
context. After processing the user context, the work process might restart automatically if the process size
specified in abap/heaplimit is exceeded.
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.
The value must be between 32 and 8096.
Keep in mind the following notes about the pool size:
RECOMMENDATION
Ensure that the pool is 10 to 15 times as big as ztta/roll_extension. The exact value depends on the
available swap space and the number of users in the host system.
NOTE
The swap space must be sized so that it can contain the SAP extended memory and has enough space
for the SAP usage of heap memory (see Swap Space Requirements). There must also be enough space
available for competing system users outside of the SAP system. The swap space must also be large
enough to ensure a safety reserve.
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).
Checking Roll /Paging Area and Extended Memory in ST02
On the initial screen of transaction ST02 (Tune Summary) you can see the following overview of the SAP
Memory under the Buffer overview.
Heap Memory 0 0 0 0 0
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).
NOTE
Changes made here only apply to the server on which you are currently logged on, and only remain in
effect until the SAP instance is stopped again.
Prerequisites
You are familiar with the SAP Memory Management concept and have read section Functions of the SAP
Memory Management System.
Features
The SAP system has the following memory classes:
SAP Roll Area
SAP Extended Memory
Private Memory (Heap Memory)
These memory classes are assigned the following values, which are also displayed in the initial screen of
the rsmemory report.
0 Roll Area
NOTE
If you use Windows Server 2003, apply SAP Note 1009297 (Microsoft patch for Windows to improve the
page-out algorithm for SAP systems).
Windows: Checking Unused Physical Memory Using ST06
Procedure
Using the paging mechanism lazy page out which removes the pages that are not in the working set of an
active process, Windows creates permanently free physical memory. For more information, see Special
Features on Windows. Therefore, transaction ST06 is of very high value for Physical mem free in
comparison to Physical mem avail. Therefore make sure that you have enough unused physical memory
available before you increase the number of work processes.
NOTE
A high Physical mem free value has no bearing on system utilization. Physical mem free in relation
to Physical mem avail is by definition very large.
Procedure
Symptom
Various error messages that indicate a storage bottleneck (more correctly: a swap space shortfall) such
as: System Panic;cmemreserve: reservation overrun; ENOMEM, Not enough
core; ENOSPC, No space left on device; SIGDANGER(only under AIX). In the SAP system the
SAP system log message "no memory of class perm" is output.
This problem can occur with both SAP processes and external processes. The relevant process cannot
allocate any more heap memory. This can lead to the database operation being ended or SAP work
processes being stopped.
In the SAP system, error messages appear in the developer trace files dev_disp, dev_w<n>, in the
system log and in dumps. The following messages may
appear: TSV_TNEW_;._NO_ROLL_MEMORY; NO_MEM; NO_MEMORY; RESIZE_EM_ALLOC_ERROR, Storag
e class PERM.
This problem mostly occurs if background jobs are active with large amounts of data.
Possible Causes
There is no more swap space available (Swap Space Requirements).
The highest value for one of the SAP profile parameters that limit the swap space usage has been
exceeded. In this case, the following parameters are
relevant: abap/heap_area_dia, abap/heap_area_nondia and abap/heap_area_total.
Corrective Action
Increase the swap space as described in Swap Space Requirements.
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.
Possible causes /Corrective action
No more SAP Extended Memory is available.
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