cancel
Showing results for 
Search instead for 
Did you mean: 

Memory areas used in SAP

Former Member
0 Kudos

Hi Experts,

I have a big confusion in memory areas used in SAP, can anyone help me to define it.

I will list out the memory areas used,

1. Virtual Memory

2. Local Memory

3. Shared Memory

4. Extended Memory

5. Heap Memory

6. Roll Memory

Thanks

KT

Accepted Solutions (1)

Accepted Solutions (1)

markus_doehr2
Active Contributor
0 Kudos

> I have a big confusion in memory areas used in SAP, can anyone help me to define it.

This is not a SAP question but more an OS question.

> 1. Virtual Memory

This is the total memory - physical + swap area that is presented to the application. The MMU in your processor will translate that memory to addresses.

> 2. Local Memory

Process local memory? Where did you get that term?

> 3. Shared Memory

Buffers (what you see in ST02) are e. g. put in shared memory - so each workprocess can "attach" to that memory and see the same data.

> 4. Extended Memory

> 5. Heap Memory

> 6. Roll Memory

Check http://help.sap.com/saphelp_nw70/helpdata/EN/34/d9c8b3c23c11d188b40000e83539c3/frameset.htm for those three.

Markus

Former Member
0 Kudos

Hi Markus,

Local Memory is the term i heard in SAP only, if you read the SAP Handbook on Workload Statistics ADM315 - 2004-Q4 - A4 will come across this term repeatedly.

But it is not explained clearly in this handbook.

As per the handbook

They had mentioned like Local Memory + Shared Memory = Virtual Memory

Local Memory have Heap Memory in it and Shared Memory have Extended Memory in it.

So only it bit confusing and my question is realted to SAP only i.e SAP Memory Management.

Regards

KT

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Manoj,

Thanks for response but the links you provided shows how SAP memories are being utilised / accessed by applicaiton. What we need is memory mapping between SAP memories and OS memory. will all memories and bufferes reside in OS virtual memory or some buffers will store only RAM like that..

Thanks,

Kiran.

markus_doehr2
Active Contributor
0 Kudos

> What we need is memory mapping between SAP memories and OS memory. will all memories and bufferes reside in OS virtual memory or some buffers will store only RAM like that..

As stated above all memory allocations are done using virtual memory (RAM + Swap) so everything can be literally everywhere. The "best case" is that all memory that is actually used is in the RAM because accessing the RAM is much faster than reading pages from disk.

There are certain operating systems and database who do things differently - like Solaris and Oracle. Oracle allocates memory on Solaris using Dynamic Intimate Shared Memory. That is a special memory class that it not swapped/paged (or only under very rare conditions).

SAP does not make use of such techniques to my knowledge.

Markus

Former Member
0 Kudos

Hi all,

Thanks for all your views on SAP Memory Managment

A short note came out of this dicussion, just a high level definition correct me if i am wrong

There is no standard definition available for this Memory areas, we can differentiate by its usage

1. Virtual Memory - RAM + Swap Space

This is the one which holds the complete memory for any SAP system and also have lot of memory areas in it.

Mainly it is sepereated into 2 parts

2. Local Memory or Local Process Memory - A kind of area allocated to each individual workprocess and used only by it.

3. Shared Memory - A kind of area defined globally used by all the workprocess

Local Memory has one more division

4. Heap Memory - A kind of area defined within Local Memory area, used whenever workprocess memory got full. It is also allocated to each individual workprocess and used only by that workprocess.

Shared Memory has 2 divisions in it

5. Roll Area - A kind of area allocated to workprocess in the intial moment and its shared within multiple workprocesses. Size is very small.

6. Extended Memory - A kind of area allocated globally for all workprocesses and it is shared. Size is bit big.

If Extended memory is full, the workprocess request for heap memory area from Local memory.

Any comment on this view

Regards

KT

Former Member
0 Kudos

Good cource is ADM315.

Regards.

Former Member
0 Kudos

Hi KT,

I also had same kind of confusion over years and i couldnt find exact answer but i got some idea on myself but cannot confuse you. dont get confused with the answers mentioned in this forum as some are plain wrong. Everybody have their own interpretation so they posted what they knew. If i find any authentic material i will post here. SAP Never gave clear memory model diagram how sap maps its memory model to OS memory but they tells about different memories they named and how they will be used during execution.

The reason why I said some explanations were palin wrong:

At OS level : Virtual memory = RAM + SWAP space

all applications will get memory allocation only from virtual memory. Even ST02 buffers also get memory allocation from OS virtual memory. It is not clearly mentioned any where that ST02 buffers will reside only in RAM.

SAP Local memory: SAP tells that this is the memory reside with workprocess at os level and remains with it until shutdown.

SAP Heap memory: This is allocated on demand from OS but will be accessible by only WP hence it is not shared memory but memory locations will be freed by work process once execution completed. So same memory locaitons can be reused by other workprocesses. So it will also be allocated from OS virtual memory. (SAP Never specify that it will be allocated from only RAM)

If you get any good dcoumentation please update.

Thanks,

Kiran.

markus_doehr2
Active Contributor
0 Kudos

> Everybody have their own interpretation so they posted what they knew.

It's more about which terminology you follow. Memory models are not identical implemented across different operating system so all answers here are somewhat correct depending on which OS glasses you wear.

> If i find any authentic material i will post here. SAP Never gave clear memory model diagram how sap maps its memory model to OS memory but they tells about different memories they named and how they will be used during execution.

Because it's OS dependent. You e. g. have on Windows a "view" memory model that uses segmented divisions or a "flat" memory model. On Linux you can use an mmap()'ed or a standard shmget() based model etc. etc.

> all applications will get memory allocation only from virtual memory. Even ST02 buffers also get memory allocation from OS virtual memory. It is not clearly mentioned any where that ST02 buffers will reside only in RAM.

http://help.sap.com/saphelp_nw70/helpdata/EN/34/d9c8b3c23c11d188b40000e83539c3/frameset.htm

<...>

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.

<...>

> SAP Local memory: SAP tells that this is the memory reside with workprocess at os level and remains with it until shutdown.

http://help.sap.com/saphelp_nw70/helpdata/EN/22/5d980297cb48129e663b0d4a3e844d/content.htm

<...>

Local process memory

The operating system differentiates between local process memory and shared memory. For local process memory the operating system keeps both 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.

<...>

Check

http://help.sap.com/saphelp_nw70/helpdata/EN/d1/80b716dc8111d2ac8f0000e83539c3/frameset.htm

which describes how this is implemented on the different operating system. So if you want to know how to match the SAP-View to the OS view you need to specify the OS.

Markus

former_member603052
Contributor
0 Kudos

Hi KT,

Virtual memory is sum of ur Physical memory(RAM) and Page Size(or SWAP Size).

Local Memory is the work process internal memory.(This also called as heap or private memory)

Shared memory will be created on RAM consists of Roll Memory,Extended Memory and SAP Buffers.

When using Roll memory,the roll files have to be copied in and out of user context buffer at the time of Context Switch.(i.e.when user is assigned a work process)

When using Extended memory, it just creates pointers in the user context buffers rather than copying files into context buffer.

When using heap memory(i.e. work process own internal memory),the work process goes into private mode(the same work process does all the LUW's)

SAP Buffers contain table buffers,screen buffers,CUA Buffers,program buffers,etc which contains screens,programs,tables which are global to all users.

Regards,

Kalyan