Operating System - HP-UX
1833187 Members
2439 Online
110051 Solutions
New Discussion

help to disable dbc and set nbuf

 
Roland Rebstock_1
Frequent Advisor

help to disable dbc and set nbuf

I would like to disable dbc_min_pct and dbc_max_pct by setting them to 0 and set nbuf to 400mg, to do this does nbuf setting set in MB so I should just specify 400 in the kernal?
8 REPLIES 8
Sridhar Bhaskarla
Honored Contributor

Re: help to disable dbc and set nbuf

Hi,

You cannot set dbc_* parameters to 0. To disable them you need to activate nbuf and bufpages.

Look at the following scenarios from the kernel config document.

nbuf interacts with bufpages as follows:
-----
bufpages = 0, nbuf = 0: Enables dynamic buffer cache.

bufpages not zero, nbuf = zero: Creates BufPages/2 buffer headers and allocates bufpages times 4 Kbytes of buffer pool space at system boot time.

bufpages = 0, nbuf not zero: Allocates Nbuf*2 pages of buffer pool space and creates Nbuf headers at boot time..

bufpages not zero, nbuf not zero: Allocates BufPages pages of buffer pool space and creates Nbuf buffer headers at boot time. If the two values conflict such that it is impossible to configure a system using both of them, bufpages takes precedence.

----
More details here

http://docs.hp.com/hpux/onlinedocs/939/KCParms/KCparams.OverviewAll.html

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Roland Rebstock_1
Frequent Advisor

Re: help to disable dbc and set nbuf

so I could set dbc_min_pct and dbc_max_pct to 0 and set nbuf to 400.. This would set nbuf to 400MG of ram and automatically setup buffpages to 800?
Sridhar Bhaskarla
Honored Contributor

Re: help to disable dbc and set nbuf

Hi Roland,

No. the minimum value for dbc* parameters is 2. If you are enabling nbuf and bufpages, then dbc* s will be insignificant.

Each buffer page is of 4096bytes (4k). So if you set nbuf to 400, then your buffer pool would be 2*400*4k=3200 which is 3.2 MB. So, if you want to set 400MB of buffer, you would need to set nbuf to 50000.

Lemme put it in a formula

nbuf= BUFFER_CACHE/(2*4096)

(provided bufpages is set to 0)

The other way is to make nbuf 0 and make bufpages = (BUFFER_CACHE/4096). Simple.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Roland Rebstock_1
Frequent Advisor

Re: help to disable dbc and set nbuf

Here is why Im attempting to do this. And with this, if I have 4GB of Ram, what should I set dbc_min_pct, dbc_max_pct and nbuf to only use 400mg of Ram. I have seen big improvements on a HPUX 11 L Class with 720GB of EMC Storage, 4 HBA's and changed dbc/max/min to 5% from 50%. About 30MB/s of large read and writes. Though this helped, I would like to not use dbc at all.


All, I have had a World Specialized Support Team (WSP) from HP investigating a HPUX issue with a Dynamic Buffer Cache problem where a system can completely over-ride its max and min DBC setting. They identified this to be a bug with HPUX 10.20, 11.0, 11.11 (11i).. Thought the bug is not impacting to operations of HPUX it does create issues on how large files (Larger than the DBC setting) will not even touch the allocated DBC setting. Correction to this matter is to disable the max and min DBC setting and set NBUF's to correct.
A. Clay Stephenson
Acclaimed Contributor

Re: help to disable dbc and set nbuf

You simply need to set bufpages=102400 and nbuf=0. Regardless of the setting of dbc*, a non-zero bufpages values will override any dynamic buffer cache settings. I suggest that you leave nbuf at zero as the default buffer header allocation behavior is normally good. Typically limits of 400MB apply to 10.20 and 11.0 but 11.11 performs well with buffer cache in the 800MB-1GB range so you might double the above bufpages value if you are running 11.11.
If it ain't broke, I can fix that.
Roland Rebstock_1
Frequent Advisor

Re: help to disable dbc and set nbuf

Thank You very much, excellent detail answers and you put up with me on this topic.

THanks,


Roland
Sridhar Bhaskarla
Honored Contributor

Re: help to disable dbc and set nbuf

Hi Roland,

OK. If you don't want to use dbc* parameters, below is your configuration

dbc_max_pct: 2
dbc_min_pct: 2
nbuf : 0
bufpages : 100000

I never heard of your dbc* overriding issue. Interesting.

The advantage with dbc* is that the parameters are dynamic. I would set the dbc's to the following for a 4 GB RAM system.

dbc_max_pct : 10
dbc_min_pct : 5
nbuf : 0
bufpages : 0


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Bill Hassell
Honored Contributor

Re: help to disable dbc and set nbuf

Prior to 10.xx, there was no dynamic buffer cache and if nbuf=bufpages=0 then the cache would always be 10% RAM. I'm a fan of disabling the DBC since changing RAM means the cache silently changes too. bufpages is the recommended method to set the cache size (simpler formula).

Now, while bypassing the buffer cache completely is possible using Online JFS mount options, be prepared for some heavy design work. If you are running a database like Oracle, then using the additional options:

nodatainlog,mincache=direct,convosync=direct

for a specific mountpoint will bypass the cache, BUT be prepared for a measureable impact on backup speeds. While Oracle can use it's SGA smart cache rules, backing up the data without a cache may starve the backup program. You'll have to test to make sure.

Additionally, many Oracle layouts mix executables, data, rollback and archive logs and indexes on one mountpoint. Not only is this a bad idea overall, turning off the cache on thyis volume will seriously impact throughput. Only data volumes should bypass the cache (and increase SGA to add more data buffering). But the indexes, temp sort areas, archive/rollback logs, etc should by normal mounts using the buffer cache.


Bill Hassell, sysadmin