Resident memory in Hana.
See also: SAP Hana - Memory
Once a temporary computation completes or a table is dropped, the freed memory is returned to the memory manager, who recycles it to its pool, usually without informing the OS. Thus, from SAP HANA’s perspective, the amount of Used Memory shrinks, but the process’ virtual and resident sizes are not affected.
For the SAP Hana process:
SELECT round(SUM(PHYSICAL_MEMORY_SIZE)/1024/1024/1024,2) as "Database Resident Memory (Gb)" FROM M_SERVICE_MEMORY
Total Resident (Host Resource Utilization)
SELECT T1.HOST , ROUND(( T1.USED_PHYSICAL_MEMORY + T2.SHARED_MEMORY_ALLOCATED_SIZE ) / 1024 / 1024 / 1024, 2 ) AS "Host Memory (Gb)" FROM M_HOST_RESOURCE_UTILIZATION AS T1 JOIN ( SELECT M_SERVICE_MEMORY.HOST , SUM( M_SERVICE_MEMORY.SHARED_MEMORY_ALLOCATED_SIZE ) AS SHARED_MEMORY_ALLOCATED_SIZE FROM SYS.M_SERVICE_MEMORY GROUP BY M_SERVICE_MEMORY.HOST ) AS T2 ON T2.HOST = T1.HOST;
select HOST, round((USED_PHYSICAL_MEMORY + FREE_PHYSICAL_MEMORY)/1024/1024/1024, 2) as "Physical Memory GB", round(USED_PHYSICAL_MEMORY/1024/1024/1024, 2) as "Resident GB" from PUBLIC.M_HOST_RESOURCE_UTILIZATION
Comparison Total Resident vs Database Resident Memory
If the difference between 'Total Resident' and 'Database Resident' is below a significant threshold (2GB), there is no indication that processes outside the database contribute significantly to memory consumption.