Re: More blocks in buffer cache than object on disk

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 26 Feb 2020 23:41:51 +0000
Message-ID: <LNXP265MB1562FD350DA167E173C46725A5EA0_at_LNXP265MB1562.GBRP265.PROD.OUTLOOK.COM>


You might be interested to read an old note I wrote about caching and consistent read blocks: https://jonathanlewis.wordpress.com/2011/03/14/buffer-states/

There's a hidden parameter _db_block_max_cr_dba default value 6, which is tries to limit the number of CR copies of a block that you will see in the buffer cache. You probably won't see many blocks getting that many CR copies (and you may see a few hot blocks getting far more) - but you will probably see quite a lot of blocks with more than one copy - typically one CU (current) and one or two CR (consistent read).

Regards
Jonathan Lewis



From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Rich J <rich242j_at_gmail.com> Sent: 26 February 2020 21:45
To: oracle-l_at_freelists.org
Subject: More blocks in buffer cache than object on disk

Hey all,

In one of our 12.1.0.2 DBs, there's some discussion involving a table and/or its indexes. In gathering info about the table, I see that while the table size is 683264 blocks (from DBA_SEGMENTS), there appears to be 1071098 blocks in the buffer cache for that table, according to V$BH. That's ~8.4GB cache for a ~5.3GB table (8K block size). Seems....excessive.

Maybe my buffer cache query is at fault:

SELECT

     dbo.owner||'.'||dbo.object_name object_name,
     bh.objd,
     COUNT(*)*8192/1024/1024 size_mb,
     count(*) size_blocks
FROM
     dba_objects DBO,
     v$bh bh
WHERE
     dbo.data_object_id = bh.objd
     and dbo.object_name = 'MYTABLE'
GROUP BY
     dbo.owner,
     dbo.object_name,
     bh.objd;

If it matters, this instance is on AIX, has an SGA of ~130GB, non-ASM, non-AMM, and is a primary for ADG. It's been up for about 40 days. The ERP application that uses it gets bounced weekly due to middle tier Java entropy (so, no lingering transactions).

Thoughts?

Thanks,
Rich

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Feb 27 2020 - 00:41:51 CET

Original text of this message