1833838 Members
2681 Online
110063 Solutions
New Discussion

buff cache so high

 
SOLVED
Go to solution
roberto salvatori
Frequent Advisor

buff cache so high

i have a machine (L1000) with hp-ux 11, just patched with last patch bundle (two days ago).
this machine has 1,5 GB of memory, 4 GB swap. this machine is db server (ingres) and omniback server (just patched too).
I've started glance and i've seen that the Mem Util in glance is 99%. The swap is near 50% but cpu and disk have a avg=4%. when i go in Memory report, the Buf Cache is high (714.7mb). i've just made a compare with another machine with the same characteristic and the Buf Cache is half (358,4mb).
The question is that there is something to do to lower the Buf Mem value or lower the value of used Mem and if i can do to know what it used all memory on machine. u must know that the machine have no system processes running (for example mib2 or something else). only mwa is running now.
thanks in advice
14 REPLIES 14
Pete Randall
Outstanding Contributor
Solution

Re: buff cache so high

What are your dbc_min and dbc_max values set to?


Pete

Pete
Bryan D. Quinn
Respected Contributor

Re: buff cache so high

Compare the dbc_min_pct and dbc_max_pct kernel parameters. These are the parameters that control your buffer cache size.

-Bryan
Bryan D. Quinn
Respected Contributor

Re: buff cache so high

Compare the dbc_min_pct and dbc_max_pct kernel parameters. These are the parameters that control your buffer cache size.

-Bryan
Pete Randall
Outstanding Contributor

Re: buff cache so high

Reasonable values might be 5 and 10 for min and max, respectively. They're probably at default levels.


Pete

Pete
Michael Steele_2
Honored Contributor

Re: buff cache so high

More on dbc_min and dbc_max; Guidelines I've used in the past to set both: For 2gb of memory, 5 and 10 and for 4gb also 5 and 10. Since you have 1.5 gb I also use 5 and 10 for dbc_min and dbc_max.

You're posting above describes an idle server with only system utilities running: 99% memory, 50% swap, 4% disk and CPU. What are the metrics when the server is busy?

Use these commands when the server is busy / loaded and paste in the results:

sar -v 5 5
sar -u 5 5
sar -d 5 5
vmstat 5 5
swapinfo -tam
Support Fatherhood - Stop Family Law
Dario_1
Trusted Contributor

Re: buff cache so high

Hi!

Make sure the following Kernel Parameters are set to something like:

dbc_min_pct 3
dbc_max_pct 10

Regards,

Dario
roberto salvatori
Frequent Advisor

Re: buff cache so high

ok, now i've understood.
i've just compared two machines (dbc min e max) and i've seen that on the machine with high use of Mem the dbc_max_pct value is 50 (20 in the other). the dbc_min_pct is 5 (in all two machines).
so the last question is:
why put this value so high? there is a reason?
is it right if i set 10 in all two machines or i can make no change?
good work, thanks
Bryan D. Quinn
Respected Contributor

Re: buff cache so high

Hey Robert,

The 5 and 50 values are default values that are in place when the OS is installed. These are usually much too high for a database environment.

-Bryan
Pete Randall
Outstanding Contributor

Re: buff cache so high

Roberto,

The default dbc_max_pct is 50. Why HP sets it that high is anyone's guess. I would say that you should always set it to 10 or less. You probably only need 200 to 400 Mb of buffer cache so aim for a percentage that will give you that amount.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: buff cache so high

Hi Roberto:

The 50% setting seems to be a default that has been around for a long time. It is generally far too high, especially on modern systems with large amounts of physical memory. The appropriate value depends on lots of things.

The buffer cache allows file buffers to reside in memory so that I/O an remain memory-bound instead of proceeding physically to the disk. Too large a buffer cache may mean that the 'syncer' daemon takes a long time to run to flush modified buffers. Too small a buffer cache may mean too many physical I/O's where "logical" ones would suffice.

As with most things, the correct value for optimal performance depends on your environment. 'glance' is an excellent tool with which to monitor I/O and memory pressure. If you don't have it, you should. A trial copy is available on the Application CDROM set.

Regards!

...JRF...
Jarle Bjorgeengen
Trusted Contributor

Re: buff cache so high

Hi,

the default of 50% dbc_max_pct is quite old. Earlier the amounts of memory wasn't that massive. Also the buffercache is dynamic, so it use whatever is left after other processes had its share of memory, to buffercache. (up to dbc_max_pct that is)

Nothing wrong with that except when new processes is started, and in need for memory, it is quite some overhead involved to flush out , re-organize and shrink the buffercache when new user-memory is needed.

Actually on database servers that handles their own cache, and do synchronous i/o anayway, people tend to keep it as low as 2-5% both on dbc_min_pct and dbc_max_pct, keeping buffercache constant.

Rgds Jarle
roberto salvatori
Frequent Advisor

Re: buff cache so high

Jarle, u are right cause i've just asked to my friend to see these values on db machines (oracle) and the values is 2 for both parameters. so i think that the next step is to modify these values (i will try put 5-10) and i will do another test to see if something is changed about performance.
thank u randal, thank u james, thank u dario, thanks to all.
roberto
Elena Leontieva
Esteemed Contributor

Re: buff cache so high

You may also want to look at buffer cache hit ratio: sar -b to find out the efficiency of your buffer cache, - %rcache should not fall below 90%. But Oracle, for example, maintains its own cache, so low cache hit ratio is not really an indicator. But you are running Ingres ...
On my production server (Oracle) we have physical memory ( 4 GB) and it is more than 90% utilized during the regular business hours, and utilization reaches 99% during peak times. Percentage of physical memory used by the system and buffer cache is 5.6%. Usually memory allocated to user code and data varies between 87% and 93%. I can see a deactivation rate (swap outs) of about 1 over a short intervals under moderate and heavy system load. We feel that we are tight on memory and could be nice to have more, but users are not complaining yet.
Dario_1
Trusted Contributor

Re: buff cache so high

Roberto:

Here is a nice post that talks about it. It also includes some swap information.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xa78006295e00d6118ff40090279cd0f9,00.html

Regards,

Dario