Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> CPU Time calculation in AWR Reports

CPU Time calculation in AWR Reports

From: Luis Fernando Cerri <lfcerri_at_gmail.com>
Date: Thu, 1 Nov 2007 12:20:10 -0300
Message-ID: <329b3afe0711010820y2750d0b9v7dbbca42d3245785@mail.gmail.com>


Hello, list.

At Statspack age, 'CPU Time' value in section 'Top 5 Timed Events' was calculated as the difference of 'CPU used by this session' values between two snapshots:

                       select 'CPU' , (e.value-b.value)/100 time
                         from stats$sysstat b, stats$sysstat e
                        where e.snap_id         = :v_eid
                          and b.snap_id         = :v_bid
                          and e.name            = 'CPU used by this session'
                          and b.name            = 'CPU used by this session';


Applying the same theory against DBA_HIST_SYSSTAT table (10gR2), I can't get the same results of CPU Time in AWR reports:

    select 'CPU' , (e.value-b.value)/100 time

      from dba_hist_sysstat b, dba_hist_sysstat e
     where e.snap_id         = :v_eid
       and b.snap_id         = :v_bid
       and e.stat_name       = 'CPU used by this session'
       and b.stat_name       = 'CPU used by this session';

From my first observations, CPU Time in AWR Reports is something like 75% of the value gotten with the above select. Probably it's not relevant.

Do you know if CPU Time calculation formula has changed from Statspack to AWR and how it has changed? Or am I missing something?

I tried to get the formula from DBMS_WORKLOAD_REPOSITORY source, but guess what? Yes, it's wrapped. :)

Thanks in advance for any input.

Cerri

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Nov 01 2007 - 10:20:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US