Operating System - HP-UX
1834134 Members
1885 Online
110064 Solutions
New Discussion

Re: Dynamic Buffer Cache Sizing

 
SOLVED
Go to solution
Suren Selva
Advisor

Dynamic Buffer Cache Sizing

Hello All,

In some of our systems, when I run "sar -b" I am getting very low ratios for %wcache. Sometimes I get low ratios for %rcache as well.
1. Is this a good thing or a bad thing?
2. What would be the 'right size' for the dynamic buffer cache?
3. As a rule of thumb, what size should the dynamic buffer cache be?

We have Oracle running on all of these systems.

Your thoughts on this matter would be really appreciated. Thanks to all of you in advance.

Regards,
Suren Selva
Experience is worth nothing if not gained from!
3 REPLIES 3
Trevor Dyson
Trusted Contributor
Solution

Re: Dynamic Buffer Cache Sizing

1. Is this a good thing or a bad thing?
If %read cache hit ratio is below 95% it may be a bad thing

2. What would be the 'right size' for the dynamic buffer cache?
Enough to maintain ~>95% read cache hit ratio

3. As a rule of thumb, what size should the dynamic buffer cache be?
10-15% of ram with 512MB ram or above then monitor %read hit ratio and increase if needed.

There are a lot of previous posts on buffer cache sizing and measuring performance. I recommend you use the ITRC Forums search function to find some of these posts, they are very useful. I find Bill Hassell's posts especially useful.

In summmary:

Percent read cache hit ratio is the most important factor with a hit ratio above 95% considered as OK. If I had a consistent ratio below %95 percent (say as averaged over the period of the busiest few hours of the busiest day of the week) I would consider increasing the buffer cache if there was sufficient free memory.

I only monitor %read hit ratio and do not bother with %write hit ratio. Others may differ.

If you have Online JFS then you will be able to take advantage of special mount options that allow bypassing of the buffer cache for some Oracle objects. This can improve database write performance and avoid "double buffering" of writes to database files and indexes. These mount option are convosync=direct,mincahce =direct. Only use these options on file systems used for data files and indexess, not redo logs, archive logs and control files. Check Oracle technical support for more info. Do not use these options for general purpose filesystems as they may dramatically increase response times.

The HP Glance performance tools can help enourmously in identifying buffer cache size. Contact your HP sales rep to get an evaluation copy (60 days I think)

In the end if response times are satisfactory I would tend to leave it alone.



I've got a little black book with me poems in
John Payne_2
Honored Contributor

Re: Dynamic Buffer Cache Sizing

Suren,

This is at times a hot topic here in the forums. (Along with swap spcae size, but I will not get into that here...) You can find a large number of posts about this if you do a "search" (to the left) and search on 'buffer cache' in the forums.

Anyway, it is my feeling, (and I really have not seen performance issues that show otherwise) that the buffer cache should be fairly limited when you are talking about fairly new disks. The disks out today are very fast compared to a few years ago. I try to set my cache at a range of 50MB - 300MB. I generally do not go over 400MB on any machine, but just about all my machines are less than 2 years old...

The reason why you do not want such a large buffer cache is that every time your system has to do a read or write, it has to look at that cache every time before it goes to disk. Every time. If you configure a very large cache, you will end up spending more overhead on a system than if the system just goes out and reads the disk without a cache every time. That is why I limit my cache.

No need to waste memory or cause your system to page unnecessarily if you have a relatively small amount of memory...

You will problibly see posts or have people reply that say not to have a dynamic cache. It's up to you if you want a fixed cache or a dynamic cache.

Hope it helps

John
Spoon!!!!
Michael Tully
Honored Contributor

Re: Dynamic Buffer Cache Sizing