1833046 Members
2499 Online
110049 Solutions
New Discussion

NBUF and BUFPAGES

 
Richard Ace_1
Advisor

NBUF and BUFPAGES

Can anyone help on this. I have a server maxing out on Buffer Cache. Causing major performance problems. 8 GB Mem & 10 GB Dev Swap.

My server is set up like this

#model 9000/800/V2250

# uname -a
HP-UX rgmtl01 B.11.00 U 9000/800 76288 unlimited-user license

# cat /var/adm/syslog/syslog.log |grep -i Phys
Jan 31 02:04:29 rgmtl01 vmunix: physical page size = 4096 bytes, logical page size = 4096 bytes
Jan 31 02:04:29 rgmtl01 vmunix: Physical: 8384512 Kbytes, lockable: 6471460 Kbytes, available: 7432684 Kbytes

# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2097152 0 2097152 0% 0 - 1 /dev/vg00/lvol2
dev 8384512 0 8384512 0% 0 - 1 /dev/vg00/lvol9
reserve - 4778600 -4778600
memory 6486124 3923628 2562496 60%

# sysdef |grep -i buf
bufpages 209612 - 0- Pages -
nbuf 105504 - 0- -
ndilbuffers 30 - 1- -

I was just wondering if changing NBUF and BUFPAGES Kernel parameter could better the situation if 'TWEAKED'. Take in consideration the above Kernel Parameters.

Note that this server has a fair few instancies of Oracle.

NBUF
Minimum = 0 or 16
Maximum = Memory limited
Default = 0

BUFPAGES
Minimum = 0 or 6 (Nbuf*2 or 64 pages)
Maximum = Memory limited
Default = 0

If you have any pointers let me know as I am about as far as I can go on this one.

Cheers Rich

Want some Points then help me

See ya!!!!!!!!!!!!!!!!




11 REPLIES 11
Ian Dennison_1
Honored Contributor

Re: NBUF and BUFPAGES

Richard,

What are your values for 'dbc_min_pct' and 'dbc_max_pct'? Also what indicators do you have of Buffer Cache maxing out?

Also, an 'ipcs -ma' should show all the SGAs of Oracle - can you attach the results pse?

Thanks, Ian
Building a dumber user
Tim Nelson
Honored Contributor

Re: NBUF and BUFPAGES

Using the dynamic buffer cache could be an option. dbc_max_pct dbc_min_pct and setting nbuf to 0 will enable the dynamic cache..
Are you sure it is not already set ?
kmtune |grep dbc
You may bee looking at nbuf and bufpages as they are being set by the dynamic buffer settings. If the percentage is too high you will run into buffer management issues. "surging system " effect.
Tim Nelson
Honored Contributor

Re: NBUF and BUFPAGES

One more note.. If using any database that has it's own buffering it has been recommended to limit HPUX's buffering to a minumum. This also allows more memory for the application. Double buffering cannot be of any benefit. Typical database setups would suggest 3-5% max_dbc_pct and 1-2% min_dbc_pct. Remeber this is a % so if there are huge amounts of memory even less or none at all could be a good bet. ( HP would never recommend none but... )
James Odak
Valued Contributor

Re: NBUF and BUFPAGES

1st
do not use sysdef to check bufpage settings, it shows actual use i believe

Dynamic buffer caching has always wokred well for me

in sam or run manually against the kernel

set nbuf and buffpages to 0 (thus enabling dynamic buffering) then set your dbc_min to 5% dbc_max to 10%

increase these settings as need ..with 8 gb memory i'd use 5-10% for the min and 10-15% for the max but with the amount of dev sway you already have i'd stick with the lower end
James Odak
Valued Contributor

Re: NBUF and BUFPAGES

1st
do not use sysdef to check bufpage settings, it shows actual use i believe

Dynamic buffer caching has always wokred well for me

in sam or run manually against the kernel

set nbuf and buffpages to 0 (thus enabling dynamic buffering) then set your dbc_min to 5% dbc_max to 10%

increase these settings as need ..with 8 gb memory i'd use 5-10% for the min and 10-15% for the max but with the amount of dev swap you already have i'd stick with the lower end
Dietmar Konermann
Honored Contributor

Re: NBUF and BUFPAGES

You are currently using 209612 pages for buffer cache which is about 10% of your physical memory.

In general, I would not recommend a buffer cache larger than say 400MB for an 11.00 system. Things may get inefficient for larger configurations. 11.11 scales better here (BTW, your V-Class may benefit from 11.11 anyway).

I would not recommend to tune nbuf or bufpages either. Leave them at the default (0), instead use dbc_min_pct and dbc_msx_pct. My 1st shot would would be dbc_min_pct=2, dbc_max_pct=5.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Richard Ace_1
Advisor

Re: NBUF and BUFPAGES

 
Ian Dennison_1
Honored Contributor

Re: NBUF and BUFPAGES

Rich,

Well you have plenty of memory. I count 3.3GB allocated to Oracle SGAs.

Does 'sar -u 2 20' show a high value for %wio?

If you have memory free, look at the possiblity of expanding the SGAs to get Oracle to perform a little more internal buffering, rather than putting the load on HP-UX.

(I got asked this in a job interview, and got the answer right).

Q: Where does 80% of the return on performance tuning come from in Oracle?
A: Tuning SQL Statements.

Share and Enjoy! Ian
Building a dumber user
Richard Ace_1
Advisor

Re: NBUF and BUFPAGES

Looks like expanding the SGA? Cool!

Write IO is AV 5 % nothing.

So I will expand the SGA. Once I find out what an SGA is. Presumably thats a DBA job and a DBASE vairiable or something.

You dont need to go into it it if I am correct, I will just tell the DBA's to
"Expand the SGA's"

Is it to do with the allocation to Semiphores in memory or am I completely wrong.

Rich

Anyway thanks for your help and I will assign TOP MARKS "POINTS"

Rich
Tim Nelson
Honored Contributor

Re: NBUF and BUFPAGES

Yep.. The SGAs show up as shared mem segments via ipcs.
Make user you leave enough for user processes and each of the Oracle instances. Each instance also uses up a fair amount of mem like 200MB each in addition to each SGA..
Leave a GB or so for HPUX, users, and Oracle else you will end up swapping/deactivating and cause yourself another world of hurt.
There is some SGA tuning that can be done as well by allocating pieces of the SGA for the different Oracle buffers..
Oracle Enterprise manager is a great help in identifying where resources are needed for Oracle.
Luck.
Richard Ace_1
Advisor

Re: NBUF and BUFPAGES

Thanks for your help

Rich

You all have 10 points

Bye for now.