Mailing List
Home
Forum Home
Oracle List - by freelists.org
Oracle on SUSE Linux - Runing Oracle on SUSE Linux
Oracle database error code ...
www.freelists.org
Subjects
ORA 12540: TNS:internal limit restriction exceeded
ORA 12838 please : Is possible to append two times to the same table befo
ORA 12838 please : Is possible to append two times to the same table before
ora 04031
ora 12500 on windows
ORA 32004: obsolete and/or deprecated parameter(s) specified
ORA 01925: maximum of 30 enabled roles exceeded
ORA 01925: maximum of 30 enabled roles exceeded
ora 12500 on windows
ORA 01650, one idea
ORA 01650
ORA 4030
ORA 12838 please : Is possible to append two times to thesametable before do
ORA 12838 please : Is possible to append two times to thesame table before d
ORA 01536
ORA 03113 end of file on communication channel
ORA 32004: obsolete and/or deprecated parameter(s) specified
ORA 00600:
ORA 00020: maximum number of processes (%s) exceeded
ORA 01925: maximum of 30 enabled roles exceeded
ORA 3113 while creating a cluster database 9201 RAC on Linux with OCFS
ora 12500 on windows
ora 12500 on windows
ora 12500 on windows
ORA 01650, one idea
ora 12500 on windows
ora 12500 on windows
ora 12500 on windows
ORA 2000 Error Using DBMS STATS GATHER SCHEMA STATS
ORA 01650, one idea
ORA 01650, one idea
ORA 01650, one idea
ORA 01650
ORA 01650
Subject: ora 01031
ORA 4030
ORA 4030
ORA 06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind
Subject: Re: ORA 01722 invalid number
 
CPU Time calculation in AWR Reports

CPU Time calculation in AWR Reports

2007-11-05       - By Vlad Sadilovskiy

 Back
Reply:     1     2     3  

In this case it should be the same at the end of the day. Shouldn't it be?

After Jonathan posted his AWR observations, I couldn't reproduce similar
behavior and don't believe the time is calculated as *CPU used by this
session + recursive calls cpu usage*. At least not always. Here is a
post Recursive
Calls <http://vsadilovskiy.wordpress.com/2007/11/05/recursive-calls/> that
demonstrates differences in reporting recursive calls CPU usage in various
tools.

I agree that the source of *CPU used by this session* value in v$sysstat
that is *definitely used* to report *CPU time* by Statspack might
be different from the source of the *DB CPU* from v$sys_time_model that *I
think* is used by AWR to report the same. The lack of definitive information
about different DB usage patterns, doesn't allow clear demonstration of
their correlation.

Vlad Sadilovskiy
Oracle Database Tools
Web site: http://www.fourthelephant.com
Blog: http://vsadilovskiy.wordpress.com


On 11/2/07, LS Cheng <exriscer@(protected)> wrote:
>
> I think the difference may be because v$sysstat is refreshed after a call
> is completed but in SYS_TIME_MODEL_CPU it gets refreshed every 3 seconds
>
>
> Thanks
>
> --
> LSC
>
> On Nov 1, 2007 6:10 PM, Tanel Poder < tanel.poder.003@(protected)> wrote:
>
> > Well you can trace the awrrpt run...
> >
> > I suspect (but don't know for sure) that AWR uses
> > DBA_HIST_SYS_TIME_MODEL
> > for its CPU info... V$SYS_TIME_MODEL CPU values can differ from
> > V$SYSSTAT
> > ones...
> >
> > SQL> select
> >  2     a.value/1000000 time_model_seconds,
> >  3     b.value/10000   sysstat_seconds,
> >  4     a.value/1000000 - b.value/10000 missing_seconds
> >  5  from
> >  6     v$sys_time_model a,
> >  7     v$sysstat b
> >  8  where
> >  9     a.stat_name = 'DB CPU'
> >  10  and b.name = 'CPU used by this session'
> >  11  /
> >
> > TIME_MODEL_SECONDS SYSSTAT_SECONDS MISSING_SECONDS
> > -- ---- ---- ----- -- ---- ---- -- -- ---- ---- --
> >        126.997282          4.6276      122.369682
> >
> >
> > --
> > Regards,
> > Tanel Poder
> > http://blog.tanelpoder.com
> >
> >
> > > -- --Original Message-- --
> > > From: oracle-l-bounce@(protected)
> > > [mailto:oracle-l-bounce@(protected) ] On Behalf Of Luis
> > > Fernando Cerri
> > > Sent: Thursday, November 01, 2007 23:20
> > > To: oracle-l@(protected)
> > > Subject: CPU Time calculation in AWR Reports
> > >
> > > 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';
> > >
> > >
> >
> >
> >  --
> > http://www.freelists.org/webpage/oracle-l
> >
> >
> >
> >
>
>

<div>In this case it should be the same at the end of the day. Shouldn&#39;t it
be?</div>
<div>&nbsp;</div>
<div>After Jonathan posted his AWR observations, I couldn&#39;t reproduce&nbsp
;similar behavior and don&#39;t believe the time is calculated as <strong>CPU
used by this session + recursive calls cpu usage</strong>. At least not always.
&nbsp;Here is&nbsp;a post&nbsp;
<a href="http://vsadilovskiy.wordpress.com/2007/11/05/recursive-calls/"
>Recursive Calls</a>&nbsp;that demonstrates differences&nbsp;in reporting
recursive calls CPU usage in various tools. </div>
<div>&nbsp;</div>
<div>I&nbsp;agree&nbsp;that the source of <strong>CPU used by this session<
/strong>&nbsp;value in v$sysstat that is <em>definitely used</em> to report
<strong>CPU time</strong>&nbsp;by Statspack&nbsp;might be&nbsp;different from
the source of the <strong>
DB CPU</strong> from v$sys_time_model that <em>I think</em> is used by AWR to
report the same. The lack of definitive information about different DB usage
patterns, doesn&#39;t allow clear demonstration of their correlation.
<br>&nbsp;</div>
<div>Vlad Sadilovskiy<br>Oracle Database Tools<br>Web site: <a href="http://www
.fourthelephant.com/">http://www.fourthelephant.com</a><br>Blog: <a href="http:/
/vsadilovskiy.wordpress.com/">http://vsadilovskiy.wordpress.com
</a><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 11/2/07, <b class="gmail_sendername">LS Cheng
</b> &lt;<a href="mailto:exriscer@(protected)">exriscer@(protected)</a>&gt; wrote:<
/span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0
.8ex; BORDER-LEFT: #ccc 1px solid">I think the difference may be because v
$sysstat is refreshed after a call is completed but in SYS_TIME_MODEL_CPU it
gets refreshed every 3 seconds
<br><br><br>Thanks<br><span class="sg"><br>--<br>LSC</span>
<div><span class="e" id="q_1160029c02bf811d_2"><br><br>
<div class="gmail_quote">On Nov 1, 2007 6:10 PM, Tanel Poder &lt; <a onclick=
"return top.js.OpenExtLink(window,event,this)" href="mailto:tanel.poder.003@(protected)
.ee" target="_blank">tanel.poder.003@(protected)</a>&gt; wrote:<br>

<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0
.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Well you can trace the awrrpt run
... <br><br>I suspect (but don&#39;t know for sure) that AWR uses DBA_HIST_SYS
_TIME_MODEL
<br>for its CPU info... V$SYS_TIME_MODEL CPU values can differ from V$SYSSTAT
<br>ones...<br><br>SQL&gt; select<br>&nbsp;2 &nbsp; &nbsp; a.value/1000000 time
_model_seconds, <br>&nbsp;3 &nbsp; &nbsp; b.value/10000 &nbsp; sysstat_seconds,
<br>&nbsp;4 &nbsp; &nbsp; a.value/1000000 -
b.value/10000 missing_seconds<br>&nbsp;5 &nbsp;from<br>&nbsp;6 &nbsp; &nbsp; v
$sys_time_model a,<br>&nbsp;7 &nbsp; &nbsp; v$sysstat b<br>&nbsp;8 &nbsp;where
<br>&nbsp;9 &nbsp; &nbsp; a.stat_name = &#39;DB CPU&#39; <br>&nbsp;10 &nbsp;and
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://b.name/"
target="_blank">
b.name</a> = &#39;CPU used by this session&#39;<br>&nbsp;11 &nbsp;/<br><br>TIME
_MODEL_SECONDS SYSSTAT_SECONDS MISSING_SECONDS<br>-- ---- ---- ----- -- ---- ---
---- -- ---- ---- -- <br>&nbsp; &nbsp; &nbsp; &nbsp;126.997282 &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;4.6276 &nbsp; &nbsp; &nbsp;122.369682
<br><font color="#888888"><br><br>--<br>Regards,<br>Tanel Poder<br><a onclick=
"return top.js.OpenExtLink(window,event,this)" href="http://blog.tanelpoder.com/
" target="_blank">http://blog.tanelpoder.com</a><br></font>
<div><br><br>&gt; -- --Original Message-- --<br>&gt; From: <a onclick="return
top.js.OpenExtLink(window,event,this)" href="mailto:oracle-l-bounce@(protected)
.org" target="_blank">oracle-l-bounce@(protected)</a><br>&gt; [mailto:
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:oracle-l
-bounce@(protected)" target="_blank">oracle-l-bounce@(protected) </a>] On
Behalf Of Luis<br>&gt; Fernando Cerri<br>&gt; Sent: Thursday, November 01, 2007
23:20
<br>&gt; To: <a onclick="return top.js.OpenExtLink(window,event,this)" href=
"mailto:oracle-l@(protected)" target="_blank">oracle-l@(protected)</a><br>
&gt; Subject: CPU Time calculation in AWR Reports <br>&gt;<br>&gt; Hello, list.
<br>&gt;<br>&gt; At Statspack age, &#39;CPU Time&#39; value in section &#39;Top
5 Timed<br>&gt; Events&#39; was calculated as the difference of &#39;CPU used
by this<br>&gt; session&#39; values between two snapshots: <br>
&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;select &#39;CPU&#39; , (e.value-b.value)/100 time<br>&gt;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;from stats$sysstat b, stats$sysstat e<br>&gt; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; where e.snap_id
&nbsp; &nbsp; &nbsp; &nbsp; = :v_eid
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; and b.snap_id &nbsp; &nbsp; &nbsp; &nbsp; = :v_bid<br>&gt;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; and <a onclick="return top.js.OpenExtLink(window,event,this)" href
="http://e.name/" target="_blank">e.name</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;= &#39;CPU used
<br>&gt; by this session&#39;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and <a onclick="return top.js
.OpenExtLink(window,event,this)" href="http://b.name/" target="_blank">b.name</a
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &#39;CPU used<br>&gt; by this
session&#39;;
<br>&gt;<br>&gt;<br><br>&nbsp;</div>
<div>
<div></div>
<div>--<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http
://www.freelists.org/webpage/oracle-l" target="_blank">http://www.freelists.org
/webpage/oracle-l</a><br><br><br>&nbsp;</div></div></blockquote></div>
<br></span></div></blockquote></div><br>