Friday, February 14, 2020

How to Calculate OS CPU Utilization From Oracle Database AWR report.

How to Calculate OS CPU Utilization From Oracle Database AWR report.:

please note: the calculation formulas given here are the formulas i got from various sources on reading AWRs (in process of learning AWR myself).. the credit goes to them who could find time to share their knowledge.. many authors ...many blogs on awr analysis.


TOTAL CPU= NUM_CPUS*ELAPSED_TIME*60
TOTAL CPU= 8*60*60 = 28800 seconds ( 8 is cpu core box, 60 is elaspsed time)

DB cpu : 405.14 seconds
DB time: 885.6  seconds

‭45% cpu usage of DB time,. TOTAL CPU available in the system is 28800 seconds. it means actual cpu usage is 1.4 % usage.
----------------

BUSY_TIME 65,579
IDLE_TIME 2,804,991

% BUSY TIME= {BUSY_TIME/ (BUSY_TIME+IDLE_TIME)}*100                           = {5788280/8365936}*100
select (65579/(65579+2804991))*100 from dual; 2.28452885663822864448524160706758588016

This means that the system was overall 2.3% was busy utilizing the CPU.

BUSY_TIME=SYS_TIME+USER_TIME

SYS_TIME :12,835
USER_TIME : 52,272
select 12835+52272  from dual; -- 65107
calculate % of SYS_TIME and % of USER_TIME.:
% SYS_TIME = (SYS_TIME/BUSY_TIME)*100 - select (12835/65107)*100 from dual; 19.8% system time usage.
%USER_TIME = (USER_TIME/BUSY_TIME)*100 - select (52272/65107)*100 from dual; 80.3%
this 80.3% is actually 80.3% of %BUSY_TIME ie 2.3%.  -- this user time..
this 19.8% is actually 19.8% of %BUSY_TIME ie 2.3%. -- this is sys time..

SYS$USERS service is the default service name used when a user session is established without explicitly identifying its service name.

Service Statistics:
---------------------------
Service Name DB Time (s) DB CPU (s) Physical Reads (K) Logical Reads (K)
SYS$USERS 581 396 86 22,706
db_name  304 9 57 369
SYS$BACKGROUND 0 0 4 4,298

Major time spent in SYS$USERS category however the cpu used by database is very low.. need to check further based on issues we want to investigate.

Assumptions: single database is running on hosts.




No comments:

Post a Comment