SAP Knowledge Base Article
3196291 - What to do if you suspect a memory leak in the HANA database?
Component: HAN-DB (SAP HANA > SAP HANA Database), Version: 7, Released On: 31.01.2024
Symptom
You are suspecting a memory leak in the HANA database and want to know what you can do further to investigate it.
Environment
HANA 1.0
HANA 2.0
Reproducing the Issue
A memory leak is a memory area (typically a heap allocator) that grows over time without any apparent reason.
If you have identified a suspicious area, proceed as follows:
Check for SAP Notes that describe the memory leak and provide a solution.
Check if the problem is reproducible with a recent SAP HANA revision.
If you can’t resolve the problem yourself, open an SAP customer message and use the component HAN-DB.
Resolution
1. Download the SQL collection provided in SAP Note 1969700 and run the
scripts HANA_Memory_TopConsumers_TimeSlices_xx_xx.txt and HANA_Memory_Overview_xx_xx.txt that is the nearest
to your SAP HANA database revision. If you find through the HANA_Memory_TopConsumers_TimeSlices_xx_xx.txt script
that there is a constant not decreasing memory allocator and you see it also in the output of
the HANA_Memory_Overview_xx_xx.txt continue with step 2 below.
The column HANA heap memory (used)
|HANA heap memory (used) | 52| 52 (vhbshk0sdb) will list the top memory allocators. In this example this
is Pool/ColumnStore/Main/Dictionary/RoDict
| 10 (Pool/ColumnStore/Main/Dictionary/RoDict) |
| | | | 7 (Pool/RowEngine/CpbTree) |
| | | | 5 (Pool/PersistenceManager/PersistentSpace(0)/DefaultLPA/Page)|
| | | | 3 (Pool/RowEngine/SQLPlan) |
| | | | 3 (Pool/malloc/libhdbcs.so) |
| | | | 2 (Pool/AttributeEngine-IndexVector-Single) |
| | | | 2 (Pool/RowEngine/LockTable) |
| | | | 2 (Pool/RowEngine/QueryExecution) |
| | | | 1 (Pool/Statistics) |
| | | | 1 (Pool/AttributeEngine)
In order to find a potential memory leak of a specific allocator, please enter the allocator name
in HANA_Memory_TopConsumers_TimeSlices_xx_xx.txt in the Modification Section, DETAIL e.g. 'Pool/parallel/ihm':
( SELECT /* Modification section */
'1000/10/18 07:58:00' BEGIN_TIME, /* YYYY/MM/DD HH24:MI:SS timestamp, C, C-S<seconds>, C-M<minutes>, C-
H<hours>, C-D<days>, C-W<weeks>, E-S<seconds>, E-M<minutes>, E-H<hours>, E-D<days>, E-W<weeks>, MIN */
'9999/10/18 08:05:00' END_TIME, /* YYYY/MM/DD HH24:MI:SS timestamp, C, C-S<seconds>, C-M<minutes>, C-
H<hours>, C-D<days>, C-W<weeks>, B+S<seconds>, B+M<minutes>, B+H<hours>, B+D<days>, B+W<weeks>, MAX */
'SERVER' TIMEZONE, /* SERVER, UTC */
'%' HOST,
'%' PORT,
'%' SCHEMA_NAME,
'%' AREA, /* ROW, COLUMN, TABLES, HEAP, % */
'%' SUBAREA, /* 'Row Store (Tables)', 'Row Store (Indexes)', 'Row Store (Int. Fragmentation)', 'Row Store (Ext.
Fragmentation)', 'Column Store (Main)', 'Column Store (Delta)', 'Column Store (Others)' or 'Heap (<component>)' */
'Pool/parallel/ihm' DETAIL, /* Name of table or heap area */
2. Search in SAP KBA 1999997 - FAQ: SAP HANA Memory for this allocator (in this
example Pool/ColumnStore/Main/Dictionary/RoDict) or any other allocator / component of which you suspect a memory
leak for. Double check that the information you find does match to your current SAP HANA database revision.
3. Search also in our knowledgebase https://support.sap.com/en/my-support/knowledge-base.html for the
suspected memory allocator and double check that the SAP Notes you find do match to your revision.
4. In case you do not find the solution please open a case with SAP and provide the information of SAP Note 1786918 -
Required information to investigate high memory consumption together with a full system info dump (SAP KBA
1732157) of the HANA SYSTEMDB and TENANTDB together with the evidence you have found
See Also
SAP KBA 1840954 - Alerts related to HANA memory consumption
SAP KBA 1999997 - FAQ: SAP HANA Memory
SAP Note 1786918 - Required information to investigate high memory consumption
Keywords
high, memory, leak, allocator, consumer, sql, top
Products
Products
SAP HANA 1.0, platform edition
SAP HANA, platform edition 2.0
This document refers to
SAP Note/KBA Component Title
1999997 HAN-DB FAQ: SAP HANA Memory
1840954 HAN-DB Alerts related to HANA memory consumption
1732157 HAN-DB Collecting diagnosis information for SAP HANA [VIDEO]
1969700 HAN-DB SQL Statement Collection for SAP HANA
1786918 HAN-DB Required information to investigate high memory consumption
SAP Knowledge Base
This document is referenced by
SAP Note/KBA Component Title
3011480 How-To : Troubleshooting SAP HANA Memory Consumption