cancel
Showing results for 
Search instead for 
Did you mean: 

How does Load Graph calculate CPU usage percentage?

vivekbhoj
Active Contributor
0 Kudos

Hello Everyone,

We are running HANA Rev 82.

As we all know that we can see CPU usage percentage in HANA in Load Graph.

I want to know how does load Graph calculates CPU usage percentage?

Does it use "HOST_RESOURCE_UTILIZATION_STATISTICS"?


We are trying to create a HANA Performance Report that shows Daily Highest Memory Usage and Highest CPU Usage.

At present we are checking Load Graph to find out highest CPU usage for a day.

But we wanted to automate this process so I wanted to know how to calculate Highest CPU Usage for a day?

Regards,

Vivek

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

You don't have to reinvent the wheel here.

Check 's script collection 1969700 – SQL statement collection for SAP HANA.

- Lars

vivekbhoj
Active Contributor
0 Kudos

Hi Lars.

I know about this note and before writing this question I checked this note as well as note 2100040 - FAQ-SAP HANA CPU. It could be possible that I might have missed something but I did check below two SQLs from the note:

In the note mentioned by you, there is a SQL on Load History but it works only on HANA Rev 90+ as M_LOAD_HISTORY_HOST is not present in Rev 82.

Then there is one more SQL that shows HANA Resources Memory and CPU consumption on day basis and it shows percentage of busy CPUs and average number of CPUs used but does not show max CPU usage.

I tried but was not able to find out max CPU usage in percentage for a day from HOST_RESOURCE_UTILIZATION_STATISTICS that's why I asked the question.

Regards,

Vivek

lbreddemann
Active Contributor
0 Kudos

Hmm... I'm pretty sure that there is no system view in SPS 8 that would deliver max. CPU.

The LOAD history has been facilitated by the nameserver process writing into it's own KPI-delta file which is not exposed in any system view in SPS 8.

Which means: for SPS 8 I don't know how to create a max(CPU usage%) per interval SQL query.

- Lars

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi,

Wouldn't it be possible to set aggregation to 'NONE' in query HANA_Resources_CPUAndMemory_History_Rev70+ and get the max out from CPU_BUSY_PCT for a day worth of data?

Something like:


select to_char(snapshot_time, 'YYYY-MM-DD'),host, max(CPU_BUSY_PCT) from

(

  -- here goes query HANA_Resources_CPUAndMemory_History_Rev70+

-- adapted for a day worth of data and aggregation 'NONE'

)

group by to_char(snapshot_time, 'YYYY-MM-DD'),host

BRs,

Lucas de Oliveira

lbreddemann
Active Contributor
0 Kudos

No idea if that's possible.

I don't have a SPS 8 system to try out, so Vivek may want to follow up...

- Lars

vivekbhoj
Active Contributor
0 Kudos

Hi Lucas,

We can set Aggregation as NONE in the query and I tried it but the MAX CPU values do not match with Load Graph values.

Regards,

Vivek

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi,

Statistics service gets that info from snapshots within every minute (as you may have noticed from the query results) while load graph has a different (smaller) granularity.

That's probably why you're facing that difference.

BRs,

Lucas de Oliveira

Answers (0)