Please follow the steps below in order to collect the allocator trace.
The hdbcons commands need to be executed as
The commands below are given for Single Database Container system.
If you are running MDC, please use hdbcons -p
In case you are running MDC in high isolation mode, please refer to SAP Note 2410143.
- If possible, clear the SQL Plan Cache or restart the system:
- Reset possible existing trace entries. Please replace the allocator with the complete name including the hierarchy, e.g. the full string returned as CATEGORY from M_HEAP_MEMORY
- Enable astrace for the specified allocator
- Create initial Allocator Trace report, and write down the current size of the allocator. In case the SQL does not return any record, it means that there is currently no allocation on this allocator.
SELECT NOW(), HOST, PORT, CATEGORY, ROUND(EXCLUSIVE_SIZE_IN_USE/1024/1024) AS "SIZE(MB)" FROM M_HEAP_MEMORY WHERE PORT LIKE '%03' AND CATEGORY = '
- In case there is a suspected query/application transaction, execute it to reproduce. Otherwise, wait and monitor the size of the allocation, until you see a noticeable growth compared to the starting point.
SELECT NOW(), HOST, PORT, CATEGORY, ROUND(EXCLUSIVE_SIZE_IN_USE/1024/1024) AS "SIZE(MB)" FROM M_HEAP_MEMORY WHERE PORT LIKE '%03' AND CATEGORY = '
hdbcons "mm top -l 20
hdbcons "mm cg -r
Note, it is the best to check the allocator size and collect the report when there is no load (or relatively low) on the system if possible. Only in that case, we can make sure that the stacks recorded in allocator trace are pointing to the leakage, instead of meaningful allocations for the active queries.
- Repeat step 5. and create 3-5 reports & callgraphs with the allocation size returned from the SQL.
- Disable astrace
- Cleanup
- Zip the allocator size returned by SQL, Allocator Trace reports and callgraphs generated in step 4 and 5 and contact SAP Support for root cause analysis.
More details refer Snote : 2620830
EmoticonEmoticon
Note: only a member of this blog may post a comment.