Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: I/O EVENTS
Greg Moore wrote:
>
> Cary,
>
> In a TKPROF report, there is a small table at the top. It includes a column
> for CPU time and another for Elapsed Time.
>
> Suppose the total line shows CPU = 3.00 and elapsed = 5.00. You would think
> that the two seconds difference would be for waits, but that doesn't seem to
> be true.
>
> Since you have investigated trace files quite a bit, do you have an idea
> what these two TKPROF totals actually represent? If the difference between
> these two isn't waits, what is it?
>
> >From a pragmatic point of view, if all I have is a TKPROF report is there
> anything useful I can learn from seeing these two totals?
>
> Thanks.
>
> - Greg
>
Greg,
Waits refer to Oracle resources, mostly. Elapsed is, well, just
elapsed time and CPU time the amount of time for which the CPU ran just
for you. But you may well be waiting at the OS level without waiting for
any particular Oracle resource - think about being in the run queue,
ready to run, while the CPU is busy servicing somebody else. You're
waiting, and yet Oracle doesn't really know of it - or may not know of
it.
I guess that Oracle measures waits by taking an algorithm similar to :
start_time = get_time_stamp(); if (get_resource() == 0) { /* Got it */ wait_time = wait_time + (get_time_stamp() - start_time); ...
A wait time measured this way is actually some _elapsed_ time - during the get_resource() call Oracle certainly used CPU, but may well also have waited for some very low-level system resources. In other words, you can consider that Oracle wait times are something pretty unrelated to the elapsed/cpu times. It's elapsed time, but elapsed time doing nothing useful.
One thing is certain : the less Oracle waits, the less your users will wait too. That said, most often when they are waiting Oracle is busy ...
-- Regards, Stephane Faroult Oriole Software -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Stephane Faroult INET: sfaroult_at_oriole.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu May 23 2002 - 17:19:49 CDT