RE: Negative wait time

  • From: "Cary Millsap" <cary.millsap@xxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 2 Feb 2004 10:32:51 -0600

Not exactly, but kind of. It's not a negative "wait event" duration,
after all; it's that the difference e - c is negative (that is, c > e).

It's possible that some process got a c=10000 recorded in its process
table when the process spent only, say, 100 microseconds on the CPU. So,
for a single dbcall, you really don't have enough data to determine
what's going on. But over a span of several dbcalls, your negative and
positive quantization errors will tend to offset each other. As long as
total "unaccounted-for" time is between -10% and +10% of your total
response time, it's safe to ignore it.

By the way, another cause of the c > e phenomenon is the fact that
Oracle double-counts some CPU time in both the 'c' and 'ela' statistics.
The problem is most prominent for applications that do large multi-block
read calls.


Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com
* Nullius in verba *

Upcoming events:
- Performance Diagnosis 101: 2/24 San Diego, 3/23 Park City, 4/6 Seattle
- SQL Optimization 101: 2/16 Dallas
- Hotsos Symposium 2004: March 7-10 Dallas
- Visit www.hotsos.com for schedule details...


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Jamadagni, Rajendra
Sent: Monday, February 02, 2004 9:54 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: RE: Negative wait time

Thanks Cary, so is it okay to ignore negative wait times?

Raj
------------------------------------------------------------------------
-=
-------
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Cary Millsap
Sent: Monday, February 02, 2004 10:48 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: RE: Negative wait time


Quantization error.

The error is greater on the 'c' statistic than any other, because it is
obtained by polling in 10,000-microsecond increments.


Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com
* Nullius in verba *

Upcoming events:
- Performance Diagnosis 101: 2/24 San Diego, 3/23 Park City, 4/6 Seattle
- SQL Optimization 101: 2/16 Dallas
- Hotsos Symposium 2004: March 7-10 Dallas
- Visit www.hotsos.com for schedule details...


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Jamadagni, Rajendra
Sent: Monday, February 02, 2004 8:03 AM
To: Oracle List (E-mail)
Subject: Negative wait time

Okay it is Monday and I seem to have difficulty remembering stuff  ...
I wrote a pl/sql procedure that analyzes a given trace file and produces
output like this ... but look at wait time ... why is it < 0 ??=20
wait =3D elapsed-cpu right? What am I missing? In case you are wondering
... this procedure (and its output) is based on Cary's paper 'LIO Vs
PIO' ... not precise, but should be pretty close.

SQL Hash Value : 98525727
SELECT count(distinct(us.Ut_Id)) Res_Prmpt
    From yyyy ms, zzzz us
   Where ms.Mg_Unit_Id =3D us.Ut_Id
     And us.Pob_Id =3D :b4
     and ( :b3 IS NULL OR us.Line_Number =3D :b3 )
     And us.Monday_Dt between :b2 AND :b1
     And us.Makegood =3D 'A'
     And us.Reason_Cd <> -19
     And ms.Mg_Unit_Type =3D 'P'
     And us.Ut_Id Not In (Select ms1.Mg_Unit_Id
                            From xxxx ms1, yyyy mh
                           Where ms1.Mg_Number =3D mh.Mg_Number
                             And ms1.Mg_Unit_Type =3D 'M'
                             And mh.Mg_Pob_Id =3D :b4
                             And mh.Mg_Line_Number =3D us.Line_Number)

                        -------- Response  Time --------
Action  Count      Rows   Ela Time   CPU Time  Wait Time LIO Blocks PIO
Blocks
------ ------ --------- ---------- ---------- ---------- ----------
----------
PARSE       1         0      0.000      0.000      0.000          0
0
EXEC       51         0      0.004      0.010     -0.006          0
0
FETCH      51        51      0.450      0.390      0.060       9047
11
------ ------ --------- ---------- ---------- ---------- ----------
----------
TOTAL     103        51      0.454      0.400      0.054       9047
11


Any pointers are welcome, and yes please excuse me while I go have
another coffee.
Raj
------------------------------------------------------------------------
--------
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: