Operating System - HP-UX
1827295 Members
4180 Online
109717 Solutions
New Discussion

dbc_max_pct & dbc_min_pct

 
SOLVED
Go to solution
Glenn L. Stewart
Frequent Advisor

dbc_max_pct & dbc_min_pct

Would like advice on most efficient values for dbc_min_pct & dbc_max_pct.

I have received conflicting views on the values of both.

Refering to document UPERFKBAN00000726, it recommends that is %wcache is below 75% (sar -b)then both values should be lowered.
From performance tuning courses at HP though, I have been recommended to increase max_db_pct to close to 90%.

Currently most %wcache on my servers are well below 20% (well below the 75 above).

Any help would be much appreciated.

Glenn Stewart
Unix Administrator
Caltex Australia
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: dbc_max_pct & dbc_min_pct

Hi Glenn:

Certainly every environment is different, but I've never heard of increasing dbc_max-pct to 90%! The default value is 50% which is generally *lowered*. As the docuument you cite mentions, "For most systems this value should not exceed 300Mb". If you are running a database like Oracle, setting the buffer cache high actually results in double-buffering. The other ramification of a very large buffer cache is waves of high processor and sluggish response as the syncer daemon flushes data from the cache to disk.

...JRF...
Patrick Wallek
Honored Contributor

Re: dbc_max_pct & dbc_min_pct

max_dbc_pct = 90? I don't think so. That is WAY WAY WAY too high. If the buffer cache ever increased to the full 90%, then you would have only 10% of you RAM left to do anything. I seriously doubt that your machine would respond very well at all and your applications would not run very well.

Like the doc mentioned, buffer cache can be as little as 300MB. Depending on the amount of RAM you have, dbc_max and dbc_min could be as little as 10.
I prefer to set both values the same so that the buffer cache stays static.
John Poff
Honored Contributor

Re: dbc_max_pct & dbc_min_pct

Glenn,

I set dbc_min and dbc_max to 5 and 10 respectively on my machines. My big machines are running Oracle with lots of RAM and are using EMC disk arrays, so I don't need HP-UX to do another set of caching for me.

As for the performance and tuning class, I also have taken that one. I don't remember hearing anything about setting the dbc_max so high. They did mention setting it lower to free up RAM for other uses. It is one of the first kernel parameters to adjust when you have a memory bound machine.

On the other hand, since you are in Australia, maybe the dbc_min and dbc_max work the opposite way in the Southern Hemisphere? :)

JP
Bill Hassell
Honored Contributor
Solution

Re: dbc_max_pct & dbc_min_pct

The buffer cache cannot significantly improve wcache stats! If your applications write a lot of data to random locations and files, there is very little chance that the next write will find a similar area in the buffer cache.

Now read cache is very different. With a large buffer cache, even random reads can produce high read cache percentages.

But as with all kernel parameters, there is a point of diminishing returns. The first few hundred megs are very important to good performance. When the buffer cache gets into the gigabyte range, significant delays can be incurred for various reasons.

NOTE: 11i (HP-UX 11.11) has a major rewrite of the buffer cache code to fix long serial queue problems and allow the cache to quickly shrink in response to process memory requirements.

So what is the right value? (let's all repeat this together) It all depends. The percentage values are always relative to the amount of RAM so they are meaningless to discuss as a general rule. Why? Do you have 128 megs of RAM or 16,000 megs of RAM? Very different answers for the percentage. So start with megs and then convert to percentage.

So, minimum buffer cache should be 100 megs or so--unless you have only 256 megs (or less) of RAM. In that case, get more RAM ASAP is you are having ANY performance issues. Think in terms of 1Gb to 4 Gb for servers doing anything important.

And the maximum buffer cache can be 300 to 2000 megs. Why such a wide range? If your server is 75-90% read versus write, then a large buffer cache will work fairly well, but better with 11.0 (and patches), best with 11i.

But if you have 50:50 read versus write (or more writes than reads) then the buffer cache should stay under 500 megs. But of course, it all depends on how much RAM you have and need for processes, how fast your processor is, and how fast and distributed your disk might be.

So there is no easy metric to help adjust the buffer cache. In my experience, you will get 10x to 100x better performance by distributing disk activity over multiple channels and fixing the applications that are wasting CPU resources due to poor design.


Bill Hassell, sysadmin