Re: Exact meaning of TCH in X$BH

From: Lothar Flatz <l.flatz_at_bluewin.ch>
Date: Fri, 30 Dec 2022 13:47:35 +0100
Message-ID: <05e0ec1d-4314-0a7e-f055-c53b5bed16ae_at_bluewin.ch>


Thanks Stefan and happy new year!

Am 30.12.2022 um 12:27 schrieb Stefan Koehler:
> Hello Lothar,
> the TCH can be way higher ... but ... quoting from Jonathan's book "Oracle Core: Essential Internals":
> -------8<-----------
> Oracle Corp. added a counter (and a timestamp—called tim) to the buffer header, and every time someone visits the buffer, they increment the touch count and update the timestamp—provided that at least 3 seconds has passed since the last update
> ...
> There is a commonly held theory that you can identify which block is causing latch contention on a given cache buffers chains latch by checking for very high touch counts (TCH) on all the buffers covered by that latch. Unfortunately this is not a very sound method. A buffer that is visited an average of once per second for half an hour will have a touch count around 600; a buffer that has been visited 10 million times in the last 5 minutes will have a touch count of around 100. The touch count can give you a clue, but it is not the final answer.
> ...
> -------8<-----------
>
> Hope this explains the behavior you are seeing.
>
> Best Regards
> Stefan Koehler
>
> Independent Oracle performance consultant and researcher
> Website: http://www.soocs.de
> Twitter: _at_OracleSK
>
>> Lothar Flatz <l.flatz_at_bluewin.ch> hat am 30.12.2022 11:58 CET geschrieben:
>>
>>
>> Hi guys,
>>
>> the official definition is : "X$BH.TCH is a touch count for the buffer. A high value for X$BH.TCH indicates a hot block."
>> (Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/tgdba/instance-tuning-using-performance-views.html#GUID-64F78817-8B4C-4392-B518-CA31CF728B69).
>>
>> But the biggest value for tch I have ever seen is 255 (unsigned seven bit integer) . Therefore I think it is not exactly a counter but rather reflects a range.
>> Can somebody give a detailed explanation? Does the number wrap around? When?
>>
>> Thanks
>>
>> Lothar
> --
> http://www.freelists.org/webpage/oracle-l
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Dec 30 2022 - 13:47:35 CET

Original text of this message