Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 4343

Queries on Memory measurement and related

$
0
0

Hi,

 

Below mentioned are some queries based on the articles I have come across about HANA especially the HANA memory usage explained document.

Link-> http://www.saphana.com/docs/DOC-2299

 

I request your help on these queries.

 

 

Some terms:

1.  Physical Memory(RAM): The amount of memory available on the machine.

2. Swap: Disk space that can be used in case physical memory is full. 

3. Allocation Limit: Amount of memory that can be allocated (reserved) from the operating system (maximum pool size).   ·         

4. Allocated Memory: Amount of memory currently allocated from the operating system (current pool size). This is the memory available to HANA database.

5.Used Memory: Amount of memory that is actually used by HANA Database (share from the pool that is in use, this includes memory used for the program code, the tables, and for temporary computations)

6.Virtual memory is the Physical memory(RAM) +Swap space(Disk) that is allocated for a process.

 

Queries: (with the understanding that the terms Used memory, Resident memory, Allocated memory, HANA memory pool, a part of virtual memory(non-swap spcae part all refer to RAM)

1.      Allocated memory vs Virtual memory vs HANA memory pool :

a. Allocated memory(RAM) is amount of memory currently allocated from the operating system (current pool size). This is the memory available to HANA database.

b.Virtual memory = RAM+SWAP space allocated to linux processes by the OS. Right?

c. HANA memory pool: the part of the memory currently allocated by the OS from the preallocated memory quota and can increase up to the global allocation limit This is only about the Physical memory?

d. If used memory is the physical memory in use and is a subset (using memory from memory pool) of the memory pool  Why is the code and stack  shown as a part of HANA used memory and not included in memory pool in the diagrams depicting the same.(page 3).

 

 

2.      Resident memory vs Virtual memory:

When (part of) the virtually allocated memory actually needs to be used, it is loaded or mapped to the real, physical memory of the host, and becomes “resident”.

              a. Virtual memory- Swap space=Resident memory is right way of understanding?

              b. Doesn't Resident memory also mean Allocated memory in use? i.e. part of HANA memory pool in use?

3.      Used memory vs Resident memory. 

a.      Resident memory is the physicalmemory actually in operational use by a process.

b.      Used memory is the total amount of physicalmemory in use by HANA.

c.      How best can the difference be explained? Both definitions talk about physical memory in use.

d.      Why Resident memory remains high even when the used memory decreases.

4.      How to relate  SAP HANA MEMORY POOL and Virtual memory allocated to HANA.

 

5.      I observe that during my tests HANA CPU consumption increases due to some reason not very clear to me.

a.      I briefly know that it is due to some background processes like delta merge etc… Any pointers/links on the reason for the same?

b.      How to identify and confirm this?

c.      Is there any way to avoid this during my test execution?

6.      The measurements shown in overview tab

a.      should match with the results of the queries mentioned for used memory measurements in the document like used memory, peak used memory, memory consumed by column/row tables etc.... Right?

a.      I see that used memory displayed in the overview tab doesn’t match with the sum of %MEM in the top command for HANA processes many times. I believe there are other activities going on in HANA which can be monitored in the M_Memory table and other tables?

c.      Is the overview tab the best place to note memory and CPU consumption? I actually want to use a unix command to write the CPU usage and Memory used readings to a text in regular frequency of say 30 minutes to 60 minutes. Reason being we run a few jobs which take like 12-24 hours and I want to automate the monitoring. I believe as far as memory usage is concerned the unix commands don't give a complete picture. CPU consumption measurement is still more in sync with overview tab. Agreed?

7.  HANA    Code and stack comprises of?

8.  Data in the tables are stored in memory or on disk?

a. I believe disk is only used for archiving and logs.

b. By default all data is in-memory? Like, if I create a schema and load some data into it, when I execute the query to get the memory consumed by the table, the result shows physical memory consumed number. Right?

c. Unless we unload the tables or HANA does the same if some tables/data are not in regular use, data won’t move to disk from memory? But then I read somewhere data being on the disk istelf. Which is right?

d. when we talk about HANA moving/unloading some tables based on usage, the data is moved to swap space. Right?

 

 

Regards,

Sandeep

 

 

 


Viewing all articles
Browse latest Browse all 4343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>