Operating System - HP-UX
1846911 Members
5203 Online
110256 Solutions
New Discussion

Static vs. Dynamic Buffer Cache

 
Eric Buckner
Regular Advisor

Static vs. Dynamic Buffer Cache

Our current production server has 20 GB of RAM. And we are running dbc_min_pct & dbc_max_pct at 5%, so 1GB. Would it behoove me to change this over to using static values via nbuf and bufpages?

My logic was that if min and max were the same it is the same as setting nbuf and bufpages but am beginning to think there is still something going on behind the scenes that I am not aware of.

Thanks!
Eric
Time is not a test of the truth.
7 REPLIES 7
Sandip Ghosh
Honored Contributor

Re: Static vs. Dynamic Buffer Cache

First of all, I don't think that you need that much dynamic buffer. 500 MB should be enough. Have you check the %rcache on your system with 1 GB dynamic buffer (sar -b 5 5)? Check the %rcache after reducing it to 500 MB. If the %rcache is between 95 to 100% then, I think, you do not need that 1 GB of dynamic buffer.

Sandip
Good Luck!!!
James R. Ferguson
Acclaimed Contributor

Re: Static vs. Dynamic Buffer Cache

Hi Eric:

This is a matter of preference. Most folks prefer a dynamic buffer cache over static one.

When the 'bufpages' and 'nbuf' are both set to their default value of 0, the size of the buffer cache grows or shrinks dynamically, depending on competing requests for system memory. This mechanism is said to be much improved in 11.11.

You can achieve the same effect with dynamic buffer settings as with static ones by setting the 'dbc_min_pct' and 'dbc_max_pct' values the same.

If you are running a database engine that handles its own filesystem buffers, a small system buffer cache is desirable to avoid "double-buffering". On the other hand, other applications may benefit from a larger one. I prefer to enable dynamic buffering, use 'glance' and tune accordingly.

Regards!

...JRF...
Eric Buckner
Regular Advisor

Re: Static vs. Dynamic Buffer Cache

Exactly what in glance would I be looking for in order to tune it down.

Using the sar option to view cache read suggest by Sandip, I am consistently at 98-100% for read cache.

Thanks,
Eric
Time is not a test of the truth.
James R. Ferguson
Acclaimed Contributor

Re: Static vs. Dynamic Buffer Cache

Hi Eric:

For 'glance' one measure is to look at the ratio of physical to logical I/O. Have a look at the I/O by FileSystem screen (toggled by 'i').

Regards!

...JRF...
Eric Buckner
Regular Advisor

Re: Static vs. Dynamic Buffer Cache

James,

One thing I don't understand and I should have mentioned this to begin with so my apologies. I am running OnlineJFS and VxFS for all of my filesystems. And am using convosync=direct,mincach
e=direct,delaylog for all of my filesystems except for the root VG filesystems. I do this because I am attached to an XP512 and don't want to double cache the filesystems.

So when I look in I/O by FS, I don't see a large File IO rate at all for the majority of my filesystems. But see huge numbers on my most active FS in the logical IO rate.

Never have been much of a fan of glance, mainly because I never know what it is telling me.

Thanks,
Eric
Time is not a test of the truth.
A. Clay Stephenson
Acclaimed Contributor

Re: Static vs. Dynamic Buffer Cache

Eric,

Unless I have missed it, you haven't indicated which version of the OS you are running. I can tell you that on 10.20 and 11.0 systems I have actually measured the performance difference between dynamic buffer cache and static buffer cache and for my applications (primarily large databases and ERP), static buffer cache at about 320MB or so is the winner.

I haven't rigorously tested 11.11 to my satisfaction but I can state that 11.11 handles dbc much better.

The other thing I have noticed (and again have measured) is that on both 10.20 and 11.0, the OnlineJFS mount options convosync=direct,mincache=direct are the best performers for data file and indices but all other i/o including archive and redo logs do best using the buffer cache. With 11.11, I find that performance actually is best if the datafiles and indices also use the buffer cache, with about 800-900MB of buffer cache.
In all cases you will see inprovements with delaylog and nodatainlog

I tell you all of this only to emphasize one point: there is only one way to KNOW what works best and that is to measure for yourself and using your applications.

I would immediately test your theory of disabling buffer cache to avoid double-buffering; you just might be surprised.

Food for thought, Clay
If it ain't broke, I can fix that.
Eric Buckner
Regular Advisor

Re: Static vs. Dynamic Buffer Cache

Clay,
Thanks for the reply. I am in fact running 11.11. For the record I am running a 'SouperDoam' connected via fiber to an XP512. 20 Oracle databases ranging in size from 80 GB to 2 TB.

I opted to go convosync and mincache direct on archive and redo, et al, because of the massive amounts of cache in the XP512 (currently 12 GB). I just don't see a reason to double cache it in that case.

I am also using the nodatainlog option for VxFS as well, forgot about that one.

I would love to be able to make these kind of changes but this server doesn't get to go down very often. And unfortunately the buffer variables are not dynamic. I have considered changing the dbc_min_pct down to 0 for our next system maintenence period this coming weekend. Hopefully that will allow me to see at least what the OS thinks I should be using if I do opt to go static.

Keep it coming! This is good info!

Thanks!
Eric
Time is not a test of the truth.