1832085 Members
3075 Online
110037 Solutions
New Discussion

Re: nbuf and bufpages

 
steven Burgess_2
Honored Contributor

nbuf and bufpages

Hi

Again looking at performance issues on our servers.

I have noted differences between sites where some (nbuf and bufpages) are set to 0 (dynamic)and others set to

# sysdef | grep nbuf
nbuf 5352
# sysdef | grep bufpages
bufpages 9000

How does the above affect performance. Would you recommend dynamic buffer caching?

Thanks in advance

Steve
take your time and think things through
11 REPLIES 11
harry d brown jr
Honored Contributor

Re: nbuf and bufpages

Steven,

Unless you know exactly how to manage your IO buffer cache, it's always recommended that you set both to zero and manage them through dbc_max_pct and dbc_min_pct.

live free or die
harry
Live Free or Die
S.K. Chan
Honored Contributor

Re: nbuf and bufpages

In my opinion I would leave nbuf and bufpages at 0 to allow the dynamic portion of the allocation take care of it. BUT .. depending on how much buffer cache you want to maximize, you can play around with
DBC_MAX_PCT = 50% (default value)
DBC_MIN_PCT = 5% (default value)
meaning by default, maximum buffer cache allowable is 50% of your memory. If you want to allocate more memory for programs instead of buffer cache, then lower
DBC_MAX_PCT
It all depends on the amount of memory you have and the nature of your application.
Sandip Ghosh
Honored Contributor

Re: nbuf and bufpages

First you have to look at the performance of the Server. Look at the sar -b 2 20. See what is the value of %rcache. If the value of the %rcache is between 90 to 100% and your server is running smoothly you don't have to do anything.

If you see the problem I would suggest to change the nbuf and bufpages to 0 and with that change the dbc_max_pct to 15%.

Sandip
Good Luck!!!
MANOJ SRIVASTAVA
Honored Contributor

Re: nbuf and bufpages

Steven

Before I throw the percentages , what is the RAM of the system and what database are u running. This is bcoz the systems haviong lots of RAM > 8 GB should lessee diffence between DB_MAX and DB_MIN , also nbuf is like a outerfence so increasing it would not slow the system.


Manoj Srivastava
Ross Martin
Trusted Contributor

Re: nbuf and bufpages

I always recommend setting nbuf and bufpages to 0 and then using Dynamic Buffering.

DBC_MAX_PCT is defaulted at 50 which is overkill -- what this means is 50% of RAM memory has been allocated for Buffer Cache. And, like any Cache, its function in life is to get 100% filled to be efficient.

It's a waste of resource, especially with systems that have a large amount of RAM memory.

I suggest setting DBC_MAX_PCT between 10 to 20 percent and leave DBC_MIN_PCT remain at the default of 5.

Nbuf and Bufpages need to be at 0 for Dynamic buffering to take effect. The only time nbuf and bufpages should be used, is if an application vendor makes some specific recommendations to get the most performance out of their product.

Hope that helps.

Ross Martin
HP Response Center
pap
Respected Contributor

Re: nbuf and bufpages

Hi,

Kernel parameters depends on your software configuration.
Please look at the kernel parameter selection for your machine.

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

One more thing set your nbuf=0

if you are runing RDBMS softwares etc...then set dbc_pct_max and dbc_pct_min at 15 and 5 respectively.

-pap
"Winners don't do different things , they do things differently"
steven Burgess_2
Honored Contributor

Re: nbuf and bufpages

Hi

Thanks for all your replies

I'm back in the office on Monday and will assign points when I have a thorough read

Have a nice weekend

Steve
take your time and think things through
Wodisch
Honored Contributor

Re: nbuf and bufpages

Hello,

actually I wuld recommend NOT to use "dbc_max_pct" at all, and only set "bufpages" to your system's needs!
Since HP-UX11.0 cannot really make use of more than 300M-400M, and HP-UX11i does not gain anything when using more than 800M of UNIX buffer cache, this is easy to understand, isn't it? Especially on today's systems with multi-gig RAM hardware...

So: if you know what your system needs, use "bufpages", else use "dbc_???_pct".

Just my $0.02,
Wodisch
A. Clay Stephenson
Acclaimed Contributor

Re: nbuf and bufpages

Hi:

I too will adopt the radical position that bufpages should be non-zero and thus a static buffer cache. I will say that your value of bufpages=9000 (36MB) is probably too low but since you failed to mention anything about your resources or applications; it's impossible to say with any degree of confidence. In most cases, I set nbuf to 0; the default header configuration works well.
In the vast majority of cases setting bufpages above about 80000 (320 MB or so) results in only very marginal increases in buffer cache hit rates. A few boxes (11x) will benefit from buffer caches in the 800-900 MB range but that is the exception rather than the rule.

One of the main reasons that I prefer static buffer caches is that it is much easier to see the effect of other tunables when this value is held constant. I can also say the the very best system tuner I know will tell you to use static buffer cache even though in his HP politically-correct paper, he suggests that you use dynamic buffer cache. When he is explaining this, he makes rapid up-and-down motions with his hand and explains the kernel overhead associated with it.

Of course, the best answer is to try both and measure performance. If you choose dynamic buffer cache, I would set min_dbc_pct to about 5 and max_dbc_pct to between 10 and 20.

If this is a pure database server doing lots of raw/io (or the Online JFS equivalent), then the buffer cache can be reduced quite low. This might explain your current setting although I generally set bufpages at least a bit higher.


Food for thought, Clay
If it ain't broke, I can fix that.
Ross Martin
Trusted Contributor

Re: nbuf and bufpages

If you want to use a static cache and don't know what to set the value to -- then you would set dbc_max_pct and dbc_min_pct to the same value.

Thus, if you want 10% static memory -- set dbc_max_pct and dbc_min_pct to the same value and assign 10 to each kernel parameter.

Unless you really know what you are doing and have the time to experiment, I still recommend using the DBC values -- you can obtain the desired result by merely specifying a percentage of memory you want to allocate without a lot of figuring.

It's just a matter of comfort level, the results are basically the same.

Ross Martin
HP Response Center

steven Burgess_2
Honored Contributor

Re: nbuf and bufpages

Hi

Wow, thanks for all your replies.

Sorry I should have passed system spec through the question

The system is basically quite low spec

625 Mb physical memory
and just the 1 cpu

sar -b 2 20

07:27:01 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
Average 1 603 100 10 82 88 2 0

This is at 07:00am - (Dubai)

Running Oracle database (recently converted from ingres)

I think we are going to experiment with dbc , setting the max to 15% min to 5%

Regards

Steve
take your time and think things through