cancel
Showing results for 
Search instead for 
Did you mean: 

em/initial_size_MB Uses RAM space or Swap Space

Former Member
0 Kudos

Hi Friends,

Version - ECC 6,

OS - Linux

DB - Oracle

One of our Production System is running out of Extended Memory,

We have around 98 GB of RAM and SWAP Space of Around 149 GB.

Sum of all Memory Parameters in ST02 comes near to 92 GB.

Does increasing em/initial_size_MB by 20 GB more requires increasing the RAM size or RAM+SWAP is enough,


Does it affect System Performance if the Sum of Memory Parameters exceeds the RAM Size.


In my opinion it won't as SAP Says User contexts are stored in SWAP Space and SAP Treats RAM+SWAP as whole.


But in bit of confusion as didn't get clear information on that. Please share your knowledge and correct if interpreting it wrong.


Current Memory and Parameters.

EM Usage History

Accepted Solutions (1)

Accepted Solutions (1)

isaias_freitas
Advisor
Advisor
0 Kudos

Hello,

SAP will ask for memory from the operating system. It is up to the OS to decide whether RAM or swap will be used.

I believe that if your swap usage is not high you could go ahead and increase the EM.

However, you would like to avoid swap usage, as it slows down the overall performance of the system / server.

Regards,

Isaías

Former Member
0 Kudos

Hi Isaias,

Please help to understand what SAP States below, highlighted in yellow.

Am bit confused as it mentions SWAP Space will be Used.

Does that mean irrespective of how much Memory available on RAM, EM Related Data will be stored in SWAP Part of Memory?

Allocating Memory for User Contexts (UNIX) - SAP Memory Management (BC-CST-MM) - SAP Library

Memory Type

Characteristics

SAP Roll Area

Sequential memory allocation to several work processes using a relatively slow copying process

SAP extended memory

Sequential memory allocation to several work processes using a fast allocation process Uses swap space

Private Memory

Allocation to a local work process, as required for the running user context in the process Uses swap space

alexander_bolloni
Contributor
0 Kudos

Hello,

I believe the above description of EM and Private Memory is more or less useless/confusing. Could be a translation issue... I asume that by Private Memory they mean "OS heap" memory.

SAP user context data is NOT stored in swap space (assuming you mean OS swap) but resides in EM. Whether or not this EM memory is located in physical RAM or swapped out, depends on how much memory your Linux server has. Mapping the EM to the actual server RAM is the task of the OS, just as Isaias said already.  I think data in EM memory should normally not be swapped out by the OS, or you have misconfigured your server (too little RAM/too much EM).

What I believe the text is trying to explain is the fact that exchanging (="swapping") ABAP user context data (which gets stored in EM memory)  for a work process works really fast for EM memory (because technically it uses shared Memory, which can be attached/detached to a process very quickly).

What your ABAP system consumes in terms of total RAM on the Linux server depends not only on the configured EM (=em/initial_size_MB param) but also on additional, process-local memory consumption which will occur in a work process, for example when the dialog EM limit is exceeded for a dialog user session and the work process goes into "priv mode", meaning the additional memory is provided via normal memory allocation from the OS (=malloc...) (and not from EM pool), which "ties" the user session to this specific work process. The limit for the amount of ABAP heap memory that you allow all work processes to consume from the OS is given via parameter

abap/heap_area_total

To give an impression from NW 740: in 740, the zero administration memory management (ZAMM), which can automatically calculate certain MM-related parameters, uses the formula:

em/inital_size_MB = 70% of server RAM

Defining even more than 92 GB of EM for a server with only 98 GB RAM can be  "dangerous", depending on how high your current and maximum EM usage is (you can see that in ST02).

Summary: if you have an EM pool which already almost completely matches the available server RAM, you will get into trouble once the server consumes this EM completely: your server then will go into swapping because, as stated above, the overall memory consumption of an ABAP server is higher  than the configured EM pool.

So you definitely need more RAM on your server if you want to increase em/initial_size_MB by 20GB.

Regards,

  Alex

Former Member
0 Kudos

Thanks a Lot Isaias, Alex...

Former Member
0 Kudos

Would like to keep you informed.

As extending EM would take us to more Than RAM Size,

Am thinking of Reducing our Heap by 10 GB as our max Heap usage is around 17 GB and allocated is 40 GB.

And add it to the EM which will make it 22 GB to 32 GB

That would give us 50% increase and we can push this RAM Upgrade.

Answers (1)

Answers (1)

Former Member
0 Kudos