cancel
Showing results for 
Search instead for 
Did you mean: 

MaxDB Memory Allocation

Former Member
0 Kudos

Hi,

How does MaxDB gets memory allocated from os. Could any one please clarify.

Suppose i have X GB of physical memory & i allocated Y GB to CACHE_SIZE(Y < X ). When i start the database does it grabs all Y GB from physical memory.

When i do ipcs on linux box i only see Z GB of shared memory used( Z <<< Y). When i do top db kernel is occupying XX GB of memory (XX > Z).

So little bit confused how MaxDB gets memory allocation from OS.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

> How does MaxDB gets memory allocated from os. Could any one please clarify.

You may want to check SAP note

#1128916 - FAQ: MaxDB/liveCache Heap-Management

> Suppose i have X GB of physical memory & i allocated Y GB to CACHE_SIZE(Y < X ). When i start the database does it grabs all Y GB from physical memory.

Yes, the Memory for the Buffer Cache is allocated on startup.

> When i do ipcs on linux box i only see Z GB of shared memory used( Z <<< Y). When i do top db kernel is occupying XX GB of memory (XX > Z).

Well, you likely misunderstand the output of ipcs here.

To easily see the memory allocation you may just run this query:

select usedsize from memoryallocatorstatistics where allocatorname ='SystemHeap'

Be aware that there are also other memory areas, which are dynamically allocated and deallocated.

Moreover, sometimes users mistake the CacheMemorySizeparameter value as Bytes where in reality the paramter is in pages (8k).

regards,

Lars

Edited by: Lars Breddemann on Jun 9, 2009 10:44 AM

Former Member
0 Kudos

Thanks Lars.

One of DB has System heap 5.7G, & RTEMem_BlockAllocator assigned size is 5.3 G (CACHE_SIZE = 4.9G).

As per below note CACHE SIZE is included in RTEMemBlockAllocator.

My confusion is physical size of box(SAP also exists on same box) is only 5.9G, so is DB getting memory from swap.

when i do top i see process called kernel which takes 1.5g - what's this process.

Thanks in advance

markus_doehr2
Active Contributor
0 Kudos

> My confusion is physical size of box(SAP also exists on same box) is only 5.9G, so is DB getting memory from swap.

Yes. all the caches together (MAXUSERTASKS etc.) use memory, not only one parameter. So your database will (finally) use all the available memory on your machine.

> when i do top i see process called kernel which takes 1.5g - what's this process.

"kernel" is the database kernel process. You see an allocation of 1.5gb because currently the cache is not filled up to its maximum. You will see it increases with the use of the system up to the max. configured value.

Markus

Answers (0)