Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.server -> Re: Database Hit Ratios

Re: Database Hit Ratios

From: Howard J. Rogers <>
Date: Mon, 8 Jul 2002 12:47:20 +1000
Message-ID: <agauem$idp$>

I think it obvious that hit ratios as a tuning *goal* are pathetic, and you say as much with the 'interpretation is king' comments below.

But that's precisely what certain tomes out there have promoted, Oracle's 8i course material included. The classic is Richard Niemic's statement along the lines of 'increase your hit ratio from 97 to 98% and your database will perform 4 times faster'. Utter bollocks, of course, because it ignores the most important element, which is *context*. What sort of a database is this? What SQL is it issuing? What is the SQL waiting for?

As a *symptom* of tuning problems, fair enough. And symptoms need diagnosis -sometimes, they are coincidental and not germane to the diagnosis. Sometimes they are.

No-one is suggesting never to calculate the ratios. But pursuit of a ratio for its own sake is pointless, and a 99% buffer cache hit ratio doesn't mean you haven't got problems.

HJR "Richard Foote" <> wrote in message news:C46W8.30154$
> Hi All,
> I know I'm sticking my neck out here, but recently many people have been
> commenting that database hit ratios matter about as much to database
> as Mike Tyson matters to world peace (ie. not a lot). I've read the
> excellent articles by Gary Millsap, seen the very clever dial up script by
> Connor McDonald and read many comments here. I'm sure I'm being pedantic,
> but (gulp) I disagree with any final conclusion that suggests hit ratios
> *never* matter. What's important (and this is what I've been failing to
> hear), is that hit ratios matter IF *interpreted* and used in a logical
> meaningful manner.
> Let me position my case, with an emphases on the database buffer cache hit
> ratio. Firstly people who tune " SQL statements" based on hit ratios are
> wrong. People who tune databases to a "specific" hit ratio are wrong.
> who think a database hit ratio of 99.99 means their database is king s**t
> are wrong.
> In fact before you seriously look at memory performance, you *must* follow
> the correct (and in my opinion only) tuning methodology. That is first get
> your business requirements accurate and appropriate. Then get you database
> modelling and data design accurate and appropriate. Then implement your
> database design efficiently and appropriately. Then get your applications
> designed efficiently, accurately and appropriately. (Difficult for out of
> the box solutions I know...). The net effect of all
> this is that you now have a database that has been tuned to do the
> possible amount of work to satisfy it's existence. This means you have
> reduced the number of *logical* I/Os down to an absolute minimum (which at
> the end of the day is what 95% of database tuning is all about). Unless
> has all been effectively performed, then memory tuning is a little like a
> mechanic tuning a car only to have the driver plod away in first gear !!
> Now we get to the hit ratio and it's useful and valid interpretation from
> tuning perspective. I've seen Conner's "dial up" hit ratio example (and
> clever it is too) but I view it as an invalid way to discredit the *valid
> interpretation* of the hit ratio. Invalid in that it runs a little script
> that
> accesses (as many times as necessary) a cached table that increases the
> logical reads to the point the physical reads are an inconsequential
> percentage of the total logical reads. High hit rate, c**p DB, hit rates
> mean nothing is the conclusion. But as already stated, a good DBA would
> detected this rather naughty script, it's irrelevance to business
> requirements and out she goes. Reducing the logical I/Os to the bare
> is the prerequisite to memory tuning and the *valid interpretation* of the
> hit rate.
> In fact, it's the *physical* I/Os that are of most importance here in
> relation to the hit ratio. Once and only once the logical I/Os have been
> tuned, do we need to determine the *number* of physical reads. If by
> increasing my memory buffers, I'm reducing the physical I/Os to the point
> where it's a worthwhile return in investment, then I'm altering the *hit
> ratio* in a valid and deterministic manner. Once the physical reads have
> plateaued out, then my tuning is done. The *value* of the hit ratio is of
> consequence, but the behaviour pattern of reducing the physical reads (and
> thus it's effect on the hit ratio) is important. And Oracle supports this
> (bless them), why else do they go to such trouble as providing us with all
> the db cache advise stuff, so we can effectively tune the buffer cache to
> reduce physical I/Os and yes, (in)directly the hit ratio performance as
> well.
> The buffer cache can actually be too big and hurt performance so reducing
> it's size without any detriment effect on the physical I/O count is also a
> valid tuning outcome. Again, using my interpretation of the hit ratio
> statistics to positive effect.
> I now have a database with the minimum number of *logical* I/Os and the
> minimum number of *physical* I/Os. MY INTERPRETATION OF TUNING BASED ON
> RATIOS and I go back to what I said at the start. It's not just the
> statistics that constitute the hit ratio that are very important, but how
> they are interpreted. And when people say that hit ratios matter not, it's
> blanket statement that worries me because it's somewhat in the eye of the
> beholder exactly what that statement means. It's a correct statement from
> many interpretations but not *all*. Yes, a 95.28% hit ratio is meaningless
> but the number of logical and physical I/Os is very very important.
> To those that I'm stating the bleedin obvious please forgive me, but it's
> subject that has caused much confusion and this is my little attempt to
> clarify (confuse?) the matter.
> Ok, my eyes are close. Hit me.
> Richard
Received on Sun Jul 07 2002 - 21:47:20 CDT

Original text of this message