Hello everyone,
As I was trying hard to grasp the HANA memory concepts this most confusing statement came up:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
When memory is required for table growth or for temporary computations, the SAP HANA code obtains it from the existing memory pool. When the pool cannot satisfy the request, the HANA memory manager will request and reserve more memory from the operating system. At this point, the virtual memory size of the HANA processes grows.
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 Linux6. Thus, from SAP HANA’s perspective, the amount of Used Memory shrinks, but the process’ virtual and resident sizes are not affected. This creates a situation where the Used Memory may even shrink to below the size of SAP HANA’s resident memory, which is perfectly normal.
----------------------------------------------------------------------------------------------------------------------------------------------------
So I made a little scheme to demonstrate to myself how on earth this happens. Can somebody check my logical thinking and tell me if I am on the right way?
1. So in the first step, memory manager grabs more space from the overall free space (when HANA's "pool cannont satisfy the request". This results in increase HANA's resident memory
2. Now when the memory is no longer needed, the memory manager returns this space back into the free pool but "without informing Linux6".
So because OS does not know that it got thee memory back, it sees the HANA's resident memory more than it actually is, while from HANA's perspective it's pool got shrinked back to it's original size.
IS THAT HOW IT WORKS?
please help 😔