Skip to Content
avatar image
Former Member

MaxDB Memory Allocation

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 09, 2009 at 08:43 AM

    > 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

    Add comment
    10|10000 characters needed characters exceeded

    • > 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