Re: CPU rounding

From: Gerry Miller <gerry_at_millerandbowman.com>
Date: Sat, 22 Oct 2011 09:42:24 +1000
Message-ID: <4EA20360.6010209_at_millerandbowman.com>



 Hi Mark.
My apologies. I have not made myself clear: the problem is that the CPU times *always* end with 4 zeroes, for example: select sid,stat_name, value from v$sess_time_model where stat_name like 'DB%'
order by sid,stat_name
;
SID STAT_NAME VALUE
------ ---------- ----------------
10     DB CPU           1696440000
10     DB time          1989368043
27     DB CPU             31910000
27     DB time            35288836
405    DB CPU               100000
405    DB time               98050
414    DB CPU               210000
414    DB time              196500
602    DB CPU                50000
602    DB time               32566

......

If you retrieve a value that is represented in microseconds and it has 4 zeroes on the end then it is effectively in centiseconds: 1696440000 microseconds=169644 centiseconds. I was not comparing the values of the 10g database with that of the 11g database, but rather demonstrating that CPU is accurate to the microsecond in the 10g database.

Note in particular sessions 405, 414 and 602, in which the DB CPU figure is higher than DB Time, which is what led me to the conclusion that the CPU figure is being rounded rather than truncated. This is the real problem caused by this: when one is trying to determine resource usage and DB Time isless than DB CPU, which is one its components, it is quite hard to produce sensible information.

Regards

Gerry

Powell, Mark wrote: Gerry, the Reference manual says the value is measured inmicroseconds so what makes you think the value is in centi-seconds? Since v$ views are generally since instance startup the comparison between the two version would only be relative if the two instance have the same start time. Is this true? -----Original Message----- From: oracle-l-bounce_at_freelists.org[1][mailto:oracle-l-bounce_at_freelists.org[2]] On Behalf Of Gerry Miller Sent: Friday, October 21, 2011 3:14 AM To: Oracle-L Group Subject: CPU rounding Hi, Can any one help me get to the bottom of this? We have two Solaris servers one hosting Oracle 10.1 and the other 11.2.The CPU stats on the 11g box are rounded to centiseconds while on 10g they are inmicroseconds: Example: In 11g: select value from v$sys_time_model where stat_name = 'DB CPU'; VALUE ----------- 27089090000 In 10g: select value from v$sys_time_model where stat_name = 'DB CPU'; VALUE ------------- 1373214613234 It is the same in v$sess_time_model and I suspect it is an OS setting that isat the root of the issue. Regards Gerry Miller -- http://www.freelists.org/webpage/oracle-l[3] -- http://www.freelists.org/webpage/oracle-l[4]

Received on Fri Oct 21 2011 - 18:42:24 CDT

Original text of this message