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

Home -> Community -> Usenet -> c.d.o.server -> Re: which system call is used to measure wait time ?

Re: which system call is used to measure wait time ?

From: Steve Adams <steve.adams_at_ixora.com.au>
Date: Wed, 31 Jan 2001 00:55:40 GMT
Message-ID: <3a775f62.1980448123@nsw.nnrp.telstra.net>

Hello Danisment,

Oracle uses the gettimeofday() system call to measure wait times. See http://www.ixora.com.au/q+a/0009/15101606.htm for more on that.

Your wait_time is wrong because you are using V$TIMER. Calls to V$TIMER read an SGA data structure. That value only changes when Oracle gets around to updating it, and so it can lag behind real time by a second or more under heavy CPU load. See http://www.ixora.com.au/q+a/0008/29072854.htm for more on that.

@ Regards,
@ Steve Adams
@ http://www.ixora.com.au/
@ http://www.christianity.net.au/

-----Original Message-----
From: danisment_at_yahoo.com

hello,

which system call is used to measure wait time ?

I guess following method is wrong:

t0 := get_time_from_v$timer;
wait();
t1 := get_time_from_v$timer;
wait_time := t1 - t0;

wait_time may show wrong becasue CPU may be still used by process during wait() because of tight loop or OS timer signal SIGALRM to check resource is available.

regards...

Sent via Deja.com
http://www.deja.com/ Received on Tue Jan 30 2001 - 18:55:40 CST

Original text of this message

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