Search this blog for other interesting articles

Wednesday 10 August 2011

Memory allocation sequence to dialog work processes in SAP

This article answers the following queries:
  • What is the memory allocation sequence to dialog work processes in SAP?
  • When does a work process go to PRIV mode?
  • How to avoid or minimize work process going to PRIV mode ?
  • What are the SAP parameters used to define initial roll area, extended memory, heap memory, roll area ?
Memory allocation sequence to dialog work processes in SAP :
--------------------------------------------------------------------------------------

  1. Initially , a defined roll area is used. This roll area is defined by the SAP parameter ztta/roll_first.
Usually ztta/roll_first is set to 1 in SAP so that only technically necessary amount  is allocated to roll memory.
 If the memory from the initial roll area( i.e. ztta/roll_first) is not sufficient for the user context then
  1. Extended memory is used until  the extended memory is full or until the user quota is reached
Extended memory is defined by the SAP parameter em/initial_size_MB and the user quota for dialog workprocess is defined by the parameter ztta/roll_extension_dia.
If this memory is also not sufficient, then
  1. The rest of the roll area is used. This roll area is defined by SAP parameter ztta/roll_area.
Once this is also fully occupied then
  1. The system is forced to use local heap memory (Private memory). Then the work process goes into PRIV mode
Heap memory is available until one of the following occurs :
i)        Either the limit of the heap memory for dialog workprocesses is reached (abap/heap_area_dia) or the entire heap memory of all work processes(abap/heap_area_total)  for an application server reaches its limit.
ii)     Operating system limit for allocation of memory
iii)     The swap space in the host system is used up or the upper limit of the operating system address space is reached.

The memory allocation strategy for dialog work processes, aims to prevent work processes from allocating R/3 heap memory and thus entering PRIV mode.
When  a work process enters PRIV mode, it remains connected to the user until the user ends the transaction. Most of the time,  we should try to avoid the situation of work process going into PRIV mode for better performance of the SAP system. This can be done by optimally defining abap/heap_area_total parameter.





14 comments:

hari said...

Hi Brother thanks for your posts, really its very helpful

Also could you please define Roll Area, Extended Memory and Heap Memory
Then at what percentages these all memories will be assigned

Thanks In Advance

DurgaPrasad said...

Hi Hari..Thanks a lot for your comment. Definitely will write much more articles on the Memory management covering all the aspects.

kirangadde said...

Thanks

DurgaPrasad said...

Hi Kiran..Many thanks for your feedback

Unknown said...

brother u explained so well , have diagram also it would be better

Anonymous said...

Hello 'the great'
you have created really an awesome blogspot wherein i've learned many things, you post so clearly that i got to learn with ease.

thanks a lot keep booming.....

shafeeq said...

Awesome Explanation , hats off dude , i like all your posts,
can i request you to post some docs related to the role of a SAP BASIS Guy in JAVA STAG? ....

DurgaPrasad said...

Hi Satya...Thanks for your suggestion. yes will try to include a diagram.

DurgaPrasad said...

Hi Shafeeq...Thanks for your sweet comment...Definitely am looking forward to post more on jack stack administration

DurgaPrasad said...

Thanks dude

DurgaPrasad said...

Hi Hari...yes will do the same in a separate article

Unknown said...

Hello Durga Prasad,

The above explanation is so clear that every one can understand.
Could you please clarify my doubt.

What is the reason for the difference in memory allocation between dialog and background workprocess in case of unix platform.

Thanks in advance,
Raghu.

Anonymous said...

What are best values for these parameters which can be set in system. We run background jobs and these jobs often fails due to memory issues. Suppose if I hold data of 2 GB to 4 GB in a background job what values can be set for the memory parameters like 'abap/heap_area_dia'
'abap/heap_area_nondia'
'abap/heaplimit'
'em/initial_size_MB '
'ztta/roll_area'
'ztta/roll_extension_dia'
'ztta/roll_extension_nondia'

Anonymous said...

Hi DP this is very helpful for us.

Thank you

Search this blog for other interesting articles

Please subscribe & activate link received to your email id to receive latest articles

Enter your email address:

Delivered by FeedBurner