Re: Exact meaning of TCH in X$BH

From: Martin Klier - Performing Databases GmbH <dmarc-noreply_at_freelists.org>
Date: Mon, 2 Jan 2023 11:23:47 +0100 (CET)
Message-ID: <236187488.28212.1672655027437.JavaMail.zimbra_at_performing-db.com>



It would have been easier to guess if spelt "THC"... ;)

Happy New Year!

-- 
Martin Klier // Performing Databases GmbH 
Managing Partner // Senior DB Consultant 
Oracle ACE Director 
Member of Symposium42 

martin.klier_at_performing-db.com // https://www.performing-databases.com 

> Von: "l flatz" <l.flatz_at_bluewin.ch>
> An: "Stefan Köhler" <contact_at_soocs.de>, "Oracle-L Freelists"
> <oracle-l_at_freelists.org>
> Gesendet: Freitag, 30. Dezember 2022 13:47:35
> Betreff: Re: Exact meaning of TCH in X$BH

> 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 -- http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 02 2023 - 11:23:47 CET

Original text of this message