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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: what exactly 'tim' means in a 10046 TRACE file ?

RE: what exactly 'tim' means in a 10046 TRACE file ?

From: Cary Millsap <cary.millsap_at_hotsos.com>
Date: Wed, 31 Mar 2004 09:44:13 -0600
Message-ID: <007f01c41737$0767a690$6601a8c0@CVMLAP02>


One thing I noticed on Win32 (Perl anyway) is that gettimeofday returns microsecond data (per POSIX standard), but it's accurate only to about a centisecond. This is curious, because all Pentium chips apparently have a Time Stamp Counter (TSC) hardware register that keeps time to the chip resolution (1E9 ticks/sec for a 1GHz chip). Also, Win32 gettimeofday calls are consistently 2x slower than Linux gettimeofday calls on identical hardware. It's like Win32 is consuming extra code path (and hence extra time) goofing up the numbers returned by the syscall.

I can't tell from what I looked at whether it's a Win32 syscall issue, or a Perl porting issue. ??

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

Upcoming events:

- Performance Diagnosis 101: 4/6 Seattle, 5/7 Dallas, 5/18 New Jersey
- SQL Optimization 101: 4/19 Denver, 5/3 Boston, 5/24 San Diego
- Hotsos Symposium 2005: March 6-10 Dallas
- Visit www.hotsos.com for schedule details...


-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Niall Litchfield Sent: Wednesday, March 31, 2004 9:27 AM
To: oracle-l_at_freelists.org
Subject: RE: what exactly 'tim' means in a 10046 TRACE file ?

> Let me know. On Windows, I haven't looked too hard, mostly because our
> Profiler code does the simultaneous clock-walk thing, which does
> everything we want, without having to worry about platform
> dependencies.

Hi

Well getTickCount was an interesting side alley since it measures in milliseconds - not microseconds doh! However the examples that I am seeing are almost certainly the elapsed time in milliseconds since system boot. The windows API does give a couple of calls to establish timings at this resolution in kernel32.dll these are queryperformancecounter which gives the count of clock ticks since system boot and queryperformancefrequency which gives the resolution of the clock. This obviously relies on the hardware having a high resolution clock - which my systems do. Short of attaching to the process and monitoring API calls it would appear that these are the calls that Oracle uses on MS Windows.

If anyone is interested I can post some vb.net code which I used in my tests to the web.

Cheers

Niall Litchfield
Oracle DBA
Audit Commission
+44 117 975 7805



This email contains information intended for the addressee only. It may be confidential and may be the subject of legal and/or
professional privilege. Any dissemination, distribution, copyright or use of this
communication without prior permission of the sender is strictly prohibited.


Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://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_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed Mar 31 2004 - 09:45:09 CST

Original text of this message

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