If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

buffer cache hit ratio. LIO vs PIO

I came across a post on AskTom that seemed to contradict everything I've been told or read about tuning the buffer cache hit ratio and reducing Physical IO by aiming to get all queries satisfied by reading the blocks in the buffers.

The article quotes a paper by Cary Millsap of Hotsos, and is titled "Why a 99%+ Database Buffer Cache Hit Ratio is NOT OK".

Whats your view on LIP vs PIO and exactly what should we look for when tuning memory?

Re: buffer cache hit ratio. LIO vs PIO

Originally posted by JMac I came across a post on AskTom that seemed to contradict everything I've been told or read about tuning the buffer cache hit ratio and reducing Physical IO by aiming to get all queries satisfied by reading the blocks in the buffers.

Whats your view on LIP vs PIO and exactly what should we look for when tuning memory?

Wass wrong in that link???????

wont reducing ur LIO reduce ur PIO (most often than not it will)..

U shud look for ur CONSISTENT/DB BLOCK gets and reduce as much as possible..

funky...

"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

It is - I believe - much faster to satisfy a query from blocks in memory (LIO) than to retrive blocks from disk (PIO).

Oracle recommend a Buffer cache Hit Ratio of 90%+. But the Hotsos article states that 99%+ indicates a poorly performing system. If the aim is to reduce PIO as much as possible, would not a Buffer Hit Ratio of 100% be ideal? Is there something basic here I'm missing?

Also 'Consistent gets' in a traced query. This indicates blocks retrieved from memory, and 'db block gets'indicates when IO is performed to disk. Thats right isn't it?

cache hit 99+ would mean that u have all bad sqls running that are eating up ur CPUs...and are subject to serialization
Ur seeing this high cache hit 99+ due ur Buffer gets (LIOs) are so high that PIO is not seen as significant number...

So reduce ur LIOs if u can and never look HIT ratio, its just a crap.

Abhay.

funky...

"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

"there are lies, damn lies and statistics" - a percentage is a statistic, and therefore to be treated with care.

If we just condsider the "work" to do I/O (which is not all the story) then there is a measure of work that will be something like: Work = A*LIO + B*PIO
where B > A (or even >> A).

If the missRatio is PIO/LIO then: Work = A*LIO*(1 + C*missRatio)
where C > 1 (or even >>1).

For a fixed amount of LIO, yes it is good to reduce the missRatio (perhaps by increasing the cache size).

The missRatio is PIO/LIO - it is usually NOT a good idea to reduce this by increasing LIO (though in rare cases it can reduce PIO). Millsap's point is that small missRatios can be the symptom of large LIO values.

I seem to remember Tom Kyte saying "look after the LIO and the PIO will look after itself" - another generalisation, but probably a good starting point.

My experience is that the Hit Ratio is a way to quickly check that all is well in your db once you have understood what is going on in your db.

I think this emphasises how easy it is to get away from the real objective. I don't want to do either of the above, I want to "maximise throughput" or "minimise response time" or something similar which relates to business efficiency. No user will congratulate you on keeping the hit ratio above 95%!

Frankly, I didn't realise 100% what I was doing when I looked at "I/O Work" in my previous. Almost by accident I stumbled upon a rule which says: if you are going to look at hit ratios or parse/execute ratios etc, you'd be advised to write down some kind of short-hand which relates them to your real objective.
(Climbs down off soap-box.)

Buffer cache hit ratio.....

When I was being taught Oracle 9i(OCP) our Instructor made the point that if buffer cache hit ratio should be at the acceptable level of 95%, and if it fell below 95% to add more ram(tuning). All but 1 article that I have read on the subject, and outside books(2) that I have said the same thing, "when buffer cache hit ratio falls below 95% throw more ram(tuning) at it until it rises back up to 95%.

I truely understand that some of you strongly suggest that we(newbies) RTM, but when we read the manual, and it says the same thing, I feel that I have been cornered into asking you folks for assistance.

As mentioned earlier in this post (All but 1 article that I have read on the subject) it only touched on design, it did not get real in depth about it.

I throw in with JMac on this one, what should a DBA tasked with buffer cache hit ratio look for in this matter?

Rick

RickSigh.....those were the days my friend, I thought they'd never end.
I too remember when this place was coo.

Re: Buffer cache hit ratio.....

Originally posted by Alchemy When I was being taught Oracle 9i(OCP) our Instructor made the point that if buffer cache hit ratio should be at the acceptable level of 95%, and if it fell below 95% to add more ram(tuning). All but 1 article that I have read on the subject, and outside books(2) that I have said the same thing, "when buffer cache hit ratio falls below 95% throw more ram(tuning) at it until it rises back up to 95%.

I truely understand that some of you strongly suggest that we(newbies) RTM, but when we read the manual, and it says the same thing, I feel that I have been cornered into asking you folks for assistance.

As mentioned earlier in this post (All but 1 article that I have read on the subject) it only touched on design, it did not get real in depth about it.

I throw in with JMac on this one, what should a DBA tasked with buffer cache hit ratio look for in this matter?

Rick

You can use the cache advisor to indicate the effectiveness of allocating or deallocating RAM to buffer cache.

Long story short, the sources you quote were wrong. If you are tasked with improving buffer cache hit ratio, just run some badly designed sql over and over again, thus increasing LIO's and herdly touching PIO's. That tells you all you need to know about how meaningful the ratio is.