cancel
Showing results for 
Search instead for 
Did you mean: 

Where can I see the HANA database size?

Former Member

I know that both HANA Studio and ST04 show quite similar information. However HANA is still too new so I cannot evaluate which of the numbers is the actual database size.

  • Is it "Memory Used" in HANA Studio / "Used Physical Memory" in ST04?
  • Or "Disk Space Used" in HANA Studio / "Used Disk Space" in ST04?

And where inside the database can I easily see the current database size? Is it one of the many values in M_MEMORY?

For conventional RDBMS it was never difficult to find the actual database size, but for HANA this information seems to be hidden.

Regards,


Mark

Accepted Solutions (1)

Accepted Solutions (1)

former_member184768
Active Contributor

Hi Mark,

My two cents..

As you mentioned it is not very straight forward to identify the database size for the multiple reasons. Many a times, the object is not loaded to main memory and hence will not show up in the memory consumption.

But taking a different point of view, if the objective is to identify the main memory consumption, then I think the procedure as per the documentation should be as follows:

Performing System Measurements

To determine the amount of main memory in gigabytes that is currently allocated and used by all server processes in the landscape, you perform a system measurement.

Prerequisites

To perform a system measurement, you need the LICENSE ADMIN privilege.

Procedure

1. In SAP HANA studio, select a system in the navigator and choose Properties in the context menu of the system.

2. In the navigation bar, choose License.

In the System Measurement screen area, the current memory consumption and the licensed memory amount are displayed.

3. To store the result of system measurement, choose Export System Measurement.

But if your objective is to find out how much memory has been used by different objects in HANA database, then the easier way is to use the TOTAL_SIZE_IN_MEMORY (along with main, Delta etc) from M_CS_TABLES. This would give you idea of how much memory has been used by objects which are partially or fully loaded to memory. Please note that it give 0 value for the objects which are available in the systm, but not yet loaded to the memory.

Can you please help me understand the objective as what exact information are you looking for ?

Regards,

Ravi

staerk
Participant
0 Kudos

(3) will give you the colum store size, correct? You will have to add the row store I think.

Answers (7)

Answers (7)

rajarajeswari_kaliyaperum
Active Participant
0 Kudos

Hi ..Though i saw that this is a very old message, yet wanted to answer it.

Please check out my below blog..

https://blogs.sap.com/2020/09/21/how-to-find-hana-disk-sizememory-sizerecord-countmemory-usage-in-ha...

0 Kudos

Rajarajeswari And how to query storage space for HANA Data Lake?

petr_solberg
Active Contributor
0 Kudos

This message was moderated.

former_member285611
Discoverer
0 Kudos

Hey Mark,

I am looking for the same information.  The primary reason is to compare the BW Sizing report before/after to confirm that we will have enough memory to fully handle our RS/CS systems.  We have several assumptions based on the BW SIZING REPORT, and would like to validate this after the import was completed.

|SIZING DETAILS

|==============

|

|  (For 512 GB node)     data [GB]     total [GB]

|                                      incl. dyn.

|  Row Store                   256            356

|  Column Store               1459           2891

|  Caches / Services           450            450

|  TOTAL                      2165           3697

|

|

Thanks...

-russ

lbreddemann
Active Contributor
0 Kudos

Hi Russel,

you may want to look into using the memorySizing.py script that is located in the python_support folder of SAP HANA (also check sap note 1698281 for that).

- Lars

Former Member
0 Kudos

Thanks to all for your insights, this clarified the topic quite a lot! Maybe @lars.breddemann can spare some time to write a blog on this topic? That could be interessting to many people in the HANA community.

I will concentrate on the System Measurement -> Current Memory Consumption, because that is the number which is relevant for the HANA license and therefore also meaningful for the non-technical guys.

lbreddemann
Active Contributor
0 Kudos

Hi Mark,

digging out the time to write some blogs or to be more active here in the forum currently is quite difficult for me and the pile of interesting topics is ever growing... I'll see what I can do about this, but setting up primary support for HANA demands pretty much attention

Anyhow, the topic discussed in here is very intensely dicussed with customers, partners and also internally. And since there are not only technical considerations to me made here (license -> money -> business ... ) I'll have to await the official business statements on this.

best regards,

Lars

Former Member
0 Kudos

Hello Lars,

well thanks a lot anyway for these insights! I'll await the official business statement.

By the way, is it only possible to perform the HANA system measurement via the HANA Studio?
I would like to execute that SQL statement automatically via a script in order to get a history of the database growth. However, I cannot find out how HANA Studio performs that license measurement.

Regards.

Mark

lbreddemann
Active Contributor
0 Kudos

Hi Mark,

I've to admit: I don't actually know how the value in the license page is calculated.

And I'm supposed not to know it (yes, this is the right word order!).

However, if I look into the list of catalog tables and see there is a view called M_LICENSE I find that this view has columns called PRODUCT_USAGE and PRODUCT_LIMIT...

So these are the "dots" I see without looking too hard - how you connect them is totally up to you...

regards,

Lars

Former Member
0 Kudos

In the meantime I learned some new things about SAP HANA. In the HANA backup and recovery guide I saw that one can easily see the number of used pages in the data volumes:

select sum(allocated_page_size) from m_converter_statistics

This looks exactly like what I was searching for.

lbreddemann
Active Contributor
0 Kudos

Hi Mark,

glad to hear that you found what you where looking for.

But keep in mind that HANA creates a lot of additional structures in memory only and never persists them.

That also means: the data for these structures will be counted by the license check but not covered by the persistence mechanism of the converter page allocations.

best regards,

Lars

Former Member
0 Kudos

Hello Lars,

you are of course right. In a nutshell, there are two different "HANA database size" metrics to consider:

1. The number of used blocks in the data volumes:

select sum(allocated_page_size) from m_converter_statistics

2. The license relevant HANA memory usage:

select product_usage from m_license

The first metric is useful to compare HANA with other RDBMS, e.g. what is the compression ratio compared to ordinary row-store databases. The second metric is important e.g. for sizing the hardware. I have written a short HANA wiki article about this topic, hopefully it is helpful:

http://wiki.sdn.sap.com/wiki/display/inmemory/SAP+HANA+Database+Size

Regards,


Mark

lbreddemann
Active Contributor
0 Kudos

Hey Mark,

forgive me for being finicky on this, but with the backup size (that's what you would get from your first query) you cannot compare compression ratios.

What you probably can say is:

OK, in DB-X we put in data worth of 30-days of business and we require additional XYZ GBs of backup space for this, while if we put the same data into HANA  we require (only?) additional ZYX GBs...

And then we did not yet talk about backup compression.... 🙂

Anyhow, thanks for the effort and the WIKI page!

Cheers,

Lars

petr_solberg
Active Contributor
0 Kudos

Hi Mark,

the Wiki Link does not work, please would you confirm the link for the Wiki

SAP HANA Database size

I double checked the same link from google and it also does not.

I am currently having similar questions to the ones here.

Thanks and best regards,

Andy.

Vitaliy-R
Developer Advocate
Developer Advocate
0 Kudos

Mark, I think it will be easier if you distinguish between actual data size and database size, and then between actual data total size and actual data loaded into the RAM, and then between actual data loaded into the RAM and total allocated RAM (which will include temporary and intermediate data structures as well) 😄

I believe when SAP is referring to "HANA database size" they are refering to "Actual data total size", i.e. thoretical RAM allocation for all SQL tables loaded into RAM after all delta tables (uncompressed) and merged with main tables (compressed).

Disk allocation will be bigger. Think of BWA where every index is stored twice: after last merge commit, and before (for fast rollback).

Cheers,

-Vitaliy

PS. I must admit it's been awhile since my last presence on this forum...   

rajarshi_muhuri
Active Participant
0 Kudos

many months

rama_shankar3
Active Contributor
0 Kudos

Mark:

  If you are looking for summary level information, you can use the administration editor  within admin perspective in HANA studio to look at memory, CPU and disk usage. Limited details on summary is accessible using more informatioin link within the admin editor screen.

Regards,

Rama

former_member182277
Contributor
0 Kudos

Hello Mark,

I am not 100% sure but you can check out the following:

1.  _sys_statistics > Table > HOST_MEMORY_STATISTICS

2.  system > Volumes > Under service/columns

3. system > System Information > Double click Component Memory usage.

I hope it is useful.

Regards,neha